OpenBao static key seal: uses and risks

The OpenBao static key seal stores its root protection key in a file beside the configuration, which makes it simple to run and easy to compromise. This page explains when it is acceptable and how to protect the key if you use it.

On this page

When the OpenBao static key seal is acceptable and when it is not

A team that needs OpenBao to start without someone typing unseal keys after every restart will be tempted by the static seal. The short answer: the static seal uses a 32-byte AES-256-GCM key supplied alongside the configuration, which suits labs, tests and low-risk environments. In production it is a weak choice when that key sits on the same host, in the same configuration management repository or in the same backup as the data it protects, because anyone who can read the configuration can read the key.

At startup, a statically sealed OpenBao reads the key from its configuration and uses it to unseal itself, so no operator has to supply Shamir shares or call the unseal endpoint. That removes manual unseal and makes unattended restarts possible, which matters for test clusters and for single-node services where nobody is on call to run a ceremony. What the seal does not do is protect against an attacker or a careless administrator who obtains the configuration file, a filesystem snapshot, or the storage backend together with that file. Once the key is in hand, the encrypted data is readable without any further control. The static seal also gives you no independent custody record, no separation of duties and no external key service to revoke access through.

Before choosing it, confirm the current behavior, supported configuration keys and any stated limitations in the OpenBao seal documentation, since seal behavior has changed across recent releases. If you do use a static key anyway, treat it as a secret in its own right: keep it out of version control and images, restrict file permissions on the host, deliver it through a path that is not the storage volume, and plan the move to Shamir or an external seal before the cluster holds data you cannot afford to expose. Use the OpenBao documentation as the starting point for those checks, and record the decision and its review date in your change log so auditors can see that the trade-off was made deliberately.

Seal options and when the static seal fits each situation

In a lab or development cluster, the main cost of a seal is the time it takes to restart. A static seal key removes the ceremony, so an engineer can restart a node and have it unseal without collecting key shares or contacting an HSM. That convenience is reasonable when the data is disposable and the cluster never holds real credentials, but it should be a recorded decision that is reviewed before the environment is promoted.

  • Low setup effort: The key is supplied with the configuration, so no ceremony, share holders or hardware is needed to start.
  • Full exposure of the key: Anyone who can read the configuration and the storage backend can unseal the cluster and read its data.
  • Fast rebuilds: Disposable clusters can be recreated quickly, which limits the impact of a leaked lab key.
  • Drift into production: Lab configuration files are often copied into production templates, carrying the static key with them.

Check that lab clusters never hold production secrets and that the static key is kept out of the repository that holds your deployment templates.

Configuring the static seal and generating its key safely

This sequence produces a 32-byte AES-256-GCM key from a trusted random source, stores it where only the OpenBao service can read it, and confirms the server starts with the static seal and unseals without an operator. Each step ends with a check so the configuration is verified before it reaches production.

  1. Confirm the static seal fits your risk position

    Before generating anything, the security owner and the platform lead agree in writing that a static seal is acceptable for this cluster. The key sits on the same host as the configuration, so anyone who can read both can unseal the server and its data. Record which environments (development, test, production) allow it and who approves the exception. The step is done when that approval exists and names the hosts that will hold the key. If your organization requires an external key custodian, stop here and review the auto-unseal options on this pillar instead.

  2. Generate the 32-byte key from a trusted source

    On a trusted administrative host, generate 32 random bytes with an operating system random source such as /dev/urandom through a tool like openssl rand, writing the output to a temporary file with restricted permissions. Do not generate the key on a shared workstation, in a CI log, or in a chat tool. The check is that the raw file is exactly 32 bytes long, which you can confirm with wc -c before any encoding. If the length is wrong, discard the file and generate it again. Confirm the exact generation and encoding steps against the OpenBao seal documentation for your version.

  3. Encode the key for the configuration

    Encode the 32 raw bytes in the format the static seal configuration expects, typically base64, and keep the encoded value only in the file you will place on the host. Confirm the encoded form decodes back to exactly 32 bytes before you delete the raw file. Securely remove the temporary files with a secure deletion tool or by destroying the storage that held them, and check that no copy remains in shell history or editor backups. The check is a decode round trip that returns 32 bytes. Confirm the configuration key names and expected encoding against the seal documentation for your OpenBao version.

  4. Place the key in a root-owned file outside the data directory

    Write the encoded key to a dedicated file, for example under /etc/openbao/, and keep it out of the Raft or PostgreSQL data directory and out of any backup set that includes the data directory. Set the owner to root and the group to the service account group that runs OpenBao, so the service can read it and no other local user can. Reference the file path from the seal stanza in the server configuration. The check is an ls -l and stat review showing the expected owner, group and mode, and a confirmation that the key path does not appear inside the data path.

  5. Set restrictive file permissions and confirm access

    Set the key file mode to read-only for the owner and no access for others, typically 0400 or 0440 when the service group needs read access. Confirm that a non-privileged local account cannot read the file, and that the OpenBao service account can. Restrict directory permissions on the parent folder the same way. The check is two access tests: one denied read for an unrelated user and one successful read by the service user. Also confirm that configuration files and systemd unit files do not contain the key itself. Record the permission state in your change ticket.

  6. Start the server and confirm the seal type

    Start the OpenBao server with the updated configuration, and if the cluster is new, initialize it according to your recovery plan. Note that a static seal protects the root key but does not replace the initialization material handling you planned for the cluster. Run the status command and confirm the reported seal type is static and the sealed state is false. Review the server logs for any error about the key length, the key path or the encoding. The check is that the status output matches the seal type you configured, which proves the server read the intended stanza.

  7. Confirm automatic unsealing after a restart

    Restart the OpenBao process with the service manager, without any operator unseal input, and wait for it to report ready. Repeat the status check and confirm the server is unsealed. Then stop the service, move the key file aside on a test host, and confirm the server stays sealed and logs a clear failure, which proves the key is the only unseal source. Restore the file with its original permissions before you return the host to service. The check is an unattended restart that returns to unsealed and a documented failure when the key is missing.

Protecting the static key and the risks that remain

The static seal keeps the root key in a file next to the configuration, so the protection of that one file determines the protection of everything OpenBao stores. The cards below cover the risks that remain after you accept the static seal, and the controls to put in place for each.

Key stored beside the configuration

The static key is supplied alongside the configuration, so anyone who can read the server's configuration can read the key. Restrict the key file to the OpenBao service account with owner-only read permissions, keep it out of the same directory as shared configuration, and keep it out of version control and container images. Check file ownership and mode after every provisioning run, not only at first install.

Seal configuration docs

Backups that copy the key

A snapshot or backup of the data store is useless without the key, but a backup that includes the key file is a complete copy of the secrets. Store backups encrypted and in a location separate from the key, with different access controls. Confirm which files your backup job captures before you rely on it, and record where the key copy is held for recovery.

Host compromise exposes everything

An attacker with root access to the host can read the key file and the storage files together, which removes the protection that encryption at rest would otherwise give. The static seal does not add a second factor on the host. Use host hardening, limit administrator access, forward audit logs off the host, and treat any suspected host compromise as a reason to rotate the affected secrets.

Key rotation is manual

Replacing a static key means controlling every node, the stored data and every copy of the key in step. Plan rotation as a scheduled change with a rollback path, and confirm with the vendor how the current release handles a changed seal key before you attempt it in production. Test the procedure in a non-production cluster first.

Lost key makes data unrecoverable

If the key file is lost or corrupted and no other copy exists, the encrypted data cannot be decrypted, and no vendor or project can restore it. Keep an escrowed copy under dual control, and run a recovery drill that restores a cluster from backup and the escrowed key. Record the drill result and the date of the last successful test.

Access to the key is not logged

File permissions limit who can read the key, but they do not show who did. Enable file-level auditing on the key path, alert on reads by unexpected processes, and review those logs on a fixed schedule. Without this record, you cannot show an auditor or incident responder who accessed the key during a given period.

Moving from a static seal to a stronger seal later

Treat the static seal as a stage you may leave, and plan the exit before the first initialization. A team that starts with the static seal for a lab or a short-lived proof of concept should decide now which stronger seal it expects to adopt, whether Shamir key shares, a KMS plugin or an HSM over PKCS#11. The reason is practical: the static key lives in configuration and on disk, so every later change to the seal touches the same material that protects the root key. Write down the current seal type, the key file location, who can read it, and the target seal with an owner and a rough date. Record that decision in the same runbook that covers the rest of the deployment, so it is not rediscovered during an incident.

Before you plan any change, confirm the supported migration path for the exact OpenBao version you run. The OpenBao migration guide and the release notes for your version are the sources to check, because seal transitions depend on the version and the seal plugin involved, and the migration guide describes its own tested scope. Ask the vendor or project, and your own test environment, whether the transition is an in-place seal change, requires a rekey or a recovery step, and what must be done on every node. Do not rely on a procedure copied from a forum or an older release. Rehearse the change on a non-production cluster with a backup of storage and a tested restore, and record the exact commands and the observed behavior so the production change is a repeat, not an experiment.

To avoid locking yourself into the static seal by accident, check for drift in every environment. Common causes are a development configuration copied into a production image, an automation template that still references the static key path, or a team that never scheduled the follow-up work. Review the seal stanza in each node's configuration and in your infrastructure code, and confirm that the stronger seal is planned with a named owner. For the options themselves, see the sibling topics on the Shamir unseal key ceremony, the PKCS#11 HSM seals, the cloud KMS plugins and the transit and KMIP seals, and compare their operational dependencies before choosing one.

Questions teams ask about the OpenBao static key seal

Is the OpenBao static key seal safe for production use?

It can be acceptable for development, labs and some tightly controlled environments, but it is a weak fit for most production systems. The static seal stores its AES-256-GCM key alongside the server configuration, so anyone who can read that key and the storage backend can decrypt the protected data. Treat it as acceptable only when you have a documented reason to avoid an external key service, the hosts are isolated and well managed, and your risk owners accept that the key is only as safe as its storage. Check your threat model and any compliance requirements before you decide.

How much effort does it take to protect the static seal key?

The seal setup itself is small. Most of the effort goes into controls around the key: where it is stored, how it reaches each host, who can read it, how copies are backed up and how access is logged. The main drivers are the number of hosts that need the key, whether the key is delivered by configuration management or a secrets store, the backup design (including any offline or split copies) and the audit evidence your security team expects. Each added host and each added copy increases the number of places the key can leak from, so the protection work grows with the footprint.

What does a static seal deployment need from our internal team?

Your team needs three things: platform engineers who can run and restart OpenBao safely, an owner for key custody who decides who may read or copy the key, and a reviewer who can check access controls and logs. The work also depends on practical skills in Linux host hardening, configuration management, backup and restore testing, and change control. Before you start, ask who approves key access, who holds the offline copies, how a restore is tested and who signs off a key change. If those answers are unclear, the deployment is not ready for production.

Do we need an implementation partner for a static seal deployment?

A partner is optional. Many teams can run a static seal in a non-production setting with their own engineers. A partner helps most when the design must pass a security or compliance review, when several clusters need consistent key handling, or when your team lacks time to build the controls and documentation. DeployOpen plans, implements, hardens, documents and tests self-hosted open-source platforms inside your own infrastructure. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and a quote follows from that written scope. Key custody decisions stay with your organization.

How do we move from a static seal to a stronger seal later?

Plan the move before production data depends on the static key, because changing the seal is a planned migration with its own risks. Stronger options include auto-unseal with a cloud key service, a hardware security module over PKCS#11, KMIP, or a transit seal from another OpenBao cluster. Each option adds a dependency, such as network access to a key service or availability of another cluster, so test the chosen seal in a non-production copy first. Take verified backups before the change, confirm the current seal migration procedure in the OpenBao documentation for the version you run, and rehearse the rollback.

What changes when the static seal key is rotated or lost?

Losing the static key can make the data it protects unrecoverable, so the first control is a verified, access-controlled copy stored outside the production hosts. Rotation is a planned change with a documented procedure, a test in a non-production copy and a rollback path that keeps the old key available until the new key is verified on every node. Confirm how the version you run handles seal key rotation, and whether a restart is needed on each host. Record who performs the change, when it happens and how the result is checked, because auditors and incident responders will ask for that record.

Which factors make static seal work cost more or less?

Costs come mainly from people time and from the controls around the key, not from the software, which is open source under MPL-2.0. One-time work includes design, initial setup, host hardening, documentation and a first restore test. Recurring work includes rotation procedures, access reviews, upgrades, monitoring and evidence collection for audits. Costs rise with the number of hosts, the number of clusters, the strictness of audit requirements and the complexity of backup design. When you ask for a quote, specify the host count, the storage backend, the key custody model, the evidence your auditors need and the retest expectations, so the scope can be priced against them.

Limits to confirm in your environment before relying on the static seal

The static seal is simple to set up, but its acceptability depends on details that vary by OpenBao version, assessor, cluster topology and backup design. Each card names one limit to check, and each check should be confirmed against the vendor documentation, your compliance assessor and a test cluster you build yourself.

Seal behavior in your version

Static seal behavior and its configuration keys can change between releases, and the project's own guidance on seals shifts as its KMS plugins mature. Confirm how the static seal is documented for the exact OpenBao version you will install, including how it is configured, how the key is loaded at startup and what happens during a seal migration. Record the version in your design document, because a later upgrade may change the procedure you tested.

Storage backend docs

File-based key custody acceptance

The static seal keeps the unseal key in a file or configuration source that the OpenBao process reads at startup, which is a different custody model from an HSM or cloud KMS. Ask your assessor early whether file-based key custody satisfies the key management controls in your scope, and what compensating controls they expect, such as restricted file permissions, separate custody of the key and encrypted storage of the key at rest. Get that answer in writing before you build the design.

Key behavior across HA nodes

Every node in an HA cluster must be able to read the same 32-byte key to unseal after a restart or failover. Test how the key is distributed to each node, how it is kept identical across them, and what happens when one node receives a stale or different copy. A mismatched key can leave a standby unable to unseal, which is only discovered when that node is needed. Rehearse a rolling restart in your test environment before go-live.

Backup tooling and key copies

Backup agents, snapshot jobs and configuration management tools often copy whole directories, which can silently capture the unseal key alongside the Raft or PostgreSQL data. Inspect every backup job that touches the OpenBao host, the configuration directory and any image or template build, and confirm the key is excluded or stored separately. Then test a restore to a clean host to prove the cluster can unseal without relying on an unintended copy of the key.

Key rotation and recovery procedure

A static key cannot be rotated the same way a Shamir share set is replaced, so the procedure for changing the key and recovering from its loss needs to be written and tested. Confirm with the vendor documentation how a key change is performed on a running cluster, whether a seal migration is needed, and how the cluster behaves if the key is lost. Keep the recovery steps where your on-call team can reach them without the cluster being available.

Fit with your audit evidence

Your auditors will want to see how the key was generated, who can read it, when it was changed and where access to it is logged. Confirm which events OpenBao audit logging records for seal operations and which events must come from host logs or file access monitoring instead. Map each evidence item to a control in your assessment plan before you rely on the static seal in production, so the gap is found in a test run rather than in an audit.

Where the static key sits relative to data and backups

The diagram starts at the operator's host, where the static key file is created and handed to the OpenBao server at startup. The server encrypts data before it is written to the storage backend, and backups copy that encrypted data out to a separate location. The point to check is the dashed boundary: if the key file is stored on the same host, in the same backup job, or in the same snapshot as the storage data, anyone who gets that one location can read the secrets. Separating those paths is the main design decision for this seal.

Static key, encrypted data and backups: the trust boundary where they coincide.

A decision path for choosing the static seal

The first two questions usually decide whether the static seal is a candidate at all. Ask whether the cluster holds real data or only test data, and whether a policy, contract or regulator requires the root key to sit in custody outside the platform team's control. The static seal keeps a 32-byte AES-256-GCM key alongside the configuration, so anyone who can read that key and the storage backend can recover the data. For a disposable lab, that trade is often acceptable. For a cluster that holds production secrets, or one where key custody is already a written requirement, the static seal fails before any engineering starts, and the team should plan a sibling seal topic instead.

The next two questions concern operations. Can your operators run a manual unseal when a node restarts, and how often do nodes restart? Shamir ceremonies and HSM or cloud KMS seals keep key material separate from the server and depend on people or services that are not on the host. The static seal removes that human or external step because the key is always present, which suits automation but also means the key is always on the host. Frequent restarts from patching, autoscaling or node replacement multiply the number of times the key is read from disk. Count restarts in your environment and confirm that your automation keeps the key out of logs, process listings and shell history.

Use the static seal only where the risk is accepted in writing. That record should name an owner who signs off that the unseal key lives beside the configuration, list who can read it, and state the compensating controls: restricted file permissions on each host, limited access to configuration management, encrypted backups of the configuration, and a dated plan to move to another seal. If the lab question is answered no, the custody policy applies, or operators cannot recover a node without the key on the host, plan a sibling topic instead: a Shamir ceremony for a team without an external key service, an HSM or cloud KMS where custody must sit outside the platform, or transit or KMIP where an existing key service is already governed. Confirm the migration path off the static seal with the current OpenBao documentation before you commit, because the change touches every node.

How DeployOpen works on this

DeployOpen starts from the question of whether a static key seal fits your risk profile, then builds only what the written scope covers. The work runs inside your infrastructure, so key custody, configuration and evidence stay under your control from the first day.

How we scope

  • We record which environments would use the static seal and which would need a different seal method, such as an HSM or cloud KMS.
  • The written scope names the key custody model, who holds the 32-byte key file and where the configuration sits.
  • Engagements are fixed-scope, so deliverables and timelines are agreed in writing before any work starts.

How we build

  • We configure the static seal on test nodes, with the key file stored outside the configuration directory and access limited to the service account.
  • We test restart, unseal and failed-key scenarios so your team sees what happens when the key file is missing or altered.
  • We check that the key material never appears in logs, shell history, backups or container images used for the deployment.

How we hand over

  • You receive a written record of the seal decision, the key handling procedure and the recovery steps for each node.
  • The handover covers the backup and rotation plan for the static key, with owners named for each step.
  • We document the migration path to a stronger seal, so your team can plan that move without rebuilding the cluster.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, covering seal changes after OpenBao upgrades.
  • A retest of the seal configuration can follow remediation, so you can confirm that the agreed fixes hold.
  • Quotes follow from the written scope, so ask for the key custody, testing and documentation items to be listed separately.

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.