Environment Overview
We have two Vault clusters running in an AWS environment:
Open SSH sessions to both nodes before proceeding:
Ensure that both nodes can communicate over port
8200 and that the Vault CLI is installed and in your PATH.1. Configure the Transit Cluster
1.1 Enable the Transit Secrets Engine
Verify existing engines and enabletransit:
1.2 Create an Encryption Key
Create a new key namedunseal-key:
1.3 Define an Unseal Policy
Create a file namedpolicy.hcl with the following content:
1.4 Create a Token for Auto Unseal
Generate a token scoped to theunseal policy:
Save the
token output securely. You will reference it in the target cluster’s configuration (for example, by exporting it as VAULT_SEAL_TOKEN).2. Configure the Target Cluster
2.1 Verify Vault Status
On the target node, check that Vault is initialized and sealed:2.2 Update Vault Configuration
Edit/etc/vault.d/vault.hcl to include your Raft storage and the transit seal stanza:
2.3 Restart Vault
Restart and verify that the seal type is now Transit:3. Initialize and Verify Auto Unseal
Initialize the target cluster:Sealed field should read false, and Recovery Seal Type will switch to shamir.