Keyfactor Command CA Connector API appsetting.json File
The CAConnectorAPI appsettings.json configuration file allows you to change default CA A certificate authority (CA) is an entity that issues digital certificates. Within Keyfactor Command, a CA may be a Microsoft CA or a Keyfactor gateway to a cloud-based or remote CA. connector API An API is a set of functions to allow creation of applications. Keyfactor offers the Keyfactor API, which allows third-party software to integrate with the advanced certificate enrollment and management features of Keyfactor Command. installation configuration settings.
Windows Installations Under IIS
To update the appsettings.json file:
-
Navigate to the CAConnectorAPI\Configuration folder on your server, located by default at:
C:\Program Files\Keyfactor\Keyfactor Platform\CAConnectorAPI\Configuration - Browse to open the appsettings.json file in a text editor (e.g. Notepad) and adjust the values as needed.
- Save the file.
Figure 459: Sample CAConnectorAPI Appsettings.json File
Container Installations Under Kubernetes
The configurations from the appsettings.json file can be updated in one of two ways for container installations:
-
To update one or two settings, set an environment variable in your custom values file.
-
To update a large number of settings or the entire contents of the appsettings.json file, create a config map containing the appsettings.json file contents and mount it as a volume to replace the existing appsettings.json file.
To set an environment variable for one or two configuration values:
-
On your Kubernetes server, edit your values file to add an additionalEnvironmentVariables section (if one does not already exist) and environment variable name(s) and value(s) for the setting(s) to change. For example, the following shows a portion of the example values file (see Install Keyfactor Command in Containers Under Kubernetes) with the JobStart_ConnectRetryOptions_DelayInMinutes value set to 2.
additionalEnvironmentVariables: - name: JobStart_ConnectRetryOptions_DelayInMinutes value: '2' volumes: - name: root-cas configMap: name: ca-roots items: - key: ca-certificates.crt path: ca-certificates.crt volumeMounts: - name: root-cas mountPath: /etc/ssl/certs/ca-certificates.crt subPath: ca-certificates.crt
Note: Notice that the DelayInMinutes parameter A parameter or argument is a value that is passed into a function in an application. is referenced by its full name, including its parent parameter names—JobStart_ConnectRetryOptions_DelayInMinutes. Likewise, a SQL retry configuration setting would be, for example, SqlRetryConfiguration_NumberOfTries. -
Load the new values, referencing the deployment name, namespace, your customized values file, the helm chart, and version. For example:
sudo helm upgrade Helm_Deployment_Name --namespace keyfactor-command --values values-local.yaml oci://repo.keyfactor.com/charts/command --version 1.0.0
To provide the appsettings.json file as a config map:
-
On your Kubernetes server, create an appsettings.json file with the full contents of the file, including the updates you wish to make. For example:
Copy{
"NLogConfigFile": "Configuration/NLog_CAConnectors.config",
"ExtensionsDirectory": "Extensions",
"SqlRetryConfiguration": {
"NumberOfTries": "5",
"DeltaTime": "00:00:00.5",
"MaxTimeInterval": "00:02:00"
},
"JobStart": {
"ConnectRetryOptions": {
"DelayInMinutes": 2
}
}
} -
On your Kubernetes server, create a config map containing the appsettings.json file. For example:
sudo kubectl create configmap appsettings-caconnector --namespace keyfactor-command --from-file=/opt/kyf_command/appsettings.json -
Edit your values file to add a volume and volumeMount for the config map of the appsettings.json file. For example, the following values file section shows the example root trusts volume (see Install Keyfactor Command in Containers Under Kubernetes) and the appsettings volume.
volumes: - name: root-cas configMap: name: ca-roots items: - key: ca-certificates.crt path: ca-certificates.crt - name: appsettings-caconnector-volume configMap: name: appsettings-caconnector volumeMounts: - name: root-cas mountPath: /etc/ssl/certs/ca-certificates.crt subPath: ca-certificates.crt - name: appsettings-caconnector-volume mountPath: /app/Configuration/appsettings.json subPath: appsettings.json
-
Load the new values, referencing the deployment name, namespace, your customized values file, the helm chart, and version. For example:
sudo helm upgrade Helm_Deployment_Name --namespace keyfactor-command --values values-local.yaml oci://repo.keyfactor.com/charts/command --version 1.0.0
Configuration Settings
The following table shows the configuration settings for the Keyfactor Command CA Connector The Keyfactor CA Connector is installed in the customer environment to provide a connection between a CA and Keyfactor Command when a direct connection is not possible. It is supported on both Windows and Linux and has versions for Microsoft (Windows only) or EJBCA CAs. API available in the appsettings.json file.
Table 92: Appsetting.json File Parameters - CAConnectorAPI
Setting | Description |
---|---|
NLog Config File |
Enter the file path to the NLog_ClaimsProxy.config file as a subdirectory of the CAConnectorAPI directory. The default is: Configuration\\NLog_CAConnectors.config
This translates to, for example: C:\Program Files\Keyfactor\Keyfactor Platform\CAConnectorAPI\Configuration\NLog_CAConnectors.config
This value is not used for container installations under Kubernetes. |
Extensions Directory |
Enter the file path to the extensions to be loaded by the extension loader (for registration handler, workflow step, etc... support). For Windows installations under IIS, this is a subdirectory of the CAConnectorAPI directory. The default value is Extensions. This translates to, for example, for Windows installations under IIS: C:\Program Files\Keyfactor\Keyfactor Platform\CAConnectorAPI\Extensions
Container installations under Kubernetes: /app/Configuration/Extensions
|
Sql Retry Configuration | SQL retry settings (seeKeyfactor Command Changing SQL Retry Settings for more information). |
Job Start |
Settings to control the retry interval the job start service uses in attempting to establish a connection to RabbitMQ. |