CertStore AddCertStoreType

The POST /AddCertStoreType method will create a certificate store type that will be used for a custom certificate store that extends the Keyfactor Command Agent's Any Agent functionality. The parameters that can be used for this endpointClosed An endpoint is a URL that enables the API to gain access to resources on a server. are shown in Table 702: POST /AddCertStoreType Request Body, while the response format can be found in Table 703: POST /AddCertStoreType Response Body.

Table 702: POST /AddCertStoreType Request Body

Parameter Name Parameter Value
Name The name the certificate store type will have in Keyfactor Command. This parameterClosed A parameter or argument is a value that is passed into a function in an application. is required.
ShortName The short name of the certificate store type. This parameter is required.
AddSupported A Boolean that sets if the certificate store of this certificate store type is allowed to be added to. This parameter is required.
CreateSupported A Boolean that sets if the certificate store of this certificate store type is allowed to be created if missing. This parameter is required.
DiscoverySupported A Boolean that sets if the certificate store of this certificate store type is allowed to be discovered in a discovery scan. This parameter is required.
RemoveSupported A Boolean that sets if the certificate store of this certificate store type allows certificates to be removed from it. This parameter is required.
EnrollmentSupported A Boolean that sets if the certificate store of this certificate store type supports reenrollment. This parameter is required.
EntryPasswordSupported A Boolean that sets if the certificate store of this certificate store type supports an entry password. This parameter is required.
PrivateKeyAllowed

A parameter that sets requirements on the private keyClosed Private keys are used in cryptography (symmetric and asymmetric) to encrypt or sign content. In asymmetric cryptography, they are used together in a key pair with a public key. The private or secret key is retained by the key's creator, making it highly secure. of a certificate being entered into the certificate store. This parameter is required. Valid values are:

Value Name
0 Forbidden
1 Optional
2 Required
LocalStore A Boolean that sets if the certificate store of this certificate store type requires a certificate store server. This parameter is required.
StorePasswordRequired A Boolean that sets if the certificate store of this type requires a password. This parameter is required.
StorePathType

The type used for the certificate store path.

Option Description
Empty Path will be a free form field.
String Path will only be the specified string.
Comma Separated String Path will need to be chosen from the list given.
CustomAliasAllowed A Boolean that sets whether the certificate store of this type allows a custom alias. This parameter is optional.
Powershell A Boolean that sets whether the certificate store of this type uses PowerShell. This parameter is optional.
ServerRegistration A Boolean that sets whether Keyfactor Command needs to prompt for credentials for each client machine that has that certificate store type. This parameter is optional.
JobProperties A comma separated string defining properties that are required when performing management jobs on a certificate store of this type. This parameter is optional.
Properties

A dictionary of any extra properties a certificate store of this type would need. This parameter is optional. If this property is provided, a type is required. Parameters of a property are:

Field Description
DisplayName The name of the property. This parameter is optional.
Type The type of the property. This parameter is required. Valid values are: String, Bool, MC, and Secret
Required A Boolean that sets whether the property is required in the certificate store.
Depends If this is not the first property, this property can depend on another property. The property name is used to determine which property is being depended on.
Value A default Value of the property.

 

Table 703: POST /AddCertStoreType Response Body

Parameter Name Parameter Value
Message Description of the operation outcome, e.g. "The operation completed successfully".
Result

Status code for the operation. Will take one of the following values:

Value Description
1 Success
2 Failure
3 Warning
Data
Value Description
Name The name of the type.
ShortName The ShortName of the type.
StoreType The Id of the store
LocalStore A Boolean if the certificate store is on the local server of the agent.
ServerRegistration Tells whether server registration is needed by Keyfactor Command.
ImportType A value to indicate the source of a certificate record in the Keyfactor Command audit logs.
InventoryJobType The GUID of the inventory job type that is used to register with the Any Agent.
ManagementJobType The GUID of the management job type that is used to register with the Any Agent.
AddSupported A Boolean stating whether an add job will be supported by the certificate store.
RemoveSupported A Boolean stating whether a remove job will be supported by the certificate store.
CreateSupported A Boolean stating whether a create job will be supported by the certificate store.
DiscoverySupported A Boolean stating whether a discovery job will be supported by the certificate store.
EnrollmentSupported A Boolean stating whether an enrollmentClosed Certificate enrollment refers to the process by which a user requests a digital certificate. The user must submit the request to a certificate authority (CA). job will be supported by the certificate store.
InventoryEndpoint The endpoint that will be hit by the agent.
Properties A list of properties that reflect those given in the request.
EntryPasswordSupported A Boolean stating whether an entry password will be supported by the certificate store.
StorePasswordRequired A Boolean stating whether a store password will be required by the certificate store.
PrivatekeyAllowed

An integer notifying the state of the private keys in the certificate store.

Value Name
0 Forbidden
1 Optional
2 Required
StorePathType The value of the store path. If value is an empty string, the field is free form.
CustomAliasAllowed A Boolean stating whether a custom alias will be supported by the certificate store.
JobProperties The properties that will be required when performing a management job on the certificate store with this type.

Example Request

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

{
	"Name": "<Type Name>",
	"ShortName": "<Type Short Name>",
	"AddSupported": true,
	"CreateSupported": false,
	"DiscoverySupported": true,
	"RemoveSupported": true,
	"EnrollmentSupported": true,
	"EntryPasswordSupported": true,
	"PrivateKeyAllowed": <integer 0-2>,
	"LocalStore": true,
	"StorePasswordRequired": true,
	"Powershell":false,
	"CustomAliasAllowed":false,
	"JobProperties":"<List of Job Properties>",
	"ServerRegistration": false,
	"Properties": {
		“<Property Name>": {
			"type":"<Property Type>",
			“DisplayName”: “<Discplay Name>”
		},
		"<Property Name>":{
			"type":"<Type>",
			“displayName”:”<Display Name>”
			"value": "<Value>"
		}
	},
	"StorePathType": <Path Type>
}

Example Response

Status Code: 200

{
	"Message": "The operation completed successfully.”,
	"Result": 1,
	"Data": {
		"Name": "<Name>",
		"ShortName": "<Short Name>",
		"StoreType": <Store Type Id>,
		"LocalStore": true,
		"ServerRegistration": null,
		"ImportType": <Import Type>,
		"InventoryJobType": "<Inventory Job Type Guid>",
		"ManagementJobType": "<Management Job Type Guid>",
		"AddSupported": false,
		"RemoveSupported": true,
		"CreateSupported": false,
		"DiscoveryJobType": "<Discovery Job Type Guid>",
		"EnrollmentJobType": "<Enrollment Job Type Guid>",
		"InventoryEndpoint": “<Inventory Endpoint>",
		"Properties": {
			"<Property Name>": {
				"Type": "<Type>",
				"DisplayName": "<Discplay Name>",
				"Required": false,
				"Depends": null,
				"Value": <Value>
			},
			"<Property Name>": {
				"Type": "<Type>",
				"DisplayName": “<Display Name> ",
				"Required": false,
				"Depends": null,
				"Value": "<Value>"
			 }
		},
		"EntryPasswordSupported": true,
		"StorePasswordRequired": true,
		"PrivateKeyAllowed": <Integer 0-2>,
		"StorePathType": <Store Path Type>,
		"CustomAliasAllowed": false,
		"JobProperties": "<Job Properties>"
	}
}