OpenBao auto-unseal with HSM and cloud KMS

Auto-unseal lets an OpenBao cluster start without operators re-entering Shamir key shares, but it moves trust to the seal and the recovery keys. This page covers the seal options, the build sequence and the failure points to plan for.

On this page

How OpenBao auto-unseal with an HSM or cloud KMS replaces Shamir unsealing

If your team unseals OpenBao by hand after every restart, the change you are looking for is a seal that protects the root key without a person entering key shares at each start. In OpenBao, the seal wraps the root key, which in turn encrypts the data the server stores. With a Shamir seal, the unseal key shares are that protection, so every restart needs a quorum of people. With an auto-unseal seal, an HSM or cloud KMS holds the wrapping step and the node can unseal itself when it starts, provided it can reach that key store. Plan the network path, credentials and availability of the key store as carefully as you would plan the OpenBao cluster itself, because a node that cannot reach its seal cannot come back.

Keep recovery keys separate from the seal in your design. Recovery keys are the material you use for operations that still need human approval, such as certain administrative tasks, and they are not a substitute for the seal. Decide now who holds them, how they are split, where they are stored and how a rotation is witnessed, and record that decision with the seal design. Do not assume that moving to auto-unseal removes the need for a documented unseal and recovery ceremony.

The seal types you can use depend on the OpenBao release line. External KMS plugins arrived in 2.6.0, and the current line is 2.7.x, so a seal that appears in older guides may be implemented differently or not at all in your target version. Before you choose a design, confirm the exact seal list, including PKCS#11 HSMs, KMIP and cloud KMS options, in the OpenBao seal documentation for the version you will run. That page is not part of the sources used for this outline, so treat any list you find elsewhere as unverified until you check it against the release you plan to deploy.

What you need before choosing a seal

Auto-unseal moves the protection of OpenBao's root key to a device or service you do not run inside OpenBao itself. The cards below cover the decisions and checks that have to be settled before you pick a seal, because each one changes which seal types are workable and how recovery behaves when the external dependency fails.

Cluster version and storage backend

Start by recording the OpenBao version you run or plan to run, and whether your nodes use integrated storage (Raft) or PostgreSQL. The seal choice must match the version line you deploy, so confirm in the target release notes which seal types and plugin mechanisms that line supports. Note the storage backend too, because it determines how you back up data and how you handle a node rejoining after an outage.

Latest patch in facts
2.7.1
Storage backend docs

HSM or KMS account and key ownership

Decide who owns the HSM partition or cloud KMS account, who holds administrative rights, and who can disable or delete the key that wraps OpenBao's root key. Ask the vendor whether key deletion has a waiting period and whether cross-account access is supported. Losing that key without a recovery path makes the cluster unrecoverable, so write the owner, approval path and break-glass process into your runbook before the seal is configured.

Network paths from every node

Every OpenBao node must reach the seal endpoint, not only the active node, because each one needs to unseal after a restart or failover. Map the routes from each node through firewalls, proxies, private endpoints and DNS to the HSM network or KMS endpoint. Test them from each node with the same service identity that OpenBao will use, and confirm in the vendor documentation which ports and protocols the seal connection requires.

TLS trust for the seal connection

Identify which certificate authority signs the seal endpoint's certificate, and install that trust chain on every OpenBao node. For KMIP or PKCS#11 gateways, confirm whether client certificates are required and who issues them. Document certificate expiry dates and the renewal owner, since a lapsed certificate on the seal connection will stop unsealing just as it would stop any other dependency.

Documented Shamir recovery plan

Auto-unseal does not remove recovery keys. Confirm how recovery key shares are generated, stored, split between custodians and tested, and who can authorize a recovery operation when the seal service is unavailable. Check the OpenBao unseal documentation for the operations that still require recovery keys in your version, and rehearse them in a non-production cluster before you rely on the plan.

HA concepts docs

Migration and rekey requirements

If you are moving an existing cluster from manual unsealing to an external seal, check whether a rekey or seal migration step is required for that version and where your cluster was bootstrapped. Confirm the procedure with the release notes and the migration guide for your starting point, and plan a maintenance window that covers every node. Do not change the seal on a cluster until a verified backup exists and recovery keys are confirmed to work.

Migration guide

Choosing between PKCS#11, KMIP and cloud KMS seals

A PKCS#11 seal uses a hardware security module that your organization owns or leases, and that OpenBao reaches through a vendor-supplied PKCS#11 library on the node. The root key is wrapped or operated inside the module, so the cryptographic operation runs in hardware you control. This suits organizations that already run HSMs for certificate authorities or payment keys and want one custody model.

  • Key ownership: Your security team owns the key material and the HSM administrator roles, not the OpenBao project or any cloud provider.
  • Where the operation runs: Inside the HSM, with the PKCS#11 library on each OpenBao node as the bridge.
  • What operators maintain: Library versions matched to the HSM firmware, slot and key lifecycle, and the credentials used by the OpenBao process.
  • Network position: The HSM is usually on a restricted segment, so reachability from every node and from disaster recovery sites must be designed in.
  • Decision signal: Choose this family when policy already requires on-premises or dedicated hardware custody.

Before committing, confirm with the OpenBao seal documentation which HSM models and PKCS#11 library versions are supported, and ask the HSM vendor how it handles failover between appliances.",

How the root key moves from the seal to the cluster at startup

The diagram starts with an OpenBao node booting and reading its seal configuration, then sends a request to the seal provider, which can be an HSM over PKCS#11, a KMIP server or a cloud KMS. The provider returns the wrapped key material, and the node unwraps the root key into memory, which is what unseals the cluster. The trust boundary sits between OpenBao and the seal provider, so the key never leaves the provider in plain form. Check that the storage backend holds only encrypted data and that standby nodes receive the unsealed state through the active node.

Startup path from the seal provider to the active and standby nodes, with the trust boundary marked.

How to move a running cluster from Shamir unseal to auto-unseal

This sequence moves an existing OpenBao cluster from manual Shamir unsealing to an automatic seal backed by an HSM or cloud KMS, one node at a time, with a verification check after each change so the cluster stays recoverable throughout.

  1. Confirm release line and target seal type

    Record the OpenBao version running on every node and check that it matches the release line whose seal documentation you will follow. The v2.7.0 and v2.7.1 releases and the v2.6.4 patch are the current references for the 2.6 and 2.7 lines, so confirm which line your cluster is on before you choose a seal. Decide between a PKCS#11 HSM, KMIP, a cloud KMS or the external KMS plugins added in 2.6.0, and confirm with your vendor that the device or service is supported for that version. Done when the version, target seal and supporting documentation are written into the change record.

  2. Prepare seal key and credentials

    Create the key object in the HSM or cloud KMS and a dedicated identity for OpenBao with only the permissions the seal needs, such as wrap and unwrap on that one key. Store the PKCS#11 PIN, KMIP client certificate or cloud credentials in the secret source your platform team already controls, not in the OpenBao configuration file. Test the credentials from a node that will run OpenBao, outside the cluster, so a failure is found before any seal change. Done when a test encrypt and decrypt round trip succeeds from each node.

  3. Back up storage and record recovery material

    Take a snapshot or backup of the storage backend (integrated storage or PostgreSQL) and confirm that it can be restored in a test environment. Locate the current unseal keys and the root token generation records, and confirm that the people who hold Shamir shares can still produce them. During a seal migration, the existing recovery keys become the material you need, so record which keys are required and who holds them. Done when the backup restore test passes and the recovery holders have confirmed their shares are accessible.

  4. Add the seal stanza to one node

    Using the configuration reference for the target version, add the seal stanza to the configuration of a single standby node. Remove any configuration that no longer applies to the new seal, and remove disable_mlock if it is still present, since OpenBao stopped using mlock in 2.0.0. Restart that node so it reads the new configuration and reports its seal status. Done when the standby starts, shows the expected seal type and stays in a sealed or unsealed state consistent with the migration step the documentation describes.

  5. Run the documented seal migration procedure

    Run the seal migration procedure documented for your target version, using the exact commands from the OpenBao seal documentation for that release, not commands copied from another version or from older Vault guides. Follow the order it gives for the active node and the standbys, and keep the Shamir recovery holders available until the procedure says the migration is complete. Do not rekey or change the root key without the documented step. Done when the active node reports the new seal as active and the procedure's completion checks pass.

  6. Roll the change to remaining nodes

    Apply the same seal stanza to each remaining node one at a time, restarting each node only after the previous one reports a healthy state. After each restart, confirm seal status from the node itself and from the cluster view so that every node shows the same seal type. Test a restart of one standby and confirm that it unseals automatically with the HSM or KMS, without any operator entering key shares. Done when every node reports the new seal and a standby restart returns to unsealed with no manual input.

  7. Verify recovery and audit logging

    Confirm that recovery keys for the new seal are recorded and stored according to your key custody rules, and that the old Shamir material is retired or kept under the same controls. Generate a test secret read and check that the audit device records the request as expected, since the audit path must keep working through the seal change. Document the seal type, the key identifier, the owners of the key and the restore procedure in your operations runbook. Done when the audit entry appears for the test request and the runbook has been reviewed by the people who will restore the cluster.

Which seal settings map to which keys, identities and recovery material

This table maps each auto-unseal setting to the system that holds its secret or key, the role that should own it, and how often to review it. Read it as an ownership checklist before go-live, and confirm exact configuration keys in the seal documentation for your chosen seal type.

SettingSystem holding the secret or keyOwner roleRotation or review note
Seal type (PKCS#11, KMIP, cloud KMS or external plugin)OpenBao server configuration filePlatform engineering leadReview when changing seal type; a change needs a planned migration, so confirm the procedure in the seal documentation first
Key name or key identifierHSM partition or cloud KMS key recordSecurity or key custody ownerConfirm the identifier is stable and not recreated; a replaced key can block unsealing
Credential used by OpenBao to call the sealHSM user PIN or cloud workload identity, stored in a secrets vault or host identityPlatform engineering lead, with security sign-offRotate on the schedule your key policy sets; confirm how the seal reloads a rotated credential
Key permissions for the OpenBao identityHSM or cloud KMS access policyCloud or infrastructure IAM administratorReview least privilege at each access review; the identity should only encrypt and decrypt with the seal key
TLS trust store for the HSM or KMS endpointCertificate bundle on each OpenBao nodeSecurity engineering or PKI ownerTrack expiry dates for each CA in the chain; a missing or expired CA stops the seal from reaching its endpoint
Recovery key sharesPrinted or sealed custody records held by named individuals, separate from the seal keyNamed key custodians, with an independent witnessConfirm the share count and threshold in the seal documentation; review custodian lists when staff change
Recovery key usage logCeremony record and audit logCompliance or security leadRecord every use of a recovery share; test the recovery procedure on a non-production cluster
Break-glass administrator accessDocumented escalation list and sealed account recordsCISO or delegateReview membership each quarter and after every personnel change

Protecting the seal, the recovery keys and the audit trail

Auto-unseal moves the trust point from people holding key shares to the seal device and its credentials. The controls below keep that trust point narrow, separate who can change it from who can recover with it, and leave a record of every seal and unseal event.

Separate HSM and KMS administration from recovery

The people who administer the HSM partition or cloud KMS key should not also hold the recovery keys that can restore OpenBao if the seal fails. Split these duties across different people and approval paths, so no single administrator can both reach the root key path and recover the cluster alone. Confirm this split in writing before go-live, including who can rotate the seal key and who approves a recovery.

Least-privilege seal credentials

Give OpenBao a dedicated HSM user or cloud identity that can only perform the wrap and unwrap operations the seal needs, and nothing else. Avoid reusing administrator accounts or broad service roles. Check the exact permissions your HSM vendor or cloud provider requires for the seal operations, because those requirements differ by product and version.

Treat the seal credential like the root token

A compromised seal credential can expose the path to the root key, so it deserves the same review, rotation and access logging as the root token. Record who can read it, where it is stored and when it was last rotated. Plan a rotation procedure and rehearse it, since changing the credential on a running cluster needs a documented sequence.

Restrict network paths to the seal endpoint

Allow only the OpenBao nodes to reach the HSM, KMIP server or KMS endpoint, and block that path from workstations and general application subnets. For cloud KMS, pair network restrictions with private endpoints where the provider offers them. Verify the rules from both sides: confirm OpenBao reaches the seal, and confirm other hosts cannot.

Protect the seal credential on each node

Each OpenBao node holds the material it needs to contact the seal, so the file, environment variable or secret store entry that provides it must be readable only by the OpenBao service account. Restrict file permissions, keep the credential out of shell history and configuration templates committed to source control, and confirm that backups of node disks are encrypted and access-controlled.

Audit seal and unseal events

Forward OpenBao audit logs and the HSM or KMS provider's own access logs to a store your security team controls, and alert on unexpected seal-related errors, failed unwrap operations and changes to seal configuration. Test that an unseal after a node restart produces the events you expect, so that a silent failure does not hide behind normal restarts.

How recovery keys work once auto-unseal is on

With auto-unseal enabled, the recovery key shares no longer open the cluster on restart. The seal does that automatically. Recovery shares are used for a smaller set of administrative operations, such as generating a new root token or other tasks the documentation reserves for recovery, so the shares become a control you must govern rather than a routine step. Decide before go-live who holds each share, how many holders must combine shares for an operation, where the shares are stored, and who approves and records each use. Write that ceremony down and rehearse it, because the people who need the shares are often not the people who ran the initial setup.

Losing the seal's key material, or the recovery shares that go with it, can leave the data in storage unrecoverable. A cloud KMS key that is disabled or scheduled for deletion, or an HSM partition whose credentials or key objects are gone, can block the cluster from starting in a way that no runbook can reverse. Confirm for your target version exactly which operations require recovery shares, what the cluster does when the seal is unavailable, and whether any step requires the original Shamir shares. Check the behavior in the OpenBao documentation rather than relying on memory of Vault behavior.

Test recovery on a non-production cluster that uses the same seal type, key policy and share count as production. Practice a seal outage, a key rotation on the seal side and a root token regeneration using the documented ceremony, and time how long your holders take to assemble. Record what each test proves and what it does not. Keep a copy of the seal configuration, key identifiers and access policies in a location separate from the cluster, and make sure at least two people can complete the procedure without the engineer who designed it.

Why auto-unseal fails at startup and how to fix it

This table maps the startup failures most often seen with HSM and cloud KMS seals to their likely causes and to checks an operator can run. Read each row from the symptom in the log or status output toward the first check, and work through the rows in order when a node will not unseal. The main takeaway is that most failures trace to reachability, trust, or permissions changes made outside OpenBao, so compare configuration and key state before changing the seal itself.

SymptomLikely causeFirst checks and fix
Node stays sealed and logs show connection timeouts to the sealNetwork path, DNS, or firewall rule blocks the node from the HSM, KMIP endpoint, or cloud KMS APITest name resolution and TCP reachability from the failing node only. Compare the node's egress rules with a working node, then open the specific port or endpoint in the firewall or security group.
Logs report a certificate verification or unknown authority error on the seal connectionTLS certificate or trust bundle mismatch, often after a certificate renewal on the KMIP or proxy sideCheck the CA bundle path and the server certificate chain presented by the endpoint. Confirm the configured trust file matches the issuing CA on every node, then restart the affected node.
Unseal fails with an authentication or credential error after a period of normal operationExpired, rotated, or revoked seal credential, such as a client certificate, API key, or workload identityCheck the credential's expiry date and whether the secret or identity was rotated. Update the seal configuration on every node with the current credential, then confirm login with a status check.
Startup reports that the PKCS#11 slot, token, or key label cannot be foundHSM slot renumbered or key label changed after a firmware, module, or library updateList slots and key objects with the vendor's PKCS#11 tooling using the same library path OpenBao loads. Correct the slot identifier or key label in the seal block, and confirm the module path points to the version the HSM supports.
Cloud KMS unseal returns permission denied or key disabledKMS key disabled or scheduled for deletion, or the decrypt permission removed from the node identityCheck the key state and its version in the provider console or CLI. Re-enable the key if it was disabled by mistake, and restore the decrypt permission for the exact identity the node uses.
Some nodes unseal and others do not after a seal migrationPartial migration left nodes with mixed seal configuration or mismatched key referencesDiff the seal stanza and related environment variables across all nodes. Make every node reference the same seal type and key, then restart nodes one at a time and confirm each returns to unsealed.
Recovery key or recovery share is rejected during a manual operationRecovery shares came from a different initialization, were generated before a rekey, or are being entered against the wrong key setConfirm which initialization the shares belong to and record the share count and threshold from the status output. Test shares against a non-production cluster first, and rekey only through a documented procedure with the current shares.

What auto-unseal costs and what it asks from your team

What drives the cost of OpenBao auto-unseal with an HSM or cloud KMS?

The main cost drivers are the seal target itself, the implementation effort, and how many clusters and environments need the same pattern. An HSM carries hardware, licensing and support charges, while a cloud KMS is billed by the provider, usually per key and per request. Implementation effort depends on how many clusters, namespaces and environments need a seal, whether each one uses a separate key, and how mature your existing key custody process is. Ask any partner to itemize hardware or subscription pass-through costs, DeployOpen's labor for design and testing, change-window support, and recovery drills as separate lines. Confirm the current fee schedule with your HSM or cloud provider, since those figures are set by the vendor and change over time.

Can our own team set up OpenBao auto-unseal without outside help?

Yes, if your team already administers the seal target and has a tested recovery plan. The work needs people who can manage HSM partitions or cloud KMS keys and IAM policies, configure the seal stanza in OpenBao, and run a controlled migration from Shamir keys to the new seal. The harder part is usually the recovery side: confirming that recovery key holders can still act, that a restore works, and that the team knows what happens when the seal endpoint is unreachable. If those skills are thin in-house, a partner can share the design and testing load while your staff keep ownership of the keys and runbooks.

How much do change windows and testing affect the timeline?

Change windows and testing usually shape the timeline more than the configuration itself. Moving a production root key from Shamir unsealing to an auto-unseal seal changes how every node starts after a restart, so it normally needs a planned window, a rollback path and a non-production rehearsal first. Testing should cover node restarts, seal endpoint outages, key rotation and recovery key use. The number of clusters, the approval steps in your change process and the availability of key custodians all add time. Ask for the rehearsal scope and the number of windows in the written plan rather than a single date.

What should a quote for auto-unseal itemize?

A useful quote separates one-time work from recurring costs and names who pays for each item. Ask for the following lines to be stated explicitly:

  • Discovery of current unseal, key custody and recovery procedures
  • Seal design for each HSM or KMS target, including key and partition layout
  • Non-production rehearsal and production migration, with the number of change windows assumed
  • Recovery drill and runbook updates
  • Hardware, subscription or cloud usage that will be billed directly to you
  • Any support or retainer terms after handover

Each line should name its assumptions, such as cluster count and the environments covered, so you can compare quotes on the same basis.

What does our team need to provide for the engagement?

Your team needs to provide access and decisions that only your organization can give. Expect to supply access to the HSM or cloud KMS account, administrative rights for seal key creation, network paths from each OpenBao node to the seal endpoint, and change approval for each window. You also need to name recovery key holders, confirm who can authorize a recovery and keep their contact details current. Where the seal is a cloud KMS, your cloud team must confirm IAM roles and any private endpoints. Agree on these items in the written scope, because missing access is one of the most common causes of delay.

What happens when the seal vendor or OpenBao version changes?

A seal vendor change, HSM firmware update or new OpenBao minor release can affect how nodes unseal, so each change needs a compatibility check before it reaches production. Confirm with the HSM or cloud KMS provider which library versions, API changes and deprecations apply to your setup. For OpenBao, review the release notes for the version you run and test the upgrade path in a non-production cluster first. Keep recovery keys and seal configuration documented so a failed change can be reversed. Ask any partner how upgrade testing and retesting after vendor changes are scoped and billed, and whether that work is covered by a support retainer.

How DeployOpen scopes, builds and supports the seal integration

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure, including cloud accounts, data centers and air-gapped networks. For OpenBao auto-unseal, that means the seal design, the key custody model and the recovery procedure are agreed in writing before any configuration changes are made to a running cluster.

How we scope

  • Engagements are fixed-scope, with the seal type, cluster topology and recovery procedure agreed in writing before work starts.
  • The written scope lists which OpenBao nodes move from Shamir unsealing to an HSM, KMIP or cloud KMS seal, and in what order.
  • Scope also records who holds recovery keys, how they are stored, and which compliance evidence the client needs afterward.

How we build

  • The seal provider is configured and tested in a non-production OpenBao cluster that mirrors the client's production topology.
  • Migration from Shamir to an auto-unseal seal is rehearsed, including the recovery key steps, before it is applied to production.
  • Seal connectivity, key permissions and failure behavior are tested, including what happens when the HSM or KMS endpoint is unreachable.

How we hand over

  • The client receives configuration documentation covering the seal stanza, key references, network paths and service account permissions.
  • Runbooks describe recovery key custody, the unseal and seal-migration procedures, and the steps for rotating the seal key.
  • Test evidence from the staging and production verification is delivered so the client's security and compliance teams can review it.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, including review when OpenBao releases change seal behavior.
  • Support can cover periodic recovery drills and checks that the seal endpoint, permissions and recovery keys still work as documented.
  • Before any OpenBao version upgrade, the seal path is retested in staging, using the release notes supplied by the project as the reference.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.