Thales Luna HSM
Configure Thales Luna HSM for supported FortifiedID TLS, signing, and encryption operations.
This guide describes the common runtime requirements and configuration form for using a Thales Luna HSM with supported FortifiedID TLS, signing, and encryption integrations. Where the product uses a Luna keystore, its private or secret key stays in the HSM.
Quick start
Section titled “Quick start”Use this checklist to prepare Luna-backed keys for TLS and for product signing, encryption, or decryption.
- Use Foss Mono
2026.116or later. This is the first Foss Mono release that contains the Luna keystore, TLS, HTTP mTLS, and generic private-key support. - Prepare the Luna partition. The customer needs a reachable partition (or HA group), a Crypto User account, and the key's alias. Provision the key and its certificate chain where the flow uses a certificate, or a persistent AES key for Access JDBC registration encryption. Prefer the partition's stable token label over its numeric slot number.
- Install the Luna runtime in the application environment. Use the same Luna Client,
LunaProvider.jar, and native libraries that work with the customer's validated Luna connection test. AddLunaProvider.jarto the application classpath and make the native libraries available to the JVM. - Register the Luna JCA provider. Add
com.safenetinc.luna.provider.LunaProviderto the JVM security properties before the application starts. The Prerequisites section shows the required JVM options. - Configure the Luna keystore. Set
typetoLuna, provide exactly one oftoken_labelorslot, and store the Crypto User secret in the product's normal secret mechanism. Configure the relevant key alias for each operation. - Keep the truststore outside Luna. Continue to use PKCS#12 or JKS for trusted certificates. Do not add
key_passwordfor a Luna key; Luna authenticates the keystore session with the partition secret. - Test with the customer’s HSM. Start the service and exercise the configured handshake or product flow. Verify the result and match the key operation to Luna audit or monitoring.
Supported use
Section titled “Supported use”The current implementation supports Luna as an identity keystore for:
- incoming HTTPS/TLS listeners
- outbound HTTP mutual TLS (mTLS) clients
- outbound RadSec mutual TLS clients with Foss Mono
2026.167or later
A TLS listener uses keystore and key_alias. The HTTP Client module uses ssl_keystore and ssl_key_alias. For RadSec, set ssl_keystore.type to Luna and put the alias in ssl_keystore.alias. Keep server trust in ssl_truststore.
Product signing
Section titled “Product signing”Foss Mono also provides a generic private-key retrieval path for products that sign data, such as an eID service signing with an EC key. The same type: "Luna" keystore object and key alias are used; Foss Mono preserves an entry password for PKCS#12/JKS while Luna uses the authenticated HSM session and does not use a separate key password.
Integrity Access
Section titled “Integrity Access”Access 3.10.0-RC2 includes Luna support for the flows below. Configure the alias and partition for each key, then run the checks against a provisioned Luna partition.
| Flow | Expected result |
|---|---|
| OIDC and OpenID Federation signing | Verify an ID token, client assertion, or signed federation statement with the corresponding public key, according to the role in use. |
| ExternalFlow | Verify the outgoing JWT with the configured signing key's public certificate. |
| SAML | Verify a signed SAML message or metadata. When using an SP decryption key, confirm that an encrypted assertion can be consumed. |
| OIDC RP response decryption | Complete the RP flow with the configured encrypted ID token and UserInfo response types. |
| eID verifier | Confirm that the eID server accepts the OAuth client assertion and the wallet accepts the proof request. Both signatures use ES256 and the registered verifier key. |
Record the Access build, tested flow, key alias, result, and timestamp. Match each tested signature or private-key decryption to the event in Luna audit or monitoring. Share only sanitised results.
Prerequisites
Section titled “Prerequisites”- A provisioned Luna partition with a Crypto User account and a key with a known alias. Provide the certificate chain for a TLS identity key.
- Thales Luna Client installed in the application runtime environment and configured to reach the HSM or HA group.
LunaProvider.jaravailable on the application classpath.- Luna Client native libraries available to the JVM, for example through the operating-system library path or
java.library.path. - The Luna JCA provider registered before the application opens a
Lunakeystore.
The provider can be registered through the JVM security configuration. The exact provider index is environment-specific; retain the JVM's existing providers and add the Luna provider, for example:
security.provider.13=com.safenetinc.luna.provider.LunaProviderStart the application with a supplemental security-properties file when appropriate:
-Djava.security.properties=/path/to/luna.securityKeystore configuration
Section titled “Keystore configuration”Use type: "Luna" and identify the partition by token_label. A numeric slot is supported for migration or diagnostics, but token labels are preferred because slot numbers can change.
{ "type": "Luna", "token_label": "fortifiedid-tls", "user_type": "CKU_CRYPTO_USER", "password": "${secrets.luna_cu_password}"}| Property | Description |
|---|---|
type |
Must be Luna. |
token_label |
Label of the Luna token or partition. Use exactly one of token_label and slot. |
slot |
Non-negative Luna slot number. Use only when a stable token label is not available. |
user_type |
Luna user role. Defaults to CKU_CRYPTO_USER; CKU_CRYPTO_OFFICER is also supported. |
password |
Luna partition authentication secret. Store it in the product's established secret mechanism and never log it. |
Luna does not use a separate password for each private-key entry. Configure the consuming integration's key alias, but do not require or invent a key_password for Luna.
Configuration
Section titled “Configuration”Use the Luna keystore object as the identity keystore of the supported TLS consumer. The following examples show the complete Luna-specific part of each configuration; retain all other existing listener or client settings.
Incoming HTTPS/TLS listener
Section titled “Incoming HTTPS/TLS listener”For a dynamically configured HTTPS listener, put the Luna object in ssl.keystore and configure the HSM key alias separately:
{ "ssl": { "keystore": { "type": "Luna", "token_label": "fortifiedid-tls", "user_type": "CKU_CRYPTO_USER", "password": "${secrets.luna_cu_password}" }, "key_alias": "https-server", "hsm_event_loop_pool_size": 1 }}ssl.hsm_event_loop_pool_size must be at least 1; the default is 1. Luna listeners use a dedicated Vert.x instance so a synchronous HSM operation during a TLS handshake does not block ordinary listeners.
Outgoing HTTP mTLS
Section titled “Outgoing HTTP mTLS”{ "ssl_keystore": { "type": "Luna", "token_label": "fortifiedid-client-tls", "user_type": "CKU_CRYPTO_USER", "password": "${secrets.luna_cu_password}" }, "ssl_key_alias": "outbound-mtls-client", "ssl_hsm_event_loop_pool_size": 1}ssl_hsm_event_loop_pool_size must be at least 1; the default is 1. Luna-backed HTTP clients use a dedicated Vert.x instance so synchronous HSM operations do not block ordinary HTTP client event loops.
Access JDBC registration encryption
Section titled “Access JDBC registration encryption”For OpenID Federation explicit-registration JDBC encryption with Luna, provide a persistent AES-256 key in the partition. Select the key with credential_encryption_alias, use the partition secret in credential_encryption_keystore.password, and omit credential_encryption_key_password with Luna. Use the same key across all nodes that share the registration database.
Truststores
Section titled “Truststores”Keep ssl.truststore and ssl_truststore as file-based stores for trusted certificates. For RadSec, use PKCS#12 for ssl_truststore or use the default Java truststore.
Test the configuration
Section titled “Test the configuration”- Verify the Luna Client can connect to the intended partition and list the configured alias.
- Start the application with the Luna runtime dependencies and sanitised configuration.
- For server TLS, establish a TLS handshake and verify the served certificate.
- For mTLS, call a server that requires the configured client certificate.
- Confirm in the customer's Luna audit or observability tooling that the HSM performed the signing operation.
- Restart the application and repeat the handshake. Test HA/failover according to the customer's Luna operating procedure when applicable.
For RadSec, send a RADIUS request to a server that requires the client certificate. Verify the response and correlate the TLS signing operation with the configured alias in Luna audit or monitoring.
For Access JDBC registration encryption, write a test registration, restart Access with the same database, partition, and alias, and verify that Access reads the existing registration. Correlate the AES-GCM operations with the configured key in Luna audit or monitoring.
Limitations and troubleshooting
Section titled “Limitations and troubleshooting”- A product path that loads a PKCS#12 file directly does not automatically support Luna. It must first be adapted to use Foss Mono's configurable keystore path.
- Luna support has provider-free automated tests, but all configured HSM handshakes and key operations must be validated in a provisioned customer environment.
- A missing provider produces guidance to install Luna Client, add
LunaProvider.jar, and register the provider. A missing native runtime points to the Luna Client andjava.library.path. - Do not put partition passwords, token PINs, complete HSM configuration, or unsanitised stack traces in logs or support tickets.