Create System Certificate REST Service
Use the Create System Certificate REST Service to create a self-signed server certificate or a certificate signing request.
- Operation
POST
- URL
- https://host:port/SKLM/rest/v1/system/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
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. |
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. |
JSON object with the following specification:
JSON property name | Description |
---|---|
type | Specify the type of the certificate. Possible values:
The subject name and issuer name of the certificate are same.
|
alias | Specify a unique name for the certificate. The alias is not case-sensitive. |
cn | Specify a common name for the certificate. |
algorithm | Specify the cryptographic algorithm for the certificate. Possible values:
|
san |
Specify the subject alternative name (SAN) containing domain names and IP addresses secured by this certificate, RFC822, and URI. Each attribute and its value must be in a new line. The syntax for each line is:
The supported attributes are:
DNSName , IPAddressName ,
URIName , RFC822Name Note: The
* special character
is not allowed. For example, you cannot specify, DNSName : *.example.com . Instead
of using the * character, you can specify multiple hostname in a separate
line.For example,
|
ou |
Specify the organizational unit name. |
o |
Specify the organizational name. |
country |
Specify the two-letter country code. For example, |
state |
Specify the state name. |
locality |
Specify the locality. |
usageSubtype | Specify certificate usage type based on its purpose. Possible values:
|
validity | Specify the days during which the certificate is valid. The interval can range from 1 day to 9000 days. |
fileName | Required only when the type property is set to
certreq . Specify the output file name with the .csr extension in
which the certificate request content is written. |
Response
Header name | Value and description |
---|---|
Status Code |
|
Content-Type | application/json |
Content-Language | Locale for the response message. |
JSON object with the following specification:
JSON property name | Description |
---|---|
code | Returns the code that is specified by the status property. |
status | Returns a status that indicates whether the certificate creation task is successful. |
JSON object with the following specification.
JSON property name | Description |
---|---|
code | Returns the application error code. |
message | Returns a message that describes the error. |
Examples
- Service request to create a self-signed certificate
-
POST https://localhost:port/SKLM/rest/v1/system/certificates { "type": "self-signed", "alias": "server_cert", "cn": "server_cert", "algorithm": "ECDSA", "ou": "abc", "o": "abc", "country": "US", "state": "abc", "locality": "abc", "usageSubtype": "SERVERGUI_TLS", "validity": "100" } }