Keyfactor Command Service appsetting.json File
The Service appsettings.json file allows you to view or change the Keyfactor Command Service installation and configuration settings.
Windows Installations Under IIS
To update the appsettings.json file for service configuration:
-
Navigate to the Service\Configuration folder on your server, located by default at:
C:\Program Files\Keyfactor\Keyfactor Platform\Service\Configuration -
Browse to open the appsettings.json file in a text editor (e.g. Notepad) and adjust the values as needed as per Table 93: Keyfactor Command Services Configuration Settings and Keyfactor Command Service Automated Tasks.
- Save the 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 ConcurrentWorkflows value set to 1200 and the PurgeAuditHistory service job set to false.
additionalEnvironmentVariables: - name: ConcurrentWorkflows value: '1200' - name: Jobs_PurgeAuditHistory value: false 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 PurgeAuditHistory 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 name—Jobs_PurgeAuditHistory. 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": "NLog_TimerService.config",
"ExtensionsDirectory": "Extensions",
"ActiveDirectoryEnforced": true,
"ConcurrentWorkflows": 1000,
"MetadataGeneration": {
"Version": 1,
"Parallelism": 8,
"ProgressInterval": "00:07:00"
},
"SqlRetryConfiguration": {
"NumberOfTries": "5",
"DeltaTime": "00:00:00.5",
"MaxTimeInterval": "00:02:00"
},
"Jobs": {
"BulkAuditProcessing": true,
"MetadataGeneration": true,
"PrivateKeyCleanup": true,
"PurgeAuditHistory": true,
"EndpointHistory": true,
"ReportingCleanup": true,
"ScheduleSslJobs": true,
"SuspendedWorkflows": true,
"SyncTemplates": true,
"StatsUpdate": true,
"WorkflowCleanup": true,
"CAHealth": true,
"CAThreshold": true,
"CRL": true,
"ExpirationAlerts": true,
"IssuedAlerts": true,
"PendingAlerts": true,
"QueryItems": true,
"Reporting": true,
"SSHKeyRotationAlerts": true,
"AgentNotificationAlert": true,
"CASync": true,
"CollectionQueryAlerts": true,
"UndecryptableSecretsSearch": true,
"CertificateStoreWorkflows": true,
"KeyRotationWorkflows": true,
"ExpirationWorkflows": true,
"RevocationMonitoringWorkflows": true
}
} -
On your Kubernetes server, create a config map containing the appsettings.json file. For example:
sudo kubectl create configmap appsettings-service --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-service-volume configMap: name: appsettings-service volumeMounts: - name: root-cas mountPath: /etc/ssl/certs/ca-certificates.crt subPath: ca-certificates.crt - name: appsettings-service-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 Service available in the appsettings.json file.
Table 93: Keyfactor Command Services Configuration Settings
Setting | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
NLog Config File |
Enter the file path to the NLog_TimerService.config file as a subdirectory of the Service\Configuration directory. The default is: NLog_TimerService.config
This translates to, for example: C:\Program Files\Keyfactor\Keyfactor Platform\Service\Configuration\NLog_TimerService.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 Service directory. The default value is Extensions. This translates to, for example, for Windows installations under IIS: C:\Program Files\Keyfactor\Keyfactor Platform\Service\Extensions
Container installations under Kubernetes: /app/Configuration/Extensions
|
||||||||
Active Directory Enforced | This should be set to false if you are not using Active Directory. An IIS reset will be required to apply this setting if you change it. | ||||||||
Sql Retry Configuration | SQL retry settings (seeKeyfactor Command Changing SQL Retry Settings for more information). | ||||||||
Metadata Generation |
|
||||||||
Jobs |
The jobs run by the Keyfactor Command Service. By default, the Keyfactor Command Service sets all service jobs to run (true). The service jobs can be disabled in the appsettings.json file. Select service jobs have configurable options. For more information, see Keyfactor Command Service Automated Tasks. |