Securing OpenBao root token generation and rekey endpoints

Who can generate root tokens, rekey the cluster and hold unseal or recovery keys in OpenBao, and how to lock those operations down before production.

On this page

Why OpenBao root token and rekey controls come first in hardening

This section explains why the operations that can override every policy in an OpenBao cluster should be locked down before any other hardening work. In a production cluster, root token generation, rekey operations, and custody of unseal and recovery keys sit above the access model you have built with policies and auth methods. Anyone who can produce a root token or reconstitute the unseal key can read every secret, change every policy, and turn off the controls that were meant to watch them. This page covers authenticated root token generation as it works in 2.6, the rekey endpoints that have been disabled by default since 2.5, revoking root tokens after use, and deciding who holds unseal or recovery keys.

Because these controls are close to the root of trust, the order of work matters. Each of the other hardening tasks in this group, such as lockout, rate limits, and secret-zero delivery, assumes that a single person or unauthenticated caller cannot bypass them. Start by inventorying every path that can issue a root token or start a rekey, every person or system that holds a key share, and every place those shares are stored. Then confirm which endpoints are reachable from which networks in your deployment. The exact endpoint behavior and default settings for the version you run should be checked against the release notes for that version, since the project's release pages and documentation are the authoritative sources. Treat anything you read here as a starting point for that check, not a substitute for it.

The decisions that follow are organizational as much as technical. You will need to name who may request a root token, who must approve it, how long it may live, and who confirms that it was revoked after use. You will also need a written list of key-share holders, a threshold for reconstituting the key, and a procedure for what happens when a holder leaves. Ask your OpenBao contact or implementation partner to walk through these decisions against your own environment before any change is made to the cluster, and record the answers in the same place as your other runbooks.

Which root token and rekey controls fit which operating model

This table compares the root token, rekey and token revocation options against the operating models a team is likely to run. Read each row as a decision: when the option fits, what operators must do to keep it working, and how it affects how fast you can respond during an incident. The main takeaway is that the faster emergency path usually carries more standing risk, so pick the slowest path your recovery objectives can tolerate and confirm defaults in the configuration reference for your version.

ControlWhen it fitsWhat operators must provideEffect on incident response
Root token from existing authenticated root accessSmall team with a senior operator already holding root-level access and steady administration workNamed operators with a documented procedure, MFA on the identity used, and logged use of the generated tokenFastest route when the cluster is reachable, but depends on operators who are available and not compromised
Break-glass root token procedureRegulated environments that need a rarely used emergency path separate from daily administrationSealed or split custody of the emergency credential, a written trigger policy, and a drill schedule to confirm the steps workSlower to start because approvals and custody steps come first, but limits who can act alone
Rekey with a quorum of unseal key holdersOrganizations that want no single person able to reconfigure the unseal arrangementEnough distinct key holders available across time zones, and a tested process for gathering sharesAdds coordination time during recovery; a missing holder can stall the procedure
Recovery keys held in separate custodyTeams that separate operational unseal from recovery authority and store recovery material apart from daily operatorsSeparate custodians, documented storage locations, and confirmation of which key type each step needsRecovery material is reachable only through named custodians, so custodian availability sets the response time
Revoke root tokens immediately after each useEnvironments where every root action must be traceable to a single short-lived grantAutomation or an operator step that revokes the token after the task and records the revocationAdds a step to every emergency action, but limits the window in which a leaked root token can be used
Keep root tokens for a defined period after useTeams running long migrations or repeated fixes that need the same root session across several stepsA time-bound justification, monitoring of token use, and a documented end pointSpeeds multi-step recovery, but widens the exposure window if the token is copied
Rekey without custody reviewLabs or single-operator test clusters where no production control appliesOnly acceptable outside production; confirm the endpoint behavior in your configuration referenceFast, but gives no separation of duty and leaves no evidence of who approved the change

How the powerful operations and key holders relate

The workflow starts with a break-glass request for a root token, which is generated under authentication and used for a narrow task. A rekey or recovery operation then needs several unseal or recovery key shares, each held by a separate person or custody system outside the cluster. The trust boundary sits between the cluster and those holders, so no single party can complete the operation alone. Check that each step is logged in the audit device and that the root token is revoked once the task is done.

Break-glass root tokens and multi-holder rekey operations both cross the cluster boundary and leave audit records.

How root token generation and rekey are authorized

Authenticated root token generation, which the 2.6 line supports, ties the process that issues a root token to an identity that must authenticate first, so a network caller cannot obtain root power simply by reaching the endpoint. The older unauthenticated path let anyone who could reach the endpoint start the flow and present key shares, and the rekey endpoints followed a similar pattern until unauthenticated rekey was disabled by default in 2.5. Before you change any settings, confirm in the operator docs for your release which steps require a token, which parameters each step takes and which audit entries each step writes. Treat those docs, not earlier Vault behavior, as the reference for your build.

Rekey is gated by key material: unseal key shares, or recovery key shares where your seal configuration uses them, must be presented in a quorum that meets your threshold, so one operator holding one share cannot change the key arrangement alone. That makes share custody a control decision. Decide how many shares exist, what the threshold is, who holds each share, where each share is stored and whether any single person or team could assemble a quorum. Confirm which share type applies to your seal type. Record the custodians and the procedure in your runbook before the first rekey, not during an incident.

These endpoints act on the whole cluster, so their exposure matters on every listener and every network path that reaches a node. A listener bound to a workload network, a load balancer that forwards all paths or an ingress rule that exposes the API broadly can widen the attack surface even when the server itself is configured correctly. Review each listener in the server configuration, confirm which paths each one serves and limit administrative operations to the networks and identities that need them. Generate root tokens only for a specific task, revoke them when that task ends, and confirm that your monitoring would flag an unexpected root token or rekey attempt.

Setting up the root token and rekey controls in order

This sequence locks down the two most powerful operations in OpenBao, root token generation and rekeying, before production depends on them. It produces a confirmed version baseline, restricted listeners, a named key holder register, a rehearsed procedure and audit evidence for each operation.

  1. Confirm the version and read the release notes

    The platform engineer records the running version on every node with bao version and confirms that all nodes match. They then read the release notes for the minor line in use, focusing on the authenticated root token generation change in 2.6 and the default-off unauthenticated rekey endpoints since 2.5. Current releases are listed in the OpenBao releases page. Done means every node reports the same version and the relevant release notes are filed with the change record. Confirm exact flags and behavior against the release notes for your version, not from memory.

  2. Restrict rekey and root token paths at the listener

    The platform engineer sets listener-level controls in the server configuration on each node. They confirm the exact configuration keys for unauthenticated rekey endpoints and root token generation in the configuration reference for their version, then bind the API listener to the management network where possible. After a configuration validation and restart, they send a rekey initialization and a root generation request from a host outside the administrative network. Done means both requests are refused, and the refusal is recorded in the change log with the node name and version.

  3. Record who holds each unseal and recovery share

    The security lead keeps a key holder register with one row per share: share number, named holder, storage location, backup custodian and the date the share was last verified. No single person should be able to meet the unseal or recovery threshold alone, so the register is checked against the quorum set in the key policy. A second person reviews the register and signs off. Done means the number of registered shares equals the number issued, the threshold can only be reached by the defined group, and the register is stored where the security team controls access.

  4. Rehearse rekey and root generation in non-production

    The platform engineer runs a full rekey with bao operator rekey and a root token generation with bao operator generate-root on a non-production cluster built from the same configuration. Shares are collected from the register holders in the same way production will require. The new root token is used once for a defined task and then discarded. Done means the operations complete, the test cluster serves requests with the new material, and an unauthenticated attempt is refused. Confirm command options in the OpenBao CLI reference for your version before the rehearsal.

  5. Verify audit entries for every root and rekey operation

    Before the rehearsal, the security engineer confirms that an audit device is enabled and writing to a location the operations team cannot alter. After the rehearsal, they search the audit log for the rekey and root generation requests, the root token creation and the revocation. Each entry should identify the requester and the time, and the review should confirm that no secret values, shares or token values appear in clear text. Done means every operation in the rehearsal has a matching request and response entry. Confirm audit device paths and log fields in the OpenBao audit documentation.

  6. Revoke each root token after its single use

    The operator follows a written procedure: once the task requiring a root token is finished, they revoke that token with bao token revoke using its accessor. The change record notes the accessor, the task, the time and the second person who witnessed the revocation. Root tokens should never be stored in CI variables, shared notes or runbooks. Done means bao token lookup for the revoked token returns an error, and the audit log shows the revocation. Ask your team to rehearse this step so it is routine before an incident.

  7. Repeat the listener and register checks after upgrades

    After each OpenBao upgrade, the platform engineer repeats the version check, the listener refusal test and the key holder register review. Configuration keys and defaults can change between minor lines, so the release notes for the new version are read again before the restart. Done means the post-upgrade record shows the same version on every node, the refusal test still passes and the register matches the current holders. Schedule this check as part of the upgrade plan, not as an afterthought.

Who should hold unseal and recovery keys, by role

Platform and security leads decide who may hold each key share, how many shares are needed to unseal or recover, and when custody changes. They approve the custody policy, the list of named key holders and the conditions under which root token generation or a rekey may be started. They do not normally handle shares during a routine ceremony, because their value is in setting the rules that operators follow and that auditors check.

  • Approve the custody map: Record which named individuals hold each unseal or recovery share, which backup custodian covers each one, and where each share is stored.
  • Set the threshold with the business in mind: Choose a share count and threshold that let the cluster recover when some holders are unavailable, without letting a small group rebuild root access.
  • Own the start conditions: Approve every root token generation or rekey request in writing, with a stated reason, a time window and a named operator.
  • Plan custodian changes: Define what happens when a holder leaves, changes role or loses a share, including a rekey that retires the old shares.
  • Never approve your own request alone: Require a second approver who does not hold the shares being used.

Confirm the exact custody and separation rules against your own compliance and custody requirements, and have your assessor review the policy before the first ceremony.

Security risks that root token and rekey exposure creates

Root tokens and unseal or recovery keys can each rebuild control of an entire cluster, so their exposure is the central concern of this topic. The cards below pair each risk with the control that reduces it, and each one names a check you can run in your own environment.

Root token left active after an incident

A root token that stays valid after the work that needed it is finished gives an attacker full administrative reach for as long as it exists. Revoke each root token as soon as its task ends, and check the token list after every ceremony or emergency access. Confirm the revocation step appears in your runbook, because the procedure depends on your process rather than on a default that enforces it.

Rekey endpoints reachable from wrong networks

Rekey operations can be started from any network path that reaches the API listener, which makes listener reachability a root-level exposure. Restrict the cluster API so that only operator bastions and the load balancer path can reach the endpoints used for unseal and rekey work. Verify the restriction from a host outside those networks, and treat any successful call from an unexpected source as an incident.

Unseal shares held by one person

If one individual or one system holds enough unseal shares to meet the threshold, that party can unseal the cluster alone. Split shares across separate people and separate custodians, and set the threshold so that no single holder can complete a ceremony. Record who holds each share, and confirm the holder list matches the threshold design before each rotation.

Ceremony audit records left unreviewed

Root token generation, rekey and recovery operations generate records that show who acted and when, but those records only help if someone reads them. Route audit output to a store that the security team controls, and review entries for each ceremony against the change ticket. Confirm which events your audit device captures and who is responsible for the review.

Pipelines storing root credentials

Automation that keeps a root token or unseal material in CI variables exposes those secrets to every job with access to the pipeline. Remove root credentials from pipelines entirely, and require a human-attended ceremony for any step that needs them. Scan pipeline definitions and variable stores for values that match root or unseal material as part of your review.

Recovery keys stored beside the cluster

Recovery keys stored on the same hosts, in the same backup set or in the same vault as the cluster let one compromise defeat every protection on it. Keep recovery material in separate custody from the cluster infrastructure and from the storage backend backups. Test the recovery path with the custodians as part of a planned exercise, and confirm the storage location and access list in writing.

Revoking root tokens after break-glass use

A root token should be treated as a break-glass credential with a defined revocation step after every use, so that the most powerful access in the cluster exists only for the window in which someone needs it. Leaving a root token active after an incident is one of the simplest ways to turn a single emergency into a standing risk. Before the token is generated, decide who is allowed to request it, who approves the request, and who performs the revocation, and write those names into the runbook rather than leaving them to be settled during the incident.

Each use should produce a record with four parts: the reason for the request, the approver, the time window in which the token was valid, and the actions taken while it was active. Keep this record outside the OpenBao cluster so that it survives a cluster failure, and reference the matching entries in the audit device so the two can be reconciled. After revocation, confirm it from the audit trail: the revoke operation should appear with the expected accessor, and no later requests should succeed with that token. Check the revocation commands and any token lifetime or TTL settings in the OpenBao documentation for your exact version before you write the procedure, because these details change between minor lines.

Fast emergency access and strict revocation pull against each other. A short token lifetime protects you from forgotten tokens but can cut off a long recovery, while a long lifetime gives operators room to finish work and widens the exposure if the token leaks. Settle this trade-off in advance by agreeing on the longest recovery task the token must support and revoking it as soon as that task ends. Then rehearse the full sequence, from request to approval, generation, use, revocation and audit review, in a non-production cluster at least once a year and after any change to the auth or audit setup. A rehearsal is the only reliable way to find the missing approver or the unclear command before it costs time during a real incident.

Limits to confirm in your environment before relying on these controls

The controls on root tokens and rekey endpoints depend on the exact release, the storage backend and how your cluster and automation are wired. Each card below is a fact to confirm in your own environment before you write these controls into your runbooks.

Root token behavior in your release

Confirm that the OpenBao release you run includes the authenticated root token generation behavior covered in this topic, which the project introduced in the 2.6 line. Check the release notes for the exact minor and patch version rather than assuming the behavior carries across the whole line. Record the version in your change records, because the procedure you document is only valid for that release.

OpenBao releases

Default state of rekey endpoints

Confirm whether the unauthenticated rekey endpoints are disabled by default in the version you run, and whether any configuration in your environment re-enables them. Do not assume a default carried over from an earlier Vault or OpenBao configuration you migrated from. Test the endpoint state directly on a non-production cluster before you write the control into your baseline.

Rekey behavior across HA nodes

Confirm how your cluster handles a rekey when several nodes are running, since the active node and standby nodes coordinate through the data store and forwarding. Check which node must process the operation, how unseal progress is tracked, and what happens if the active node changes mid-ceremony. Record this in your runbook so operators know which node to target and how to recover from an interrupted ceremony.

OpenBao high availability docs

Storage backend and procedure

Confirm which storage backend you run, because integrated storage (Raft), PostgreSQL, PebbleDB and in-memory differ in how they are backed up, restored and made highly available. The backend determines what you snapshot before a rekey or root token operation and how you roll back if a step fails. Use the storage documentation to match your backend to the steps in your runbook.

Storage backend docs

Dependence on open endpoints

Confirm whether any scripts, provisioning jobs, monitoring checks or third-party tools call the rekey or root token endpoints without authentication. Disabling or restricting these endpoints can break automation that was never documented. Inventory every caller, replace any that depend on unauthenticated access with an authenticated and audited path, and test each change before enforcing the restriction.

Identity provider and root access

Confirm how your identity provider and auth methods interact with root access, including whether any administrator can obtain a root token through a path that bypasses your normal approval steps. Check which groups or identities can reach the root token generation path, whether login MFA applies to them, and who holds unseal or recovery key shares. A compromised identity provider can expose these paths, so review them together rather than in isolation.

Questions buyers ask about root token and rekey hardening

How much effort does root token and rekey hardening take?

Effort depends on how many clusters you run, how many people hold unseal or recovery key shares, and how those shares are custodied. One cluster with a small, named group of key holders and a documented ceremony is a bounded task. Effort rises with each additional cluster, because the change to disable unauthenticated rekey and the root token review must be verified in every environment. The custody model changes the ceremony: keys held by individuals, split across a custodian group, or protected with a cloud KMS each need different procedures. Automation adds work when pipelines call rekey or root token endpoints and must move to authenticated paths. Audit requirements add evidence work. Ask any partner to break the quote into these components so you can see what drives the price.

Can our internal team harden root tokens and rekey endpoints without outside help?

Many platform teams can, provided someone has run an unseal ceremony before and can read the OpenBao configuration and audit logs. The work covers finding which operations still depend on root tokens, confirming that the rekey endpoints are disabled for your release line, moving automation to authenticated flows, and writing a runbook for key holders. Teams often find the hard part is coordination rather than configuration: identifying every script that rotated keys in the past, and showing an auditor that no single person can produce a root token alone. If nobody on your team has performed a rekey or root token generation, a supervised rehearsal in a non-production cluster lowers the risk of a mistake in production. An outside review is worth considering when no one clearly owns the key ceremony.

What do we need to provide before hardening starts?

Before work starts, you need to provide the following:

  • Read access to the cluster configuration, listener settings and the list of enabled audit devices, plus the OpenBao version and release line in use.
  • Named key holders for unseal and recovery keys, with confirmed availability and a documented custody location for each share.
  • A change window agreed with platform and application owners, along with a rollback plan.
  • Your compliance requirements: which controls your auditors ask about and which evidence format they accept.
  • An inventory of pipelines, scripts and people who currently use root tokens or rekey operations.

Delays most often come from key holders who are unavailable on the agreed date, so confirm their availability early.

How long does root token and rekey hardening take?

Duration depends on the scope drivers rather than a fixed figure. The main drivers are the number of clusters, whether each cluster runs as an HA group, the number of key holders who must attend a ceremony, and how many automation pipelines must be found and moved to authenticated access. Time also grows if a non-production copy must be built for rehearsal, or if an auditor needs evidence captured before the change. Each driver should appear as a milestone in the written scope so you can see where time is spent. Fixed-scope engagements agree timelines in writing before work starts, so ask for the milestone plan and the assumptions behind it before accepting a date.

What does a fixed-scope engagement deliver for root token and rekey hardening?

The exact deliverables are set in the written scope, but a typical package covers a review of your root token and rekey posture, configuration changes that disable unauthenticated rekey endpoints where your release line allows it and require authentication for root token generation, and a procedure for revoking root tokens after use. It also usually includes a key holder register, a custody procedure, an operator runbook for rekey and root token generation, and a rehearsal record. An evidence pack with configuration snapshots, audit log samples and the list of who holds which share helps your compliance team. DeployOpen prepares this evidence, but independent auditors issue any audit report. A quote follows from the written scope.

Who should hold unseal and recovery keys in OpenBao?

Key holders should be a small set of named individuals from different teams, and no single person should hold enough shares to meet the threshold. Each share needs its own documented custody location, and the custody record should show who holds it and how access is logged. Disabling the unauthenticated rekey endpoints does not replace good custody, because anyone holding enough shares can still perform a rekey through the authorized process. Plan for departures and absences: a holder who leaves should trigger a rekey, and the replacement process should be tested. Review the register on a schedule and after every ceremony, and confirm the threshold with your security team before you finalize it.

Is root token and rekey hardening enough to pass a compliance review?

It helps, but it is rarely enough on its own. Compliance reviews usually ask for evidence that privileged access is limited, that key custody is defined, and that privileged actions are logged and reviewed. Root token and rekey hardening supports those points, yet the wider control set also covers identity, audit logging, policy design and change management. Ask your compliance lead which controls and evidence formats apply to your environment before scoping the work. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Those come from independent auditors and certification bodies.

How DeployOpen scopes and delivers root token and rekey hardening

DeployOpen treats root token generation and rekey endpoints as high-risk operations that need written boundaries before any configuration changes. We scope the work around your current OpenBao version, your unseal and recovery key custody, and the people who must be able to perform these operations during an incident. Engagements are fixed-scope, with deliverables agreed in writing before work starts.

How we scope

  • Inventory every OpenBao version, listener and auth path where root token or rekey operations are reachable today
  • Confirm which OpenBao minor line you run, since root token generation behaves differently in 2.6 and rekey defaults changed in 2.5
  • Map who holds unseal and recovery key shares, where they are stored and which roles must approve a rekey
  • Agree in writing which environments, clusters and runbooks are in scope and what evidence the review will produce

How we build

  • Confirm endpoint exposure and disable unauthenticated rekey paths where your configuration still allows them
  • Define the authenticated root token generation procedure, including who initiates it and how the one-time token is captured
  • Set policy and audit device checks so root token and rekey requests are logged and alerted on
  • Test each control against a live cluster, including failed attempts from unprivileged and unauthenticated clients

How we hand over

  • Deliver a written configuration record covering rekey state, root token procedure and key custody assignments
  • Provide a runbook for emergency root token generation and for revoking the token immediately after use
  • Document the verification steps your team can repeat after every upgrade or configuration change
  • Walk your operators through the procedure and record the handover against the agreed scope

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer if you want DeployOpen to keep these controls current
  • Re-verify rekey and root token settings after each OpenBao release you apply, using your documented checklist
  • Retest the endpoints when your key holders, identity providers or operators change
  • Confirm retainer scope and terms in writing with your quote, since DeployOpen does not publish a price list

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.