OpenBao external keys for HSM and KMS-backed PKI and Transit

OpenBao External Keys let PKI and Transit use private keys that stay inside an HSM or KMS. This page covers the plugins, supported engines, trade-offs and setup decisions.

On this page

Why keep OpenBao PKI and Transit keys inside an HSM or KMS

A security or compliance team often writes a requirement that signing and encryption keys must stay in a hardware security module or a managed key management service, never in the memory or storage of a general-purpose server. OpenBao's External Keys feature is the mechanism for meeting that requirement. According to the OpenBao documentation, External Keys let a secrets engine delegate operations on sensitive key material to a trusted external KMS or HSM, so the private key itself does not have to live inside OpenBao. Two engines can use it. The PKI engine can sign certificates on root and intermediate paths with keys held externally, and the Transit engine can sign, verify, encrypt and decrypt using External Key material. OpenBao 2.7.0 added this support with PKCS#11-backed keys through the kms-pkcs11 plugin in openbao-plugins, along with built-in Transit-backed keys.

Teams coming from HashiCorp Vault will recognize the goal. OpenBao describes External Keys as its equivalent of Vault Enterprise Managed Keys, but the feature was redesigned and is not API compatible. Any automation, policy or client code that calls Managed Keys endpoints will need to be rewritten against the External Keys interface, so the migration is not a configuration change. Before you commit, confirm with your security team which HSM or KMS products, firmware levels and PKCS#11 library versions your environment permits, and check the OpenBao External Keys documentation for the current list of supported integrations and their limits.

The decision to make early is which signing and encryption paths must be externalized and which can stay internal. A root CA key is usually the first candidate, while high-volume Transit encryption may have throughput limits that the HSM or KMS must absorb. Each externalized key adds a dependency on the HSM or KMS for every signing or decryption call, so availability, latency and disaster recovery for that device become part of OpenBao's operating design. Plan a failure test that shows what happens to certificate issuance and application encryption when the external device is unreachable.

Choosing between the PKCS#11 and Transit KMS options

The PKCS#11 route fits organizations that already own an HSM and must keep private key operations on that hardware, usually because a policy, an auditor or a certificate program names it. The Transit-backed route fits teams that want to keep key custody inside a second OpenBao-managed boundary, such as a separate cluster or namespace, without buying specialized hardware. Both options let the PKI and Transit engines use keys that never enter OpenBao's own storage, so the choice is mostly about which trust anchor your organization already accepts.

  • HSM already in place: the PKCS#11 plugin is the natural path when hardware and its operations team exist today.
  • No HSM requirement: the Transit-backed option avoids a hardware purchase but moves trust to the other OpenBao instance.
  • Vendor and policy language: check whether your control owner accepts a software-backed boundary as the key custody point.
  • Operational ownership: the PKCS#11 route adds the HSM vendor's firmware, client library and partition management to your change process.
  • Failure domain: a single external signer becomes a dependency for every certificate or Transit operation that uses it.

Confirm the accepted custody model with your security and audit owners before you pick a route, because the two options carry different evidence requirements.

How External Keys connect OpenBao engines to the HSM or KMS

A client request to PKI or Transit reaches the OpenBao engine, which hands operations on key material to an External Key provider. The provider is either the PKCS#11 plugin talking to an HSM or the Transit KMS path talking to a KMS, and the private key never leaves the custody boundary. Check which engines and operations your chosen provider supports, and confirm where the key material is generated and who holds the HSM or KMS credentials.

External Key requests cross into custody boundary while private keys stay inside the HSM or KMS.

Setting up External Keys step by step

This sequence takes an OpenBao 2.7.x cluster from a version check to a working PKI or Transit operation whose private key stays inside an HSM or KMS. Each step ends with a check so the team knows whether to move on.

  1. Confirm the OpenBao version and plugin availability

    The platform engineer confirms that every node runs OpenBao 2.7.x, since External Keys support arrived in 2.7.0, and that the PKCS#11 plugin (kms-pkcs11 from the openbao-plugins project) is available for the target platform. Check the version on each node with the server's version output and compare the results against the release notes. Also confirm which external KMS or HSM options the release supports, because the feature set differs between the PKCS#11 path and the built-in Transit-backed path. The step is done when every node reports the same 2.7.x build and the plugin is present in the plugin catalog on each node.

  2. Prepare the HSM or KMS and key objects

    The security engineer and the HSM or KMS administrator create the key objects that OpenBao will reference, with the key type, size and usage flags the planned certificate or Transit operation needs. For a PKCS#11 device, confirm the slot, token label and PIN handling, and create the key as non-extractable where the device supports it. Decide who holds the PIN or credentials and how they are supplied to OpenBao at startup. The step is done when the key objects exist, list correctly through the vendor's own tooling, and the administrator can show that the private key attribute is marked as not extractable or equivalent.

  3. Configure the external key provider

    The platform engineer adds the provider configuration to OpenBao so it can reach the HSM or KMS, using the settings documented for the chosen plugin, such as the module path, slot or key identifiers and credentials supplied through a protected channel. Keep credentials out of plain-text configuration files where your change process allows, and restrict who can read the configuration. Restart or reload according to the procedure for your deployment. The step is done when OpenBao reports the provider as configured and a read of the provider status shows a successful connection to the device without errors in the server log.

  4. Create the key reference in the engine

    The PKI or Transit administrator creates an External Key reference in the target engine that points at the key object prepared in step two. Use a dedicated mount for test work so that production mounts are not affected while the setup is validated. Record the key reference name, the provider and the engine mount in the change record. The step is done when the engine lists the key reference with the expected type and the key shows as backed by the external provider rather than as software key material held by OpenBao.

  5. Issue a test certificate or run a Transit operation

    The PKI administrator issues a test certificate from an intermediate or root path that uses the external key, or the application team runs a Transit sign, verify, encrypt or decrypt call against the external key reference. Use a short-lived test name and a non-production hostname or payload. Check the returned certificate chain or signature with standard tooling and confirm that verification succeeds against the expected public key. The step is done when the operation returns a valid result and the audit log records the request, with the key reference identified and no key material in the response.

  6. Verify that key material never leaves the device

    The security engineer checks that the private key cannot be exported from OpenBao or from the HSM or KMS. Attempt the export operations the vendor documents as blocked, confirm that the key object is flagged as non-extractable where the device reports that property, and review the OpenBao configuration and API responses for any field containing private key data. Review HSM or KMS logs to confirm the signing calls reached the device. Ask the vendor or plugin maintainers to confirm any capability you cannot test yourself. The step is done when the evidence record shows that every export attempt failed, the device logs show the operations, and the findings are filed for the compliance and security teams.

Security and operational considerations for externally held keys

Moving PKI and Transit private keys into an HSM or KMS shifts risk from the OpenBao process to the hardware and the people who administer it. The cards below cover the dependencies, credentials, logging, outage behavior, rotation and administrative boundaries that decide whether external keys hold up in production.

HSM availability as a dependency

Every root or intermediate signature and every Transit sign, encrypt or decrypt call on externally held keys needs the HSM or KMS to answer. Map which workloads depend on that path, confirm the HSM's redundancy model (clustered appliances, replicated partitions or a managed KMS region), and test what happens when one node or one network path fails. Ask the HSM vendor for documented failover behavior before you design the cluster around it.

PIN and credential handling for PKCS#11

The kms-pkcs11 plugin must authenticate to the HSM partition, which usually means a PIN, password or credential that OpenBao holds at runtime. Decide where that value lives (a file with restricted permissions, an environment-injected secret or a provider-specific store), who can read it and how it rotates. Confirm with your HSM vendor whether the PIN is cached in memory after login and how a rotation is applied without an outage.

External Keys docs

Audit logging of key operations

Signing and decryption performed by an external key are only useful to an investigator if they appear in your audit trail. Enable OpenBao audit devices and confirm that requests to External Key-backed PKI and Transit paths are recorded with the calling identity. Separately, check whether the HSM or KMS keeps its own operation log, and plan how the two records are correlated during an incident review.

KMS outages and certificate issuance

When the external KMS is unreachable, certificate issuance from a root or intermediate CA stops, while previously issued certificates keep working until they expire. Document which issuance pipelines (ACME renewals, service mesh certificates, short-lived workload identities) would fail, how long they can tolerate a gap and whether a second CA hierarchy is available as a fallback. Test this outage scenario before go-live, not after the first incident.

Key rotation ownership

Rotating an externally held key involves two systems: generating or importing the new key material in the HSM or KMS, then pointing OpenBao at it and retiring the old version. Assign one owner for each step and write the handoff into the runbook. Confirm which rotations OpenBao can perform itself and which require the HSM administrator, and schedule rotations so that signing paths remain available during the change.

Separation of duties with HSM administrators

The people who administer the HSM should not also be able to issue certificates or use keys through OpenBao without oversight, and OpenBao administrators should not hold HSM credentials or the power to export key material. Write down which role holds each credential, which approvals a key change requires and how two-person control is enforced in both systems. Review these assignments against your internal control framework rather than relying on the product defaults.

Limits to confirm in your environment before committing

Which HSM and KMS products does OpenBao External Keys support and test?

Confirm the exact list of supported and tested HSM and KMS products before you commit, because the answer depends on the plugin and version you run. OpenBao 2.7.0 added External Keys with PKCS#11-backed keys through the kms-pkcs11 plugin in openbao-plugins, along with built-in Transit-backed keys. A PKCS#11 interface does not guarantee that every device behaves the same way, so ask your HSM vendor and the OpenBao project which module versions were tested with your model. Check the OpenBao External Keys documentation for the current list and the caveats attached to it, and request written confirmation for your exact hardware or cloud KMS and firmware or service version.

Which engine operations work with each External Key type?

Confirm operation coverage per key type and per engine before you design around it. OpenBao documents that the PKI engine can sign certificates on root and intermediate paths with keys held in an external KMS or HSM, and that the Transit engine can sign, verify, encrypt and decrypt with External Key material. Those statements do not tell you whether every Transit key type, algorithm, rotation or import path works with every backend. Build a short matrix covering the operations your applications need (for example, signing, decryption, key rotation and certificate issuance) and check each cell against the documentation and a test run in a non-production cluster.

Do HA OpenBao clusters share External Key state across nodes?

Ask how External Key configuration and key references are stored and replicated before you assume a shared state. OpenBao high availability uses one active node that holds a lock in the data store, with standby nodes forwarding or redirecting requests, and integrated storage (Raft) and PostgreSQL are the officially supported HA backends. Whether each node must reach the HSM or KMS directly, whether the connector configuration must be identical on every node, and how the external key handle is resolved after a leader change are details to verify in the External Keys documentation and in a lab with your own HSM or KMS endpoint. Document the answer in your runbook before go-live.

What happens to signing and decryption during a failover?

Confirm the behavior during leader change and HSM or KMS outage with a scripted test, because the docs alone will not show your timing. When the active node fails, a standby takes over the data store lock and continues serving requests, but any operation that depends on the external device will fail if that device or its network path is unreachable from the new active node. Ask what error OpenBao returns in that case, whether in-flight operations are retried, and whether callers receive a clear signal to back off. Plan a test that fails the active node and the KMS endpoint separately and measures how long issuance and Transit calls are interrupted.

How do External Keys affect a migration from Vault?

Confirm the interaction with your migration path before you plan key custody, because the two topics are separate. OpenBao describes External Keys as its equivalent of Vault Enterprise Managed Keys, redesigned and not API compatible, so existing Vault Enterprise managed key configuration will not carry over directly. The migration guide covers in-place replacement of the Vault server process with configuration, endpoints and URLs unchanged, but it was tested only against Vault 1.14.1 community edition, not Vault Enterprise. Ask the project and your team whether keys created through a Vault external integration can be reattached in OpenBao, and plan a rekey or re-issuance path if they cannot.

Can our own team operate External Keys, or do we need outside help?

Your team can run External Keys if it already operates OpenBao, an HSM or KMS, and PKCS#11 tooling, but the combination is where most effort goes. The work includes setting up the plugin and its module path, creating and naming keys on the device, granting the OpenBao identity only the operations it needs, testing failover, and writing procedures for key rotation and device replacement. Costs come from staff time, from HSM or KMS licensing and hardware that the device vendor charges for, and from any outside work you buy. Ask any partner for a written scope that lists which device models, OpenBao versions and engines the work covers.

Which OpenBao version should we target for External Keys?

Target OpenBao 2.7.0 or a later patch release, because External Keys first appeared in the 2.7.0 line. OpenBao v2.7.0 was released on September 23, 2026, and v2.7.1 followed on October 1, 2026. Check the OpenBao 2.7.x release notes for the fixes and known limitations in the patch release you choose, and read the OpenBao releases page for later changes. Pin the exact plugin and server versions in your change record, because the plugin and the server must work together.

How OpenBao External Keys differ from Vault Enterprise Managed Keys

OpenBao describes External Keys as its equivalent of Vault Enterprise Managed Keys, but it is a redesign and is not API compatible with Managed Keys. A configuration or client call that works against a Vault Enterprise Managed Keys setup should not be assumed to work unchanged against OpenBao External Keys. Treat the move as a rework of key references and client code, not a drop-in swap of the server binary.

Before you migrate, build an inventory of every current key and engine dependency. For each Managed Keys reference, record which secrets engine uses it (PKI on root or intermediate paths, or Transit for sign, verify, encrypt and decrypt), which HSM or KMS holds the key material, which applications and pipelines call the Transit endpoints, and which tooling creates or rotates the keys. Mark each item as one of three things: a configuration to rewrite, a client call to change, or a dependency to retire. Items in the third group often surface only when someone reads the inventory against the engine list, so run that comparison deliberately.

Confirm every behavior you plan to rely on against the OpenBao External Keys documentation and the OpenBao 2.7.x release notes, not against Vault documentation. Check the exact configuration keys, the supported key types and the plugin you need, including the PKCS#11 path added in 2.7.0. Then test each engine operation in a non-production cluster that uses the same HSM or KMS, and record the results. Ask your HSM or KMS vendor to confirm how their module behaves under the PKCS#11 interface before you commit to a design.

Trade-offs of moving private keys out of OpenBao

Delegating PKI and Transit key operations to an HSM or KMS changes where private keys live, who can audit them and what must be recovered after a failure. Each card below names one trade-off to weigh before you choose External Keys over keys held in OpenBao storage.

Stronger custody and audit evidence

With External Keys, the private key never leaves the HSM or KMS, so OpenBao handles requests while the custody boundary sits in hardware or a managed key service. That gives your security and audit teams a separate record of key use from the HSM or KMS, alongside OpenBao's own audit devices. Check that the key store can produce logs that match your retention and review requirements, and that OpenBao audit entries reference the same key identifiers.

External Keys docs

Added latency and availability dependency

Every signing or decryption call that uses an external key now waits on a network round trip to the PKCS#11 device or KMS endpoint. If that dependency is unreachable, certificate issuance and Transit operations fail even when OpenBao itself is healthy. Measure latency under your peak issuance load, and confirm how the HSM or KMS is clustered and what happens to in-flight requests during failover.

Plugin and vendor lock-in risk

External Keys rely on the kms-pkcs11 plugin and built-in Transit-backed keys, and the feature is tied to the 2.7 line and later. Moving to a different HSM vendor or KMS can mean reconfiguring key references, retesting plugin behavior and re-issuing signing workflows. Ask the plugin maintainers and your HSM vendor which PKCS#11 features are verified, and keep a written exit plan for each external key store.

Operational load of HSM administration

An HSM adds work that OpenBao's storage-based keys do not: partition or slot setup, PIN and credential custody, firmware updates, client and driver versioning and capacity planning for key objects. These tasks usually sit with a different team than OpenBao operators, so ownership must be assigned in writing. Confirm who rotates HSM credentials, who performs firmware changes in a maintenance window and how a change in the HSM is tested against OpenBao before production.

Backup and key recovery planning

Keys held in an HSM cannot be recovered from an OpenBao storage backup, so your disaster recovery plan must cover the HSM separately, including its own backups, cloning rules and key ceremony records. Restoring OpenBao to a new site also requires the same external key references and access to the matching key material. Document a restore test that rebuilds OpenBao and reconnects it to the external key store, and record how long each step takes in your environment.

Deciding whether External Keys fit your PKI or Transit design

The decision starts with a policy question: does your policy require that signing or decryption keys never exist in software? If not, the default software keys in OpenBao may be enough. If yes, check whether you have an HSM or a supported KMS, then confirm which engine needs it, since the PKI engine signs on root and intermediate paths and the Transit engine can sign, verify, encrypt and decrypt with External Key material. Only proceed once the version and plugin for your target OpenBao release are confirmed, otherwise defer.

Decision path from key custody policy to External Keys go or defer.

How DeployOpen scopes and delivers External Keys work

DeployOpen is a Chainscore Labs company that plans, implements, hardens, documents and supports self-hosted OpenBao inside your own infrastructure. The cards below follow an External Keys project from written scope through delivery, evidence and ongoing support, so the HSM or KMS decisions stay with your team and are recorded before any build starts.

Fixed-scope written agreement

Most engagements are fixed-scope, so the agreed scope, deliverables and timeline are written down before work starts. For External Keys, that scope should name each engine that will use external keys (PKI root or intermediate signing, Transit sign, verify, encrypt and decrypt), the HSM or KMS in use, and the OpenBao version you intend to run. Ask for the written scope to list what is excluded, such as HSM firmware changes or changes to the key ceremony your custodians already run.

Plan the key custody model

Before configuration, DeployOpen works with your team to decide which key material moves into the HSM or KMS and which stays in OpenBao storage. The plan covers who holds HSM credentials, how the PKCS#11 or Transit KMS connection is authenticated, and which certificate authority paths depend on external signing. Confirm that your HSM vendor supports the PKCS#11 interface you plan to use before the plan is signed off.

External Keys docs

Implementation and hardening

DeployOpen implements the external key configuration in your infrastructure, including the kms-pkcs11 plugin from openbao-plugins or the built-in Transit-backed keys, depending on the approved design. Hardening covers access policies for the Transit and PKI paths, least-privilege HSM partitions, network paths between OpenBao nodes and the key store, and removal of unused root or admin paths. Test that signing fails closed when the HSM is unreachable.

Documentation and runbooks

Each delivery includes documentation that your operators can use after handover: the key inventory, the mapping from each External Key to its PKI or Transit use, the HSM connection parameters (without secret values), and the steps for rotating HSM credentials. Runbooks cover what operators do when the HSM is in maintenance and when a signing request is refused. Keep these documents in your own repository so your team owns them.

Evidence for compliance assessments

DeployOpen prepares systems, controls and evidence that your compliance team and independent assessors can review. This can include configuration exports, access policy listings, test records for signing failures and the key inventory. DeployOpen does not issue audit reports, attestations or certifications. Ask your auditor which evidence format they expect before testing begins, so the records match what they will request.

Retainers for upgrades and testing

Ongoing support, upgrades and continuous testing are available as retainers. External Keys depend on the OpenBao release line, so upgrades need a regression check of every external key operation after each change. Ask what the retainer covers for HSM firmware updates, plugin version changes and periodic retests of the signing paths, and whether those tasks are billed separately from routine maintenance.

Latest supplied patch
2.7.1

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.