Skip to main content
In this guide, we’ll show you how to configure one Vault cluster as a centralized Transit auto-unseal backend for another Vault cluster. Using Vault’s Transit Secrets Engine, the target cluster will automatically unseal during initialization, reducing manual intervention.

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 enable transit:

1.2 Create an Encryption Key

Create a new key named unseal-key:

1.3 Define an Unseal Policy

Create a file named policy.hcl with the following content:
Upload the policy:

1.4 Create a Token for Auto Unseal

Generate a token scoped to the unseal 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:
You should see your recovery keys and root token. Immediately after, Vault will auto-unseal:
The Sealed field should read false, and Recovery Seal Type will switch to shamir.

4. Post-Unseal Operations

Log in with the initial root token:
Enable additional engines and store sample data:
Restarting Vault will now preserve the unsealed state:

Conclusion

You’ve successfully set up a centralized Transit Secrets Engine to auto-unseal a Raft-backed Vault cluster. This setup automates unsealing, streamlines recovery, and maintains best practices for security and operations.

Watch Video