cryptohub.json. This file tells the module which CryptoHub service to target, how to connect and authenticate, how to handle TLS, how to log, and how to apply key usage policy. This page describes the configuration file’s discovery order, variable substitution, and every field the module reads.
The endpoint download you generate during Installation ships a pre-filled
cryptohub.json for your endpoint, already carrying the connection, authentication, and TLS settings for your instance. Start from that file. Use this page as the reference when you edit the file by hand or need to understand a specific field.This page covers the CryptoHub-backed PKCS#11 module (
libcryptohub-pkcs11.*), which reads cryptohub.json. It is separate from the legacy Futurex PKCS#11 module (fxpkcs11), which uses the XML-based fxpkcs11.cfg file. The two modules do not share configuration. For an introduction to the CryptoHub-backed module, see the Overview.Configuration file location
The module locates its configuration file by checking the following sources in order and using the first one it finds:- The path in the
CHLIBS_CONFIGenvironment variable. cryptohub.jsonin the current working directory.../config/cryptohub.jsonrelative to the current working directory.- A platform-specific static path.
C:\Program Files\Futurex\cryptohub.jsonC:\Program Files\Futurex\config\cryptohub.jsonC:\Futurex\cryptohub.jsonC:\Futurex\config\cryptohub.json
/etc/cryptohub.json
The runtime configuration file must be named
cryptohub.json unless you point to it explicitly with the CHLIBS_CONFIG environment variable. When you set CHLIBS_CONFIG, the file can have any name.Variable substitution
You can use variable substitution in any string field. The module expands the following tokens when it reads the file:
Futurex recommends that you keep secrets such as API keys and passwords out of the file itself and supply them through environment variables with
${env:...}.
Root fields
The configuration file has the following root fields:logging— Log verbosity, destinations, and file rotation.global— The CryptoHub service to target, key protection, request behavior, and object identity.cryptohubs— An array of CryptoHub destinations for load balancing and failover.proxy— An optional HTTP proxy for all CryptoHub requests.authentication— Credentials the module presents to CryptoHub destinations.cluster_authentication— Credentials for the backend balancing cluster.pkcs11— PKCS#11 module behavior and key usage policy.
cng block also exists. It is read by the Windows CNG Key Storage Provider, which shares this same cryptohub.json file. See the CryptoHub CNG developer guide for the cng block.
Logging
Thelogging block controls log verbosity, destinations, and file rotation.
The
file.timezone value determines how the module renders log timestamps:
Global settings
Theglobal block defines the CryptoHub service to target, key protection, request behavior, and how the module derives object identities.
The
key_protection value determines how CryptoHub protects the keys the module uses:
The
cert_id_mode value controls how the module derives CKA_ID for certificate and private-key objects:
CryptoHub destinations
Thecryptohubs block is an array of CryptoHub destinations. The module uses the array for load balancing and failover across destinations.
The
role value determines when the module uses a destination:
The
tls sub-object configures transport security for the destination:
Proxy
Authentication
Theauthentication block defines the credentials the module presents to CryptoHub destinations. It applies globally to all destinations, and it is optional when you use client TLS or mutual TLS.
Cluster authentication
Thecluster_authentication block defines the credentials for the backend balancing cluster. It is optional and uses the same shape as the authentication block.
If you use the anchor HSM cluster, the module uses your authentication credentials by default. If you use a non-anchor HSM cluster, the module uses the system users by default.
PKCS#11 module settings
Thepkcs11 block controls PKCS#11 module behavior and key usage policy.
The
default_usages sub-object sets the allowed usages when a template passes no usage flags:
The
forced_usages sub-object sets usages the module always applies, regardless of the template’s usage flags:
Key usage policy and precedence
The module resolves key usage from three sources, in the following order of precedence:forced_usages— Always applied, and evaluated beforeby_labelanddefault_usages.by_label— Applied when a matching label is found and no forced usage is configured.default_usages— Applied when a template passes no usage flags.
Example configuration
The following minimal configuration targets a single CryptoHub service, validates the server’s TLS certificate against a system CA bundle, authenticates with an API key supplied through an environment variable, and sets default key usages.api_key is read from the CHLIBS_API_KEY environment variable through ${env:...}. Futurex recommends that you supply secrets such as API keys and passwords through environment variables rather than hard-coding them in the file.
