2. Start the enclave vHSM server to run with Utimaco HSM.
ocker run --cap-add=IPC_LOCK -p 8200:8200 \ -e ENCLAIVE_LICENSE=$ENCLAIVE_LICENSE \ harbor.enclaive.cloud/enclaive-dev/vhsm:latest \ server -config /etc/vhsm/config.json
3. Check the status of vHSM server: vhsm status
The output is similar to:
vhsm status
Key Value
--- -----
Seal Type pkcs11
Initialized false
Sealed true
Total Shares 0
Threshold 0
Version 1.3.2-0 heads/main-0-g1b8bb7c 2024-10-10T01:15:29+00:00
Build Date n/a
Storage Type file
HA Enabled false
4. Initialize vHSM to use the HSM initial token value: vhsm operator init
The output is similar to:
[root@enclaive bin]# vault operator init
Recovery Key 1: ovZbTXwkQnatlgla7KD5fcZW4rSv4WJkf8ogwR2KoN0
Recovery Key 2: RxZhmLQ24XGWbhwhr2OiP6VcOVhKWSNzY+63EVM6cVTH
Recovery Key 3: m0xO/kpDG+OneZylWx8o6gyFZ6acl6eeNnrsYyTWk+ls1
Recovery Key 4: qL45SP/uKTspXdeExFgx0P22rjy5eHncvIY0Y1B9UC83
Recovery Key 5: twdDxXfjKXEgkIO+vJ6sB+794bHVqzWh3QTVLSzpYfg
Initial Root Token: hvs.KxttXNOYSLu16KGEd1cyKpm5
Success! Vault is initialized
Recovery key initialized with 5 key shares and a key threshold of 3. Please securely distribute the key shares printed above.
5. Verify that the keys got generated into the HSM: p11tool2 slot=<slot_no> loginuser=<slot_PIN> listobjects
6. Check the status of vHSM again to verify that it is initialized and unsealed: vhsm status
The output is similar to:
Key Value
--- -----
Seal Type shamir
Initialized true
Sealed false
Total Shares 1
Threshold 1
Version 1.3.2-0 heads/main-0-g1b8bb7c 2024-10-10T01:15:29+00:00
Build Date n/a
Storage Type inmem
Cluster Name vault-cluster-58e9dc60
Cluster ID 1abf9eb1-3ae1-1652-7058-e9d73b08d105
HA Enabled false
7. Log in to vHSM using the initial Root token that you saved: vhsm login <initial_root_token_value>
The output is similar to:
root@enclaive ~ % vhsm login
Token (will be hidden):
Success! You are now authenticated. The token information displayed below is
already stored in the token helper. You do NOT need to run "vhsm login" again.
Future vHSM requests will automatically use this token.
Key Value
--- -----
token hvs.hidxumzILZ6yk044XQC07bxS
token_accessor E5leo0H9hmyinJ0n8eqfTtH5
token_duration ∞
token_renewable false
token_policies ["root"]
identity_policies []
policies ["root"]
Cluster ID 1abf9eb1-3ae1-1652-7058-e9d73b08d105
HA Enabled false