Get Certificate List from Liberty Truststore REST Service

Use Get Certificate List from Liberty Truststore REST Service to list certificates that are present in the IBM® Security Guardium® Key Lifecycle Manager Liberty truststore.

Operation
GET
URL
https://host:port/SKLM/rest/v1/provider/certificates

By default, Guardium Key Lifecycle Manager server listens to the secure port 9443 (HTTPS) for communication. During IBM Security Guardium Key Lifecycle Manager installation, you can modify this default port.

Request

Request Parameters
Parameter Description
host Specify the IP address or hostname of the IBM Security Guardium Key Lifecycle Manager server.
port Specify the port number on which the IBM Security Guardium Key Lifecycle Manager server listens for requests.
Request Headers
Header name Value
Content-Type application/json
Accept application/json
Authorization SKLMAuth userAuthId=<authIdValue>
Accept-Language Any valid locale that is supported by IBM Security Guardium Key Lifecycle Manager. For example, en or de.

Response

Response Headers
Header name Value and description
Status Code
200 OK
The request was successful. The response body contains the requested representation.
400 Bad Request
The authentication information was not provided in the correct format.
401 Unauthorized
The authentication credentials were missing or incorrect.
404 Not Found Error
The processing of the request fails.
500 Internal Server Error
The processing of the request fails because of an unexpected condition on the server.
Content-Type application/json
Content-Language Locale for the response message.
Success response body

JSON array that contains JSON objects with the following specification:

JSON property name Description
alias Returns the alias name of the truststore certificate.
key state Returns the state of the certificate, such as ACTIVE.
issuer name Returns the name of the issuer of the certificate.
subject name Returns the subject name of the certificate.
activation date Returns the activation date of the certificate.
creation date Returns the certificate creation date.
expiration date Returns the certificate expiration date.
trusted Indicates whether the certificate is trusted by returning the following values:
1
Trusted
0
Not trusted.
serial number Returns the certificate serial number.
hash value Returns the digest value for the certificate.
Error Response Body

JSON object with the following specification.

JSON property name Description
code Returns the application error code.
status Returns a message that describes the error.

Example

Service request to obtain certificate list from the Liberty truststore
GET https://localhost:port/SKLM/rest/v1/provider/certificates
Success response

[
  {
    "alias": "string",
    "key state": "ACTIVE",
    "issuer name": "CN=localhost,OU=oidcServer,O=ibm,C=us",
    "subject name": "CN=localhost,OU=oidcServer,O=ibm,C=us",
    "activation date": "12/16/20 7:10:01 AM UTC",
    "creation date": "3/5/21 5:33:09 AM UTC",
    "expiration date": "12/16/21 7:10:01 AM UTC",
    "trusted": "1",
    "serial number": "551386907",
    "hash value": "0000: 25 35 05 3b c1 93 39 7c  e5 eb ab fd 98 fd 67 6c  .5....9.......gl\n0010: cf cf ce b6 14 a9 0a 93  47 21 e1 05 e6 b6 93 51  ........G......Q\n"
  }
]
Success response 2
{
  "status": "Found 0 certificates."
}