OpenBao auto-unseal with DuoKey SD-HSM

Connecting OpenBao's PKCS#11 seal to a DuoKey Software Defined HSM so the cluster unseals without manual key shares, with the trade-offs and checks to complete before go-live.

On this page

When OpenBao auto-unseal with DuoKey SD-HSM fits your key custody model

Auto-unseal with DuoKey SD-HSM fits when you want OpenBao restarts and failovers to unseal without people holding Shamir shares, and your key custody rules require the root key to be protected by a hardware-backed module. OpenBao starts sealed. Its encryption key is held encrypted by a seal, and under a PKCS#11 seal the unwrapping step is performed by an HSM that OpenBao reaches through a PKCS#11 library. Once the HSM answers, the node unseals without an operator entering shares. That removes the unseal ceremony from every node restart, but it also moves trust to the HSM and to whoever can administer it, so the decision is about custody, not convenience alone.

A software defined HSM tenant or an on-premises DuoKey instance is the right fit when your policy wants key material in a dedicated HSM boundary, but you do not want to buy and rack a physical appliance for each site. Compare the options against your own rules: where the key must reside, who may operate the HSM, whether the HSM must sit inside your network or in a vendor-hosted tenant, and how your auditors expect key use to be logged. If your policy accepts a cloud KMS, a native KMS seal may be simpler to operate. If it requires that an unseal source be independent of any single cloud account, the HSM path deserves a closer look.

Before you commit, confirm with DuoKey the details this page does not state: which PKCS#11 library version and mechanisms the tenant or instance exposes, how key objects are created and labeled, how the library is packaged for the OpenBao image, how the tenant is reached from your network, and what happens during vendor maintenance or an outage. Then plan for the dependency: if the HSM is unreachable, a restarting node cannot unseal, so you need a documented fallback, monitoring of HSM reachability and a tested recovery path. Confirm the recovery keys and procedure with your own security team before go-live.

Choosing between a DuoKey tenant and an on-premises instance

This table compares a hosted DuoKey tenant with an on-premises DuoKey instance for OpenBao auto-unseal across network path, key custody, availability, administration and audit evidence. Read each row as a question to put to the vendor before you choose, because the answers depend on the terms in your agreement and your deployment. The main takeaway is that this choice decides where the unseal dependency sits, so settle it before the first OpenBao initialization.

Decision areaHosted DuoKey tenantOn-premises DuoKey instance
Network path from OpenBao nodesUnseal traffic leaves your network for the provider endpoint. Confirm the hostname, port and any private connectivity option.Unseal traffic stays on your network. Confirm the listening interface and the firewall rules each OpenBao node needs.
Key custodyThe provider operates the hardware and tenant. Confirm where keys are generated and stored, and whether any key can be exported.Your organization operates the hardware. Confirm who holds administrator credentials and where key material resides.
Availability dependencyUnseal depends on the provider service and your path to it. Confirm the published availability terms and failover regions.Unseal depends on your facility, power and staff. Confirm redundancy options, replica support and maintenance windows.
AdministrationThe provider handles most platform patching and firmware. Confirm which tasks stay with you, such as partition and credential setup.Your team applies patches, firmware and configuration changes. Confirm the update procedure and vendor support hours.
Audit evidenceLogs are available from the provider on request. Confirm the log fields, retention period and whether logs can reach your SIEM.Logs remain in your environment. Confirm what the appliance records and how you forward those records to central logging.
Backup and recoveryRecovery depends on provider backup and tenant restore terms. Confirm the restore procedure and expected restore process.You own backup of configuration and any key material the appliance permits. Confirm the backup method and run a restore test.
Data location and residencyConfirm the region where the tenant runs and where backups are stored.Data stays in the facility you select. Confirm physical location, access controls and who can enter the site.
Cost structureTypically a recurring service subscription. Confirm the billing unit, what is included and any usage limits.Typically hardware, licensing and support. Confirm which items are one-time and which recur in the written quote.

How to configure the DuoKey PKCS#11 seal step by step

This sequence takes an OpenBao cluster from a DuoKey tenant or instance with no seal configured to nodes that unseal automatically after a restart, with each stage confirmed before the next begins.

  1. Confirm the DuoKey library and PKCS#11 module version

    The platform team confirms with DuoKey which PKCS#11 module and library version matches the tenant or on-premises instance and the operating system of your OpenBao hosts. Ask the vendor for the exact library file name, its supported platforms and any OpenBao or PKCS#11 compatibility statement, and record them in the change ticket. Do not assume an older module works with a newer OpenBao release. The step is done when you have a written version pair and the vendor's installation documentation for it.

  2. Create or import the wrapping key in DuoKey

    A DuoKey administrator creates or imports the AES wrapping key that will protect OpenBao's root key, inside the tenant or instance, following DuoKey's key management guidance. Decide in advance whether the key is generated in the HSM or imported, and who holds administrative rights over it. Confirm the key label, the object type and the operations it permits, since OpenBao needs to wrap and unwrap through it. The step is done when a PKCS#11 session can list the key by its label from a test host.

  3. Install the module on the OpenBao host or image

    The operations team installs the DuoKey PKCS#11 library on each OpenBao node, or bakes it into the container image if you run OpenBao in containers. Check the vendor's build or packaging instructions for your base image and confirm the library's dependencies are present. Keep the file path identical across nodes so the seal stanza works everywhere. The step is done when the library loads and lists the DuoKey slot on every node, which you can confirm with the vendor's PKCS#11 inspection tool.

  4. Write the PKCS#11 seal stanza

    The engineer adds a seal block to the OpenBao server configuration with the library path, slot, PIN source and key label that the DuoKey documentation and OpenBao's PKCS#11 seal documentation specify. Load the PIN from a file, environment variable or secret source that only the OpenBao service account can read, not from a plain configuration value in version control. Confirm exact parameter names against the current OpenBao seal documentation before deploying. The step is done when the configuration validates on a single node without starting the service against production data.

  5. Initialize the cluster with recovery keys

    The security lead starts the first node for initialization so that OpenBao generates recovery keys and the root token, and distributes the recovery key shares to named custodians as your key ceremony requires. Record the number of shares and threshold chosen during planning. Store the root token separately and revoke it once administrative access is established through approved methods. The step is done when the node reports as initialized and unsealed, and the recovery key shares are confirmed as held by the intended people.

  6. Join the remaining nodes to the cluster

    Each additional node is started with the same seal configuration and joins the cluster using the method documented for your storage backend, whether integrated storage or PostgreSQL. Confirm every node sees the same DuoKey key label and loads the library from the same path. The step is done when the cluster status shows all nodes as members and each one reports that it has auto-unsealed without manual key entry.

  7. Verify automatic unseal after a node restart

    The operations team restarts one standby node, then the active node in a planned window, and watches each return to an unsealed state without operator input. Test that a failed HSM connection leaves the node sealed and produces a clear log entry, so the alerting you designed will fire. Repeat the test after any module, OpenBao or DuoKey upgrade. The step is done when restarts succeed in the test environment and the failure case is observed and documented in the runbook.

Security controls to plan around the HSM seal

An HSM seal moves the unseal key out of OpenBao's storage, but it adds its own credentials, network path, permissions and custody questions. The cards below cover the controls that connect the HSM tenant to the OpenBao operators who depend on it, and each one should be agreed before the seal is configured in production.

PIN and slot credential handling

The PKCS#11 seal authenticates to the DuoKey slot with a PIN that OpenBao reads at startup, so the PIN appears in configuration or the environment unless you prevent it. Decide where the PIN lives, who can read that file or variable, and how it rotates. Confirm with DuoKey whether the slot PIN can be changed without re-creating the key, and test the rotation on a non-production cluster first. Keep the PIN out of shell history and container image layers.

Network path and TLS to the HSM

Every unseal request crosses the network between your OpenBao nodes and the DuoKey tenant or on-premises instance, so an unreachable HSM blocks recovery after a restart. Document the route, firewall rules and DNS names, and confirm whether the DuoKey endpoint offers TLS that you can verify with a pinned CA. Plan a fallback path for a network outage, because sealed nodes cannot unseal without it.

Least-privilege key permissions

The OpenBao service account on the HSM should be able to use the wrapping key for unseal and nothing more. Ask DuoKey which operations the PKCS#11 slot role allows, and remove rights to create, export or delete keys from the OpenBao identity. Verify the result by attempting a forbidden operation with the same credentials and confirming it fails.

Recovery key custody

Auto-unseal changes how recovery keys are used: they are needed for certain administrative operations, not for routine unseal. Decide who holds the recovery shares, how they are stored, and what happens if the HSM tenant is lost or a subscription lapses. Record this custody plan in writing and rehearse a recovery before go-live, because a recovery procedure that has never been run is unlikely to work under pressure.

Audit logging of unseal events

Unseal and seal events should be visible in both OpenBao's audit devices and the DuoKey tenant logs, so an unexpected unseal can be traced to a node and a credential. Confirm which events DuoKey records and how long they are retained, then forward both streams to your central log platform. Alert on unseal activity outside planned maintenance windows.

Separation of duties

HSM administrators who manage the DuoKey tenant and keys should not also operate OpenBao or hold its recovery material. Write down who can change the PIN, the key policy, the network allow list and the OpenBao seal configuration, and require two people for changes that would block unseal. Review these assignments whenever staff change roles.

Running the seal after go-live

Day-two work on a DuoKey-sealed OpenBao cluster starts with knowing the seal is healthy before a node needs it. Monitor two things separately: OpenBao's own seal status on every node, which shows whether each process is unsealed, and reachability of the DuoKey tenant or on-premises instance over the PKCS#11 path from each node. An HSM that answers from one network segment but not another will look fine in a single check and fail during a restart. Ask DuoKey which health or status signals its service exposes and which of them your monitoring can read, and confirm alerting thresholds with your operations team. The Prometheus and Grafana pillars cover the general tooling, but the seal-specific checks are yours to define.

Restart testing is the check most teams skip. Restart one standby node at a time in a non-production copy of the cluster, confirm it auto-unseals without an operator, and confirm it rejoins the cluster with the same configuration. Repeat the test after any change to the PKCS#11 library path, the token label, or the key label, because those values are read at startup and a typo will only surface on reboot. Upgrades need the same discipline: OpenBao and the PKCS#11 module you ship with it should be moved together, in a staged rollout, and each upgrade should be followed by a restart test. Check the OpenBao releases page for the version you plan to run and confirm with DuoKey which module versions it supports before you change either component.

Credential rotation and break-glass planning come last, and both need written procedures. Rotating the PIN or credential OpenBao uses to reach the HSM means updating the seal configuration on every node and restarting them in sequence, so schedule it as a change with a rollback step. The break-glass path must answer one question in advance: what happens when the HSM is unreachable and a node restarts? Document who can authorize a temporary change, where recovery material is held, whether a Shamir-based fallback exists and how it would be executed, and how the event is logged for your auditors. Confirm all of this with DuoKey and your own security team before go-live, and rehearse the procedure at least once.

What auto-unseal with DuoKey SD-HSM costs and needs from your team

What drives the effort of a DuoKey SD-HSM auto-unseal project?

The main drivers are how your OpenBao nodes reach DuoKey, how many clusters need the seal, and how much packaging and testing surrounds it. The access model matters most: a hosted tenant and an on-premises instance need different network paths, credentials and administration. Each cluster adds its own seal configuration, key reference and restart test. The library build pipeline adds effort when the PKCS#11 library must be installed into OpenBao images your organization builds and signs. Compliance evidence adds effort when auditors want configuration records, access logs and tested recovery. Ask which of these items sit inside the fixed scope and which are optional add-ons.

Can our internal platform team set up DuoKey auto-unseal without outside help?

Yes, if the team already runs OpenBao high availability, builds images with PKCS#11 libraries and can administer the HSM side. The work crosses three skill sets. Auto-unseal changes how every node starts, so a mistake can leave a cluster sealed after a restart. Teams new to HSM administration often find key lifecycle, access policies and tenant onboarding slower than the OpenBao configuration itself. A practical check is to name who owns the DuoKey relationship, who owns the OpenBao seal configuration and who will rehearse a node restart. If any role is empty, a partner can cover the gap under a fixed scope, or the team can train first and take the work on afterward.

What does the work need from our team before it starts?

Plan for network access, HSM administration, a change window and a test environment before anyone schedules work. Network access means every OpenBao node must reach the DuoKey endpoint through the paths your firewall and proxy rules allow, so confirm the exact ports and direction with the vendor. HSM administration means someone with authority to create or import keys, issue client credentials and set permissions on the DuoKey side. The change window matters because the seal change restarts nodes, so schedule it where a restart rehearsal can happen first. A test environment with a separate tenant or instance, or at minimum a non-production cluster, lets the team prove restarts and failover before production. Record each item with an owner and a date.

How long does a DuoKey auto-unseal engagement take?

The timeline depends on scope and on how quickly the DuoKey tenant or on-premises instance can be provisioned and accessed, so no general duration applies here. Factors include the number of clusters, whether the library build goes into an image pipeline and how many failover test rounds your change window allows. Ask the vendor for its provisioning and access lead times, since those often gate the start. DeployOpen agrees timelines in writing before work starts, so the written scope should state milestones, test rounds and the cutover window. Treat any single figure in a proposal without that breakdown as incomplete until someone explains what it covers.

What should we request in a written quote for this work?

A useful quote lists each component, its owner and what is included. Ask for the deliverables: the seal configuration for each cluster, the library and image build steps, restart and failover test results, a runbook and a handover session. Ask which items are one-time work and which recur, such as DuoKey subscription or hosting fees that the vendor bills separately and support retainers, which are optional and ongoing. Request the assumptions about access, change windows and environments, and what happens if those assumptions slip. Confirm what is excluded, including OpenBao upgrades and HSM key rotation. DeployOpen does not publish a price list, and its quote follows from the written scope.

How does the number of OpenBao clusters change the scope?

Each OpenBao cluster needs its own seal configuration, key reference and restart test, so scope grows with the count. A single cluster with a single DuoKey key is the simplest case. Several clusters across environments add configuration variants, separate credentials or key policies and more rehearsal. Clusters that share a storage design and an image pipeline can reuse much of the build work, while clusters in different networks or regions need their own access paths. Ask whether one DuoKey tenant can serve several clusters and how keys would be separated between them. Also decide whether production and test clusters share a tenant, because that choice affects blast radius and audit scope.

What compliance evidence should we expect from an unseal project?

The project should produce evidence such as documented seal configuration, access records, change tickets and tested recovery procedures, and the scope should name those artifacts. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies do that work. Ask early which control framework your auditor uses so the evidence matches their requests. Expect questions on key custody, who can administer the HSM, how keys are rotated and how unseal events are logged. Confirm with your auditor and the DuoKey documentation which records the platform provides before you promise them internally.

What happens to OpenBao if the DuoKey tenant becomes unreachable?

If DuoKey is unreachable, nodes that restart cannot unseal automatically, so a cluster stays sealed until the seal endpoint is reachable again. This is the main availability dependency of any external seal. Plan for it by setting how long your team will tolerate sealed nodes, monitoring connectivity to the HSM endpoint and documenting recovery keys and the emergency procedure. Confirm with the vendor how DuoKey handles tenant outages, maintenance windows and failover for hosted tenants, and whether an on-premises instance changes that exposure in your environment. Test a full cluster restart while the HSM endpoint is blocked on purpose, so the runbook reflects the actual behavior.

How OpenBao, the PKCS#11 module and DuoKey fit together

The diagram starts with the OpenBao nodes, which call the PKCS#11 module at unseal time. The module then reaches the DuoKey tenant or on-premises instance over the network, where the wrapping key is used and never leaves the HSM boundary. Recovery keys sit outside that boundary with the people who hold them. Check which side of the trust boundary each component sits on, and confirm the network path and recovery arrangements before you initialize the cluster.

Unseal path from OpenBao nodes through the PKCS#11 module to DuoKey, with recovery holders outside the HSM.

How DeployOpen scopes and delivers DuoKey seal work

DeployOpen plans and implements the OpenBao side of a DuoKey seal on infrastructure you control, whether that is your own cloud accounts, data centers or an isolated network. Scope is agreed in writing before work starts, and the written scope names the OpenBao version and build, the PKCS#11 module and library path, the DuoKey tenant or on-premises instance, the key labels and slot or token identifiers, the nodes that will be configured, and the acceptance tests. Before any change, we ask you to confirm which items sit with your team (for example, network paths from OpenBao nodes to the HSM endpoint, and who approves key creation) and which sit with us, so that nothing is assumed at the handover point between the two.

Delivery is verified rather than assumed. Acceptance covers a cold restart of every node with the seal in place, confirmation that the cluster unseals without operator keys, a deliberate loss of the HSM path to observe how the cluster behaves and recovers, and a failover test on the active node. We also document the recovery-key and root-token procedure you will hold, and we record which step each test proved. Where the DuoKey access model needs input from your security team, such as who may administer the tenant and how credentials are rotated, we flag it as an open decision in the scope rather than settling it during the build.

DeployOpen prepares systems, configuration, test records and operating documents that your compliance or audit team can review, but we do not issue audit reports, attestations or certifications. Independent auditors and certification bodies make those determinations, so you should confirm with them early which evidence they will request. After go-live, ongoing work such as OpenBao upgrades, re-testing after HSM or DuoKey changes, and periodic failover drills can be covered by a retainer, and the retainer scope is also agreed in writing. DeployOpen is not an official partner of DuoKey, so confirm any vendor-specific support path, tenant terms and service levels directly with the DuoKey provider.

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.