CertStore AddCertStore

The AddCertStore method allows a client to define a new certificate store within Keyfactor Command. The structure is as follows:

Table 698: POST /AddCertStore Request Body

Parameter Name

Parameter Value

StoreType

Type of certificate store to be defined. This field is required and allowed values are:

Parameter Name

Parameter Value

0

Java Keystore

2

PEM file

3

F5 SSL Profiles

4

IIS Trusted Root Certificates

5

NetScaler

6

IIS Personal Certificates

7

F5 Web Server

8

IIS Revoked Certificates

100 Amazon Web Services
101 File Transfer Protocol

ClientMachine

Machine where the certificate store resides (or will reside). Required.

StorePath

Path on the client machine where the store should be defined. Required for Java Keystore, PEM file, F5 SSL Profiles, and NetScaler (categories 0, 2, 3, and 5).

AgentId

Identifier of agent that will service the request. Either AgentId or AgentName must be provided for F5 (categories 3 and 7), IIS (categories 4, 6, and 8), and NetScaler stores (category 5).

AgentName

Machine name of agent that will service the request. Either AgentId or AgentName must be provided for F5 (categories 3 and 7), IIS (categories 4, 6, and 8), and NetScaler stores (category 5).

Container

Certificate store container that should contain the certificate store. This is optional and no certstore container will be assigned if it is not provided. See the Keyfactor Command Reference Guide for information on certificate store containers.

Password

Password used to access the store. Required for Java Keystore and optional for PEM file.

PrivateKeyPath

Path on the client machine where the private key should be stored. Supported only for PEM files, and is optional in that case. If no path is provided for a PEM file, the private key will be stored in the same PEM file as the certificate.

Table 699: POST /AddCertStore Response Body

Parameter Name

Parameter Value

Message

Description of the result of the operation, e.g. "The operation completed successfully".

Result

Numerical code for the outcome of the operation, as given in Table 701: POST /AddCertStoreServer Response Body.

Id

GUID of the created store, if successful.

Example Request

POST http://<host>/CMSApi/CertStore/1/AddCertStore HTTP/1.1

{
	"ClientMachine": "192.168.41.171",
	"StorePath": "/opt/cms-java-agent/config/trust.jks",
	"StoreType": 0,
	"Password": "changeit"
}

Example Response

{
	"Result": 1,
	"Message": "The operation completed successfully.",
	"Id": "b195c1f9-1957-4bdb-a15d-f45159482611"
}