This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SSL VPN cerificate via REST API

Hi

if I create a user via REST API, i will get a  reference to a x509 certificate like

 "x509_cert": "REF_KAjfeqkcOL",

If I try to get the certificate via 

https://ip:4444/api/objects/ca/host_key_cert/

i will not find it, so it's probably the wrong reference. How do I get the correct certificate for the created user.

Thanks in advance for your help

Andreas


This thread was automatically locked due to age.
Parents Reply Children
  • If I use this path I will get an empty answer.

    If I use this path https://ip:4444/api/objects/ca/host_key_cert/

    I get a list with all certificates including the corresponding certificate for the user but with a complete different reference number.

    _locked: "",
    _ref: "REF_RlNZNoOoPXOa",
    _type: "ca/host_key_cert",

    name: "USER_1814C62 (X509 User Cert)

     

    "name": "USER_1814C62",
    "x509_cert": "REF_KAjfeqkcOL",

     

    I could compare the name (excluding the bracket text) and find my certificate but over a reference is normally the better way

     

    Best regards

    Andreas 

  • Hi  

    I understand this. You need to have a correct reference number to identify this user account. In my test environment, I had limited users and I did not create using API like you so I found the Reference number from the device CC option. Without using shell, I can only search for the username in the output of  https://ip:4444/api/objects/ca/host_key_cert/ and then doing a search for the exact username as it will match with the CN value of the certificate.

    Regards

    Jaydeep