Configure general KMES settings for the RHCS integration
Perform the following tasks to configure the KMES Series 3 for communication with FXPKCS #11:- Create an RHCS role and identity with the correct assigned permissions.
- Enable Host API commands.
Create a role and identity for RHCS
After you create a new role on the KMES Series 3, you assign it to the identity, and subsequently, the FXPKCS11 library uses the identity to connect to the KMES.On the Info tab of the Role Editor window, specify a name for the role, select the Hardened checkbox, and set Logins Required to
1.On the Permissions tab, enable the following permissions:
| Permission | Subpermission |
|---|---|
| Certificate Authority | Add, Upload, Export |
| Cryptographic Operations | Sign |
| Keys | Add |
Go to Identity Management > Identities, right-click anywhere in the window, and select Add > Client Application.
In the Configure Credential window, set the credential Type to Password, Provider to Futurex HSM, and Mechanism to Hardened Password.
Select [ Change ] and set a password for the credential, select [ Save ], and select [ OK ].
The new Password credential now displays under the API Key credential that exists by default.
Enable the Host API commands
Because the Futurex PKCS #11 library connects to the Host API port on the KMES Series 3, you must define which Host API commands to enable for the FXPKCS11 library to use for the RHCS operation. To set the enabled commands, complete the following steps:Go to Administration > Configuration > Host API Options and enable the following commands:
| Command | Description or subcommand (if applicable) |
|---|---|
| ATKG | Manipulate HSM trusted asymmetric key group
|
| ECHO | Communication Test/Retrieve Version |
| RKCP | Get command permissions
|
| RKCY | Create Certificate Authority |
| RKGP | Export Asymmetric HSM Trusted Key |
| RKGS | Generate Signature |
| RKIC | Import Certificate |
| RKLN | Lookup Objects |
| RKLO | Login User |
| RKPK | Pop Generated Key |
| RKRK | Retrieve Certificate |
Configure TLS communication
Perform the following tasks to configure TLS communication between the KMES Series 3 and the Futurex PKCS #11 (FXPKCS11) Library:- Create an X.509 certificate container and Root CA certificate.
- Generate a CSR for the System/Host API connection pair.
- Sign the System/Host API CSR.
- Export the Root CA.
- Export the signed System/Host API TLS certificate.
- Load the exported certificates into the System/Host API connection pair.
- Generate a TLS private key and CSR for the FXPKCS11 library.
- Sign the CSR for the FXPKCS11 library.
- Export the signed **FXPKCS11 **TLS certificate.
Create a container and certificate
Perform the following steps to create an X.509 certificate container and Root CA certificate:In the Certificate Authority window, enter a Name for the certificate container, leave all other fields set to the default values, and select [ OK ].
Right-click the certificate container that you created and select Add Certificate > New Certificate.
On the Subject DN tab, select Classic in the Preset drop-down list and set a Common Name for the certificate, such as
System TLS CA Root.Generate a CSR
Perform the following steps to generate a CSR for the System/Host API connection pair:Under the System/Host API connection pair, uncheck the Use Futurex certificates checkbox and select [ Edit ] next to PKI keys in the User Certificates section.
When warned that SSL will not be functional until new certificates are imported, select** [ Yes ]** to continue.
In the PKI Parameters window, leave all fields set to the default values and select [ OK ]*.
The Application Public Keys window now shows that a PKI key pair is Loaded.
On the PKCS #10 Info tab, select [ Browse ], select a save location for the CSR, specify a name for the file, and select [ Open ].
When prompted that* the certificate signing request was successfully written to the file location that was selected*, select [ OK ].
Select [ OK ] again to save the Application Public Keys settings.
The main Network Options window now shows Loaded next to PKI keys under the System/Host API connection pair.
Sign the CSR
Perform the following steps to sign the CSR:In the file browser, select the CSR that you generated for the System/Host API connection pair and select [ Open ].
Export the Root certificate
Perform the following steps to export the System TLS CA Root certificate:In the file browser, go to the location where you want to save the System TLS CA Root certificate, specify a name for the file, and select [ Open ].
Select** [ OK ]**.
A message box states that the PEM file was successfully written to the location that you specified.
Export the API TLS certificate
Perform the following steps to export the signed System/Host API TLS certificate:In the file browser, go to the location where you want to save the KMES TLS certificate, specify a name for the file, and select [ Open ].
Select [ OK ].
A message box states that the PEM file was successfully written to the location that you specified.
Load the certificates
Perform the following steps to load the exported TLS certificates into the System/Host API connection pair:Select** [ Edit ]** next to Certificates in the User Certificates section for the System/Host API connection pair.
In the file browser, select both the System TLS CA Root certificate and the signed {{k}} certificate, and select [ Open ].
The certificate chain appears in the Verified section.
Generate a TLS private key and CSR
Perform the following steps to generate a TLS private key and CSR for the Futurex PKCS #11 (FXPKCS11) library by using OpenSSL:You must run the commands in this section from a terminal application with OpenSSL.
Open a terminal and run the following command to generate a TLS private key for the FXPKCS11 library:
Shell
The command outputs the private key to
fxpkcs11tlsprivatekey.pem in the same directory where you ran the command.Run the following command to generate a CSR for the FXPKCS11 library:When prompted to enter certificate information, set the default value for each field by pressing the Enter key at every prompt.
Shell
The command outputs the CSR to
fxpkcs11tlscert_req.pem in the same directory from where you ran the command.Sign the CSR
Perform the following steps to sign the CSR for the FXPKCS11 library:In the file browser, select the **FXPKCS11 **CSR,
tls_cert_req.pem.Certificate information populates in the Create X.509 From CSR window.
On the Subject DN tab, select Classic in the Preset drop-down list and set a Common Name for the certificate, such as
FXPKCS11.Export the TLS certificate
Perform the following steps to export the signed **FXPKCS11 **TLS certificate:In the file browser, go to the location where you want to save the **FXPKCS11 **TLS certificate, specify a name for the file, and select [ Open ].
When prompted that the PEM file was successfully written to the location that you specified, select **[ OK ]**again to exit the window.

