Test PKI operations
This section shows how to initialize the vault and then test the PKI operations.
Before performing PKI operations, you must initialize, unseal (if required), and log in to Vault.
In a different terminal window from where Vault is running, set the VAULT_ADDR and PIN environment variables.
Set the PIN value to the identity password configured inside the <CRYPTO-OPR-PASS> tag in the fxpkcs11.cfg file.
Check the Vault status.
The output should look similar to the following example:
Initialize Vault.
We do not recommend using 1 for both the key shares and the key threshold in production.
The output should look similar to the following example:
If you did not configure HSM auto unseal, you must unseal Vault manually:
Log in to Vault.
Generate a managed key on the for the Root CA.
You must always set the value specified in the token_label field to Futurex.
The value specified in the library field must match the value set in the name field of the kms_library stanza in the following Vault configuration file.
Generate a managed key on the for the Intermediate CA.
Verify that the key configuration has been written to Vault.
Verify that the key configurations are valid by test signing some data.
Enable the PKI secrets engine for the Root CA.
Enable the PKI secrets engine for the Intermediate CA.
Create a Root CA certificate with its corresponding managed key and output it to a file.
Verify the certificate looks correct.
Create a Certificate Signing Request (CSR) for the Intermediate CA from the managed key generated on the
Create a CSR for the Intermediate CA with its corresponding managed key and output it to a file.
The following command requires installing the jq package, which processes JSON output, on your system.
Verify the CSR looks correct.
Issue the Intermediate CA certificate from the CSR by using the managed Root CA and output it to a file.
The following command requires installing the jq package, which processes JSON output, on your system.
Write the signed Intermediate CA certificate to Vault.
Create a new role.
Issue a leaf certificate.