POST Certificate Stores
The POST /CertificateStores method is used to create new certificate stores in Keyfactor Command. This method returns HTTP 200 OK on a success with details about the certificate store created.
Permissions for certificate stores can be set at either the global or certificate store container level. See Container Permissions for more information about global vs container permissions.
Table 333: POST Certificate Stores Input Parameters
Name | In | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ContainerId | Body | An integer indicating the ID of the certificate store's associated certificate store container, if applicable (see GET Certificate Store Containers). | ||||||||||||||||
ClientMachine | Body |
A string containing the client machine name. The value for this will vary depending on the certificate store type. Typically, it is the hostname of the machine on which the store is located, but this may vary. See Adding or Modifying a Certificate Store for more information. |
||||||||||||||||
Storepath | Body |
|
||||||||||||||||
Cert Store Inventory JobId | Body | A string indicating the GUID that identifies the inventory job for the certificate store in the Keyfactor Command database. This will be null if an inventory schedule is not set for the certificate store. | ||||||||||||||||
Cert Store Type | Body |
|
||||||||||||||||
Approved | Body | A Boolean that indicates whether a certificate store is approved (true) or not (false). If a certificate store is approved, it can be used and updated. A certificate store that has been discovered using the discover feature but not yet marked as approved will be false here. |
||||||||||||||||
Create If Missing | Body | A Boolean that indicates whether a new certificate store should be created with the information provided (true) or not (false). This option is only valid for Java keystores and any custom certificate store types you have defined to support this functionality. |
||||||||||||||||
Properties | Body |
When reading this field, the values are returned as simple key value pairs, with the values being individual values. When writing, the values are specified as objects, though they are typically single values. For example, on a GET request for a PEM store configured with a separate private key, the contents of this field might be: Copy
However, the syntax used when updating the properties sets the value as a key value pair using value as the key. For example, on a POST or PUT request for a PEM store configured with a separate private key, the contents of this field might be: Copy
An example server properties parameter POST for an F5 or Citrix NetScaler store would contain: Copy
An example server properties parameter POST for an F5 or Citrix NetScaler store with the username and password stored as PAM secrets would contain (where the Provider value—1 in this example—is the Id value from GET PAM Providers): Copy
Note: There are three standard properties that are used for certificate store types that require server credentials (e.g. F5):
These replace the separate certificate store server records that existed in previous versions of Keyfactor Command. For legacy support, if credentials are not provided through store properties during creation or editing of a certificate store, Keyfactor Command will attempt to find a certificate store server record and copy the credentials from it into the store properties for future use. |
||||||||||||||||
AgentId | Body | Required. A string indicating the Keyfactor Command GUID of the orchestrator for this store. | ||||||||||||||||
Agent Assigned | Body | A Boolean that indicates whether there is an orchestrator assigned to this certificate store (true) or not (false). |
||||||||||||||||
Container Name | Body | A string indicating the name of the certificate store's associated container, if applicable. | ||||||||||||||||
Inventory Schedule | Body |
An object indicating the inventory schedule for this certificate store. |
||||||||||||||||
Reenrollment Status | Body |
An object that indicates whether the certificate store can use the re-enrollment function with accompanying data about the re-enrollment job. |
||||||||||||||||
Set New Password Allowed | Body | A Boolean that indicates whether the store password can be changed (true) or not (false). |
||||||||||||||||
Password | Body |
An object indicating the source for and details of the credential information Keyfactor Command will use to access the certificates in a specific certificate store (the store password). This is different from credential information Keyfactor Command uses to access a certificate store server as a whole. The former (this setting) is typically used for Java keystores; the latter is typically used for certificates stores on Citrix NetScaler and F5 devices and set at the server level, not the certificate store level (see POST Certificate Stores). Certificate stores that require credentials support up to three possible credential options:
|
Table 334: POST Certificate Stores Response Data
Name | Description |
---|---|
Id | A string indicating the GUID of the certificate store within Keyfactor Command. This ID is automatically set by Keyfactor Command. |
ContainerId | An integer indicating the ID of the certificate store's associated certificate store container, if applicable (see GET Certificate Store Containers). |
ClientMachine |
A string containing the client machine name. The value for this will vary depending on the certificate store type. Typically, it is the hostname of the machine on which the store is located, but this may vary. See Adding or Modifying a Certificate Store for more information. |
Storepath | A string indicating the path to the certificate store on the target. The format for this path will vary depending on the certificate store type. For example, for a Java keystore, this will be a file path (e.g. /opt/myapp/store.jks), but for an F5 device, this will be a partition name on the device (e.g. Common). See Adding or Modifying a Certificate Store for more information. The maximum number of characters supported in this field is 722. |
Cert Store Inventory JobId | A string indicating the GUID that identifies the inventory job for the certificate store in the Keyfactor Command database. This will be null if an inventory schedule is not set for the certificate store. |
Cert Store Type | An integer indicating the ID of the certificate store type, as defined in Keyfactor Command, for this certificate store. Built-in certificates store types are: (0-Javakeystore, 2-PEMFile, 3-F5SSLProfiles,4-IISRoots, 5-NetScaler, 6-IISPersonal, 7-F5WebServer, 8-IISRevoked, 9-F5WebServerREST, 10-F5SSLProfilesREST, 11-F5CABundlesREST, 100-AmazonWebServices, 101-FileTransferProtocol). Any custom extensions for the Keyfactor Universal Orchestrator you add will have certificate store types numbered 102+. |
Approved | A Boolean that indicates whether a certificate store is approved (true) or not (false). If a certificate store is approved, it can be used and updated. A certificate store that has been discovered using the discover feature but not yet marked as approved will be false here. |
Create If Missing | A Boolean that indicates whether a new certificate store should be created with the information provided (true) or not (false). This option is only valid for Java keystores and any custom certificate store types you have defined to support this functionality. |
Properties |
Some types of certificate stores have additional properties that are stored in this parameter. The data is stored in a series of, typically, key value pairs that define the property name and value (see GET Certificate Store Types for more information). When reading this field, the values are returned as simple key value pairs, with the values being individual values. When writing, the values are specified as objects, though they are typically single values. For example, on a GET request for a PEM store configured with a separate private key, the contents of this field might be: Copy
However, the syntax used when updating the properties sets the value as a key value pair using value as the key. For example, on a POST or PUT request for a PEM store configured with a separate private key, the contents of this field might be: Copy
An example server properties parameter POST for an F5 or Citrix NetScaler store would contain: Copy
An example server properties parameter POST for an F5 or Citrix NetScaler store with the username and password stored as PAM secrets would contain (where the Provider value—1 in this example—is the Id value from GET PAM Providers): Copy
Note: There are three standard properties that are used for certificate store types that require server credentials (e.g. F5):
These replace the separate certificate store server records that existed in previous versions of Keyfactor Command. For legacy support, if credentials are not provided through store properties during creation or editing of a certificate store, Keyfactor Command will attempt to find a certificate store server record and copy the credentials from it into the store properties for future use. |
AgentId | A string indicating the Keyfactor Command GUID of the orchestrator for this store. |
Agent Assigned | A Boolean that indicates whether there is an orchestrator assigned to this certificate store (true) or not (false). |
Container Name | A string indicating the name of the certificate store's associated container, if applicable. |
Inventory Schedule |
An object indicating the inventory schedule for this certificate store. |
Reenrollment Status |
An object that indicates whether the certificate store can use the re-enrollment function with accompanying data about the re-enrollment job. |
Set New Password Allowed | A Boolean that indicates whether the store password can be changed (true) or not (false). |
Password |
Note: Secret data is stored in the secrets table or a PAM provider and is not returned in responses.
|


