OpenBao auto-unseal with Utimaco HSMs

Auto-unseal OpenBao with a Utimaco u.trust General Purpose HSM or CryptoServer CP5 over PKCS#11, following the project guide and its production caveats.

On this page

How OpenBao auto-unseal with Utimaco HSMs works

OpenBao can unseal automatically through a PKCS#11 seal backed by a Utimaco HSM, so the root key that protects OpenBao's data is wrapped by key material that never leaves the device. This suits a regulated team that already owns, or is buying, a Utimaco device and wants root key custody in hardware it controls rather than in a sequence of manually entered Shamir shares. At startup, OpenBao contacts the HSM through the PKCS#11 library, asks the device to decrypt the stored recovery material, and unseals itself without an operator present. Teams often choose this path because it removes the unseal ceremony from every restart, failover and node replacement, and because the custody model can be explained to auditors in terms of one named device and its administrators.

Utimaco sells two lines that matter for this configuration. The u.trust General Purpose HSM is documented against PKCS#11 v3, while the CryptoServer CP5 exposes PKCS#11 v2. The difference determines which Utimaco client library, module path and build of the seal you use, and it affects which mechanisms and key types you can rely on. Confirm the exact PKCS#11 version your device firmware and client software expose before you write any configuration, because the wrong library version is a common reason an otherwise correct seal block fails at startup.

The project's Utimaco guide and its production caveats govern the configuration, and they should be read before you touch a production node. Treat the guide as the source for the seal stanza, the required key label and slot settings, and the supported OpenBao build, and treat its caveats as the list of conditions your deployment must meet. Plan a test cluster that mirrors your device, your HSM partition and your network path, then rehearse a full restart and a node replacement. Record which OpenBao release and which Utimaco client version you validated, because both the seal plugin and the HSM client can change independently of each other.

Where the HSM sits in the OpenBao unseal path

The diagram starts with an OpenBao node that is sealed and cannot read its encrypted data. On startup the node calls the PKCS#11 seal library, which crosses into the HSM network zone and asks the Utimaco device to use the wrapping key it holds. The wrapped root key is then returned to the node, which unseals and reads encrypted data from the storage backend. Check that the trust boundary is enforced by network rules, that the HSM never exports the wrapping key, and that the storage backend only ever holds ciphertext.

Unseal flow from sealed node through the PKCS#11 seal to the Utimaco HSM and storage.

Which Utimaco model and configuration fits your environment

This table compares the two Utimaco families named for OpenBao auto-unseal, the u.trust General Purpose HSM and the CryptoServer CP5, across library version, build impact, network attachment and redundancy. Read each row against your own availability target and build pipeline, then confirm the open items with Utimaco and the OpenBao project guide before ordering hardware.

Decision pointu.trust General Purpose (PKCS#11 v3)CryptoServer CP5 (PKCS#11 v2)
PKCS#11 library versionPKCS#11 v3 interface, confirm the exact library build Utimaco supplies for your firmwarePKCS#11 v2 interface, confirm which v2 library release and cipher mechanisms your firmware exposes
Impact on the OpenBao buildLibrary must be present in the container or host image at the path the seal configuration expects; confirm the library is compatible with the OpenBao base image you build onSame packaging work, but v2 behavior may differ from v3 in session and mechanism handling; test seal and unseal on a staging node before production
Network attachmentNetwork-attached appliance reached over the management and data networks you define; plan firewall rules, TLS and client certificate handling with UtimacoNetwork-attached appliance with a comparable attachment model; confirm port, client authentication and partition setup with Utimaco
Partitions and key objectsConfirm how partitions or key slots are created for the unseal key and who holds the credentials used by OpenBaoConfirm partition layout, login model and how the unseal key object is created and backed up
Single HSM acceptable whenNon-production or a risk-accepted environment where a short outage of unsealing is tolerable and recovery time is documentedSame conditions as the other model; a single appliance is a single point of failure for every node that depends on auto-unseal
Paired or clustered design needed whenProduction clusters where a seal outage would block restarts and failovers, so two appliances with a tested failover path are typically plannedSame conditions; confirm with Utimaco whether a supported clustering or key replication option exists for your firmware
Items to confirm with Utimaco or the project guideLibrary version for v3, supported firmware, failover behavior, key replication, support terms for the seal pathLibrary version for v2, end-of-support status, supported OpenBao versions, failover behavior, key replication

Setup sequence for the Utimaco PKCS#11 seal

This sequence takes an OpenBao cluster from a Utimaco HSM with no OpenBao integration to a node that unseals itself after restart, using the PKCS#11 seal. Each step ends with a check so the team knows whether to continue or stop and fix the layer below.

  1. Obtain the Utimaco PKCS#11 library and client

    Confirm with Utimaco which PKCS#11 library version matches your appliance firmware and whether you are on a u.trust General Purpose HSM (PKCS#11 v3) or a CryptoServer CP5 (PKCS#11 v2). Obtain the client package for the OS and architecture of your OpenBao nodes, and confirm the license terms for installing it on those hosts. Done when the library file is present on a test node and the vendor's client tools can list the HSM slots from that host.

  2. Build or select an OpenBao image with the library

    Decide whether to use an official OpenBao image or build a custom one that contains the Utimaco library, following the project's guide for HSM-enabled builds. The image must expose the library at the path your seal stanza will reference, and the Utimaco client must be compatible with the base image's C runtime. Done when the image starts on a test node and the library file exists at the expected path inside the container or on the host.

  3. Create the partition and wrapping key on the HSM

    The HSM administrator creates a dedicated partition for OpenBao, sets the partition credentials, and generates or imports the wrapping key that OpenBao will use to protect its root key. Record the key label exactly as created, since the seal stanza must match it. Done when the key appears in the partition listing and a PKCS#11 session opened from the test node can find it by label, using the vendor's tooling.

  4. Provide the PIN through a protected source

    Store the partition PIN in a source the OpenBao process can read at start but that does not appear in configuration files, shell history or process listings. Confirm with the project guide which PIN source options are supported for your version. Done when the OpenBao process can read the PIN from the chosen source and the PIN is absent from the rendered configuration and logs.

  5. Configure the seal stanza

    Add the seal stanza to the OpenBao configuration with the library path, slot, PIN source and key label, using the exact parameter names in the project's Utimaco guide for your version. Do not add the Shamir keys to the stanza. Done when the configuration validates and the node's startup logs show the PKCS#11 seal loaded without errors.

  6. Initialize the cluster with the HSM seal

    Run the initialization command on the first node. With an HSM seal, OpenBao issues recovery keys rather than unseal keys, so store recovery shares under your ceremony rules before continuing. Done when initialization completes, the root token and recovery material are stored in the approved locations, and the node reports as initialized and unsealed.

  7. Verify auto-unseal by restarting a node

    Restart the OpenBao service on a node without manual intervention and watch the logs and status output until the node reports unsealed. Repeat on each node in a cluster, and test a full restart of the HSM session if your environment allows it. Done when every node returns to unsealed on its own and a failed PIN or missing key produces a clear error rather than a silent hang.

What happens when the HSM is unavailable

A node cannot unseal without the HSM. With the PKCS#11 seal, the root key is protected by a key held in the Utimaco device, so every start of an OpenBao process, including a restart after a crash, a host reboot or a rolling upgrade, depends on the HSM answering a call. An HSM outage, a broken network path between the OpenBao node and the device, an expired or wrong PIN for the partition, or a partition or key that has been moved or deleted will each leave the node sealed. Sealed nodes serve no secrets, so the impact is an outage that begins at the next restart, not at the moment the HSM fails. Before go-live, confirm with Utimaco and the OpenBao seal documentation exactly which failure modes block unsealing, and test each one in a non-production cluster by stopping the HSM path and restarting a node.

Recovery keys are the escape hatch, and they must be planned before the outage. When auto-unseal is configured, OpenBao generates recovery keys at initialization instead of unseal keys, and those recovery keys are needed for operations such as generating a root token and some rekey and recovery procedures. Confirm with the OpenBao docs which operations still require recovery key quorum, how the recovery key threshold and share count are set, where the shares are stored, and whether the recovery procedure can be run while the HSM is down. Also confirm how to rotate the PIN or partition credentials and how to re-key the HSM-backed seal if the device is replaced, and rehearse those steps on a test cluster so that the runbook reflects what the project actually supports.

The impact differs by topology. A single node is fully dependent: when the HSM is unreachable, the only service is down until the path is restored. In an HA cluster on integrated storage (Raft) or PostgreSQL, the HSM is still needed by every node that restarts, so a shared HSM outage can prevent a standby from taking over after an active node fails, which removes the redundancy you were relying on. Plan for this by deploying HSM endpoints or network paths that are themselves redundant where the Utimaco setup allows it, by keeping at least one node running throughout maintenance, and by writing down the order in which nodes must be restored. Ask Utimaco how its failover and high availability options apply to your model before you rely on them.

Security and operational considerations for the HSM seal

The HSM seal moves trust for OpenBao's root key out of the cluster and into a device you must also secure, patch and watch. The cards below cover the controls that connect the HSM session, the wrapping key, the library and the audit trail, so the unseal path stays protected after the first successful start.

PIN and credential storage for the HSM session

OpenBao reads the Utimaco partition PIN through the PKCS#11 seal configuration, so the PIN is effectively a credential that can unseal the cluster after a restart. Decide where it lives before go-live, whether in a root-only file, a secret injected at service start, or a platform secret store, and confirm that it does not appear in process arguments, shell history, container images or configuration committed to version control. Confirm with Utimaco how the PIN is handled on your appliance model.

OpenBao PKCS#11 seal docs

Network segmentation and mutual authentication to the HSM

Every OpenBao node that can restart must reach the HSM, so the HSM network path is part of the unseal dependency. Place the HSM on a segment that only the OpenBao nodes and administrators can reach, restrict the allowed source addresses and ports, and confirm which client authentication the appliance requires before you rely on it. Test the path from each node, including after a node is rebuilt.

Key custody and backup of the wrapping key

The key object that wraps OpenBao's root key is the single most important item in this design. If it is deleted, or if the HSM partition is lost without a usable backup, the cluster cannot be unsealed and recovery means restoring from snapshots and rekeying. Record who may create, export or delete the key, document where backups of the partition are kept, and rehearse restoring the key to a spare device. Ask Utimaco what backup and cloning options your model supports.

Library and image patching

The OpenBao seal depends on the Utimaco PKCS#11 client library installed in the OpenBao image or host. Patch cycles for that library, the base operating system and OpenBao itself should be planned together, because an OpenBao upgrade that changes the build can require a library rebuild. Test each combination in a non-production cluster against a test partition, and keep the exact library version in your change records.

OpenBao releases

Monitoring of HSM health

An HSM failure usually shows up first as a cluster that cannot restart, which is the worst time to learn about it. Alert on HSM reachability and session errors from each node, watch the OpenBao seal status and unseal failures, and track appliance health indicators the vendor exposes, such as firmware state and capacity. Set the alert owner to the team that can act on the appliance, not only the team that runs OpenBao.

Audit logging of seal operations

Seal and unseal events and HSM administrative actions both need an audit trail that a reviewer can follow. Enable OpenBao audit devices so that seal-related events are recorded, forward OpenBao and HSM logs to a central store that administrators cannot silently edit, and reconcile HSM administrator sessions with change tickets. Confirm with Utimaco which appliance and host logs are available and how long your deployment keeps them.

Questions buyers ask about Utimaco auto-unseal

What drives the cost of OpenBao auto-unseal with Utimaco HSMs?

The cost comes from three places: the HSM and its support, the engineering to build and test the seal, and the operations work that follows. The HSM hardware, licenses or support contract are bought from Utimaco or a reseller. Engineering is paid for by your team or an implementation partner, and DeployOpen prices that work from a written scope.

One-time work includes provisioning the HSM partition, building an OpenBao image with the vendor's PKCS#11 library, configuring the seal, and testing restart and recovery. Recurring work includes HSM support, library and firmware updates, and retesting after each OpenBao upgrade.

The main cost drivers are the number of clusters and environments, whether you run HSMs in one site or several, and how many key policies you need. Ask for an itemized quote that states the assumed HSM count, environments, which party supplies licenses, and who runs the upgrade tests.

How long does Utimaco auto-unseal setup usually take?

No fixed duration applies to every environment, so ask for a schedule that matches your setup. The biggest factors are whether the HSM is already provisioned and reachable, and how long your change approval process takes.

Other factors that lengthen the work:

  • Choosing between u.trust General Purpose (PKCS#11 v3) and CryptoServer CP5 (PKCS#11 v2), since each needs a matching library and build
  • Building and validating a custom image before it reaches production
  • Running seal-loss and restart tests in a non-production cluster
  • The number of clusters that must be sealed this way

Check the prerequisites and version notes in the project's guide and in Utimaco's documentation before you commit to dates. Once scope is agreed in writing, DeployOpen provides a delivery plan that shows the sequence and the dependencies on your teams.

What do the HSM and network teams need to provide for this build?

Your HSM and network teams provide the physical and access prerequisites, and they approve the security posture of the seal. Without these, the OpenBao build cannot start. The usual inputs are:

  • An HSM partition or slot for OpenBao, with a dedicated key, login credentials and a documented owner
  • Network paths from every OpenBao node to the HSM service ports, with firewall rules approved in advance
  • Any client certificates or access policies the HSM requires, plus a procedure for backing up the HSM configuration
  • Sign-off on who may log in to the partition and how those credentials are stored and rotated

The HSM team should also confirm how the device behaves during firmware updates and failover, since OpenBao cannot unseal while the HSM is unreachable.

Can our internal team set up Utimaco auto-unseal on its own?

An internal team can do this alone if it already has three skills: HSM administration with PKCS#11, day-to-day OpenBao operations, and time to test failure scenarios before production. The work is manageable for a team with those skills, but the gaps tend to appear in the vendor library build, the recovery tests and the integration with configuration management.

If one of those gaps exists, a partner can take on a fixed-scope piece. DeployOpen plans, implements, hardens, documents and supports self-hosted platforms in your own infrastructure. Ask for knowledge transfer, a runbook for HSM outages, and a handover that your staff can run without the partner present.

How does choosing u.trust or CryptoServer CP5 change the build?

The main difference is the PKCS#11 version: u.trust General Purpose supports PKCS#11 v3, and CryptoServer CP5 supports PKCS#11 v2. That version decides which vendor library you install, how the OpenBao image is built and how the seal stanza is written.

Confirm three things with Utimaco before the build starts:

  • Which library and version match your device and the OpenBao release you run
  • Whether the project's example configuration is written for your HSM model or needs changes
  • How key handling, slot selection and login behave on your model during a restart

Get the compatibility answers in writing, and record them in the design document so the upgrade team can check them later.

What does ongoing operation of an HSM-backed seal involve?

Ongoing operation means keeping the HSM, the library and OpenBao in step, and proving that the cluster can still unseal. The recurring work usually includes:

  • Monitoring HSM availability and alerting on login or connection failures
  • Rotating HSM credentials and reviewing who can log in to the partition
  • Updating the vendor library and HSM firmware, and retesting unseal after each change
  • Retesting the OpenBao upgrade path, because the seal configuration can be affected by new releases
  • Keeping the HSM backup and the OpenBao restart runbook current

Ask the support provider for its patch and notification process, and ask DeployOpen whether ongoing support or a retainer fits the cluster's change rate.

What happens if the Utimaco HSM is unavailable during an OpenBao restart?

OpenBao cannot unseal while it cannot reach the HSM, so the cluster stays sealed and clients cannot read secrets until the HSM returns. This is the main operational risk of any auto-unseal design, and it applies to every HSM, cloud KMS or transit seal.

Reduce the impact in three ways: design the HSM service to survive a single device or site failure where your vendor supports it, alert on seal status and HSM connectivity, and write and rehearse a runbook for an HSM outage that names the people who can restore access. Confirm in the project's guide how seal errors appear in logs and metrics so your monitoring can detect them early.

How DeployOpen scopes an HSM-backed unseal

DeployOpen fixes the scope of an HSM-backed unseal in a written plan before any work starts. The plan settles the seal decision (PKCS#11 seal against a Utimaco device, as opposed to a cloud KMS or another HSM), the exact device model and firmware, which PKCS#11 library generation the build will use (u.trust General Purpose HSMs with PKCS#11 v3, or CryptoServer CP5 with PKCS#11 v2), the network paths between each OpenBao node and the HSM, and the verification that will prove the design works. Scoping these items together matters because the seal choice drives the container image, the HSM partition and key setup, and how each node reaches the device. Changing one of them late usually means rebuilding the others.

The plan also records who is responsible for each control. That includes who creates and holds the HSM partition credentials, who approves changes to the seal stanza and the PKCS#11 lib path, how the HSM administrator and the OpenBao operators coordinate during an outage, and what the client's own change process requires. Your security and compliance teams should confirm these owners before the build. Ask the vendor to confirm current firmware, supported library versions and any production caveats for your device model, because the project's guide is the baseline and your environment may add requirements.

Deliverables are agreed in the same document. DeployOpen hands over runbooks for normal operation, node restart, HSM failover and recovery from a lost or misconfigured partition. The verification evidence includes restart tests on each node, a documented failover test with the HSM unavailable and then restored, and results of unseal after a full cluster restart. Ongoing support, upgrades and periodic retesting after firmware or OpenBao version changes can be arranged as a retainer, which keeps the same team familiar with the design when the next release arrives.

How DeployOpen works on this

DeployOpen plans, builds, documents and supports OpenBao auto-unseal with Utimaco HSMs inside your own infrastructure. We start from the HSM model, PKCS#11 version and key custody rules your organization already has, then follow the project's guide and its production caveats.

How we scope

  • Confirm which Utimaco model you run, u.trust General Purpose HSM or CryptoServer CP5, and its PKCS#11 library version
  • Agree in writing who holds HSM administrator and key custodian roles, and how those roles are separated
  • Define the OpenBao cluster topology, storage backend and the network path from each node to the HSM

How we build

  • Configure the PKCS#11 seal on each OpenBao node, then test initialization, restart and unseal against the HSM
  • Create or import the unseal key material in the HSM under your key policy, not with default settings
  • Verify that disable_mlock is removed from configuration and that the cluster recovers after a node restart

How we hand over

  • Deliver the written configuration, seal settings, HSM key inventory and recovery runbook for your operators
  • Document the recovery keys and the steps to rekey or migrate the HSM-backed seal, with the owners named
  • Run a joint walkthrough of a failover and an HSM outage so your team has rehearsed the procedure

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover
  • Track OpenBao release notes and Utimaco library changes that affect the seal, and plan upgrades with your team
  • Retest the seal configuration after each OpenBao or HSM firmware change before it reaches production

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.