How OpenBao lease management keeps dynamic secrets under control
If your applications receive dynamic database or cloud credentials from OpenBao, the core question is how long each credential lives, who renews it and how you cut it off when something goes wrong. OpenBao's documentation describes leasing with automatic revocation and bulk revocation as built-in capabilities, so the work for your team is less about inventing a mechanism and more about choosing lease durations, deciding which workloads may renew, and proving that revocation reaches every credential you care about. Start by listing each secrets engine that issues leased credentials and confirming, in that engine's own documentation, its default and maximum TTL, whether it supports renewal and what happens to the backend account when a lease is revoked.
Bulk revocation is what teams need when the situation is no longer about one credential. It is the usual response after an incident, such as a suspected token leak from a CI runner, or when credential sprawl grows across many mounts and nobody can say quickly which applications hold live leases. Before an incident happens, rehearse the revocation path in a non-production cluster: identify the prefix that covers the affected leases, confirm who holds the permission to run the revocation, and record how long it takes for downstream systems to reconnect with fresh credentials. Revocation only helps if applications can fetch new credentials quickly, so the rehearsal should include the application side, not only the OpenBao call.
Lease behavior also depends on how your clients behave. Clients that renew too late lose access in the middle of work, while clients that never renew leave leases to expire on schedule, which is often the safer outcome. Ask your application owners to show how their clients handle renewal failures and re-authentication, and check that your monitoring reports lease counts and expirations so that a sudden spike or a drop in renewals is visible. Confirm the exact behavior of each engine with its documentation and your own tests, because revocation semantics differ between engines, and treat any gap you find as a planning item for the rollout rather than something to fix during an incident.
Lease and revocation options and when each fits
This table compares the four levers you have over dynamic secret lifetimes: TTLs per mount, client renewal, single-lease revocation and prefix revocation. Read each row for when the option fits and what it costs in renewal traffic or exposure window. The main takeaway is that TTLs set your exposure ceiling, while revocation is the response tool you rely on after an incident.
| Option | When it fits | Trade-off |
|---|---|---|
| Default TTL per mount | Baseline lifetime for most dynamic credentials issued from a given secrets engine or role | Short defaults limit exposure but increase renewal requests; long defaults widen the window a leaked credential stays valid |
| Maximum TTL per mount | Hard ceiling so no renewal chain can keep a credential alive indefinitely | Forces periodic re-issuance; clients that cannot re-fetch credentials will fail when the ceiling is reached |
| Client renewal | Long-running workloads such as services or batch jobs that need continuous access | Every renewal is a request to the cluster; many clients on short TTLs can produce heavy steady load |
| Explicit single-lease revocation | One credential is suspected compromised, or a workload has been decommissioned | Precise and low impact, but you must know the lease ID; it does not help when you cannot enumerate affected leases |
| Revocation by prefix | Incident response that affects a whole role, path or application scope at once | Fast and broad, so it can disrupt unrelated consumers under the same prefix; confirm the prefix scope before running it |
| Shorter TTLs with automatic re-issuance | Workloads that can fetch new credentials reliably, such as those using an agent or the Kubernetes integration | Lowest exposure window, highest request volume; confirm your clients handle re-issuance errors gracefully |
Set up leases and test a bulk revocation
This sequence sets lease TTLs for each mount, confirms that clients renew their credentials, and proves that leases expire and can be revoked by prefix in a non-production cluster. The result is a tested revocation path with a named owner before an incident forces its use.
Inventory every mount that issues leases
The platform team lists the secrets engines and auth methods that return leases, such as dynamic database roles, cloud credentials and token-issuing methods, and records each mount path with the application team that depends on it. Run
bao secrets list -detailedandbao auth list -detailedto capture the mounts, then compare the output with your inventory. The step is done when every leased mount has an owner and no mount is unaccounted for.Set default and maximum TTLs per mount
The platform team sets a default lease TTL and a maximum lease TTL on each mount using the values from your credential policy, with
bao secrets tunefor secrets engines and the equivalent tune command for auth methods. Keep the maximum short enough that a leaked credential has a bounded life, and long enough that routine renewal does not fail. Confirm the values withbao read sys/mounts/<path>/tuneon every mount. The step is done when each mount reports the TTLs in your policy.Configure client renewal and re-issuance
The application or agent team configures each client to renew its lease before expiry and to request a new credential when renewal is refused. Test renewal by running
bao lease renewon a staging lease and checking the returned TTL. Confirm in the client logs that renewal happens ahead of expiry and that a failed renewal triggers a new request, not a silent failure. The step is done when a client survives a full renewal cycle and recovers from a refused renewal in staging.Verify leases appear and expire in staging
In a non-production cluster, the team requests credentials from each leased mount and lists the resulting leases with
bao list sys/leases/lookup/<prefix>. Compare the count and paths with the expected number of clients. Wait until the TTL passes without renewal, then confirm that the lease disappears from the list and that the credential no longer works on the target system. The step is done when every lease appears, expires on schedule and is removed from the target system.Rehearse a prefix revocation with a named owner
A named incident owner runs a prefix revocation against a staging prefix that matches a real credential family, using
bao lease revoke -prefix <prefix>under a change ticket. Observe which client applications fail, how quickly they request new credentials and whether any of them hold cached secrets that outlive the revocation. Check the audit device for the revocation request. The step is done when the owner confirms the impact matches the inventory and the audit entry is recorded.Document the revocation runbook and retest
The team writes a runbook that names who may run a prefix revocation, which prefixes map to which applications, how affected clients obtain new credentials and which outages to expect. Store the rehearsal output with the runbook, and repeat the rehearsal after each OpenBao upgrade, checking the release notes for your version before you do. The step is done when the runbook has been reviewed by the application owners and the most recent rehearsal is on file.
How a bulk revocation request reaches the active node and clears leases
The flow starts with a client asking for a lease renewal or a revoke-by-prefix action on a standby node. Since OpenBao 2.6.2, that lease request is forwarded to the active node, which holds the authoritative lease state. The active node reads matching entries from the lease store and revokes each lease, so the operator should confirm which node handled the request and check that the leases under the prefix are gone afterward.
Lease requests forwarded from a standby to the active node, then revoked by prefix.
Security and operational risks during revocation
Bulk revocation is fast and final, which makes it one of the riskiest operations on a running OpenBao cluster. The cards below cover the controls that keep a revocation contained: planning for application impact, rehearsed procedures, audit trails, scoped prefixes, narrowly held tokens and watching lease volume before and after the change.
Application impact on dropped credentials
Revoking a lease invalidates the credential it issued, so any application still holding that database user, cloud key or certificate-backed secret will start failing its next call. Map which workloads read which secret paths and how they fetch new values, such as OpenBao Agent templates or application re-login logic. Confirm, with each owning team, how long a workload takes to recover after its lease is revoked. Plan the order of revocation so that dependent services are restarted or re-issued first where possible.
Tested runbook and named approvers
A bulk revocation during an incident is a poor time to learn the commands and the decision path. Write a runbook that states who may request a revocation, who approves a broad prefix, which prefixes map to which systems and how the team confirms the result. Rehearse it in a non-production cluster that holds realistic lease volumes, and record the time each step takes. Keep named approvers and a backup for each role in the runbook so the procedure does not stall when one person is unavailable.
Audit logging of revocation actions
Every revocation should leave a trace that answers who requested it, what prefix or lease was targeted, and when it ran. Confirm that an audit device is enabled and that its output reaches storage you can query independently of the cluster being changed. Test that revocation requests appear in the audit log with the expected identity and path. Review these entries after each exercise and incident, because they are the evidence that the change was authorized and scoped.
Blast radius of a broad prefix
A prefix that is broader than the incident can revoke far more leases than intended, including credentials used by unrelated teams. Before running a revocation, count the leases under the prefix and list the owners of the roles behind them. Prefer the narrowest prefix that covers the affected mounts, roles or identities. Treat a prefix that matches an entire mount or namespace as a separate approval decision. Confirm the exact matching behavior of the revocation endpoint in the version you run, since it determines what a given prefix touches.
Token scope needed to revoke
The token used for revocation should carry only the capability to revoke leases under the prefixes it is meant to touch. A broad root or administrative token used for routine revocation turns a mistake or a compromised automation account into a cluster-wide outage. Create a dedicated policy for the revocation role, bind it to the approvers' authentication method, and set short token lifetimes. Confirm the required capabilities against the current OpenBao policy documentation before you write the policy.
Monitoring lease counts
Lease volume tells you how much a revocation will disrupt and whether one is already happening. Track the number of active leases over time for each mount, and alert on sudden drops, which can indicate a revocation or a failed renewal loop, as well as sudden growth, which can indicate a runaway client. Compare counts before and after an exercise to confirm expected results. Confirm which lease metrics your OpenBao version exposes and which are available only on the active node, since standby nodes do not handle lease requests.
Questions buyers ask about lease management and revocation
What drives the cost of an OpenBao lease management engagement?
The main driver is how many dynamic secrets engines, databases and consuming systems need lease policy work, because each one has its own TTL, renewal and revocation behavior. Cost also rises with the number of OpenBao clusters or namespaces in scope, the amount of existing application code that renews leases, and how much runbook and evidence the work must produce. Ask for a quote that lists each secrets engine and system in scope, the test environments required, and whether revocation drills are included. Most engagements are fixed-scope, so the written scope is what the quote follows from.
How long does it take to set up lease TTLs and bulk revocation?
The duration depends on the number of mounts, consuming applications and environments that must be tested before production, not on the OpenBao feature itself. Teams with few dynamic secrets and clear owners usually move faster than teams that must first map which services hold which leases. Ask for a timeline in the written scope that separates discovery, policy changes, revocation testing and handover. Any timeline should be confirmed against your own change windows and approval steps.
What does our team need to provide for this work?
You need to provide named owners for each secrets engine and the applications that consume its leases, read access to the OpenBao configuration and audit logs, and a test environment that mirrors production lease behavior. Your identity and security teams should confirm who may run revocation and how incidents are declared. Without these inputs, lease policies get guessed, and revocation tests cannot prove that a prefix revocation will not break a critical service.
Can our own team handle OpenBao lease management without a partner?
Yes, if your team already runs OpenBao, understands the lease API and has application owners who can change how they renew credentials. The work is mostly configuration and testing, so the gap is usually time and rehearsal rather than knowledge. A partner adds value when many applications must change at once, when revocation must be proven before an audit, or when no one has practiced a bulk revocation. Check the OpenBao lease documentation against your OpenBao version before you decide.
How is revoking leases different from rotating a secret?
Revocation ends existing leases and invalidates the credentials they issued, so every client holding one must obtain a new credential. Rotation changes the underlying secret or key on a schedule while leases may continue to exist until they expire. In an incident you usually need revocation by prefix to cut off access quickly, and rotation afterward to make sure the old material cannot be reused. Plan both steps together, because revoking without a way for applications to recover will cause outages.
What does a partner deliver for lease management and bulk revocation?
A partner typically delivers a written inventory of dynamic secrets and their TTL and renewal settings, configuration changes in your OpenBao cluster, tested revocation procedures by prefix, and runbooks your operators can follow during an incident. DeployOpen implements, documents and supports self-hosted open-source platforms inside your own infrastructure, so the work runs in your environments and you keep the results. The exact deliverables, environments and retest steps are agreed in writing before work starts.
Which lease problems cause the most trouble after go-live?
The most common problems are TTLs set too short for long-running jobs, renewal logic that fails silently, and revocation runs that remove credentials used by unrelated services because prefixes were too broad. Teams also miss leases on standby or forwarded requests when they assume every node behaves the same. Ask your partner or internal team to test each failure mode in a non-production environment and to check the monitoring you have for expired or revoked leases.
What changes for your operations team after setup
Once lease management is live, the operations team owns a set of recurring duties that the initial build does not cover. The first is watching lease volume over time. Dynamic secrets generate leases continuously, so a sudden rise in active leases on one secrets engine usually points to a client that is requesting credentials too often, a renewal loop, or a TTL that is longer than the workload needs. Lease counts and expiry behavior should be checked against a baseline your team records during the first weeks in production. The exact metrics and alert thresholds depend on your telemetry setup, so confirm the lease-related metric names for your OpenBao version against the project documentation before writing alerts, and treat the sibling monitoring topic as the place to design them.
The second duty is reviewing TTL settings whenever a secrets engine, database role or auth method changes. A new role, a changed backend or a new consumer can all shift how long credentials should live, and the default maximum TTL set at the mount may no longer match the workload. Put a review step into your change process so that any new dynamic role is checked for its default_ttl and max_ttl values, and so that a renewal policy is confirmed for each consuming application. Every engine change should trigger a TTL review, not only the initial design.
The third and fourth duties are keeping the revocation runbook current and updating clients after upgrades. A prefix revocation runbook is only useful if the prefixes, mount paths and named roles it lists still exist and the on-call engineer can run the commands without the original author. Test the runbook against a non-production cluster after every material change. For upgrades, lease request handling changed across releases (see the version-specific notes on this page), so confirm which client libraries and scripts call the legacy endpoints and update them before the upgrade window, not after. Ask your vendor or project contact for the release notes of each version you plan to run.
Official OpenBao sources for leases and revocation
The official OpenBao documentation covers lease behavior, bulk revocation and version changes that affect lease handling. Read these alongside your own test cluster before you set lease TTLs or write a revocation runbook, because the behavior you need to confirm depends on the exact release you run.
What is OpenBao docs
This is the project's overview of its feature set, including leasing with automatic revocation and bulk revocation. Start here to confirm which lease and revocation behaviors the project documents as supported. Use it to define the vocabulary your runbook will use, such as lease, TTL and revoke by prefix. Check each capability against the release you plan to run, not only against the current docs page.
What is OpenBao docsOpenBao releases page
The release notes are where lease-related changes appear, including the change that forwards lease requests to the active node since 2.6.2 and the removal of legacy endpoints in 2.5.4. Read the notes for every minor line between your current version and your target before scheduling an upgrade. Pay attention to breaking changes to lease endpoints, since client scripts may depend on them.
OpenBao releasesOpenBao high availability docs
This page explains the active node and standby model, including how standbys forward or redirect requests. Lease requests that reach a standby depend on this behavior, so the page is the reference for planning load balancer routing and client retries. Confirm which HA backends the project supports before you design the cluster that will hold your lease state.
High availability docsOpenBao auth methods docs
Lease lifetimes depend on how each client authenticates, because tokens and dynamic credentials inherit TTLs from the auth method that issued them. Review the methods your workloads use, such as AppRole for servers and Userpass for developer machines, and note the default and maximum TTLs each one applies. Record those values in your inventory so revocation scopes match real identities.
Auth methods docsOpenBao namespaces docs
Namespaces isolate tenants within one cluster, and lease and revocation scope can differ between namespaces. Before you run a prefix revocation, confirm which namespace owns the leases and whether your operators hold the policy to revoke them there. Use this page to design namespace boundaries that keep a single incident response from affecting unrelated teams.
Namespaces docsOpenBao migration guide
If your lease workflows came from Vault, the migration guide describes the in-place replacement and the configuration changes it requires. It notes the testing limits of the migration path, so confirm your lease behavior on a staging cluster that mirrors production. Use the guide to plan the cutover checks that compare lease counts and renewal behavior before and after the switch.
Migration guideHow DeployOpen scopes and supports OpenBao lease management
DeployOpen scopes lease management as a fixed engagement with the work, deliverables and timeline agreed in writing before any change is made to your OpenBao cluster. The written scope names the secrets engines whose leases are in play, the TTL and maximum TTL values each team will get, which teams own which mount paths, and how revocation will be triggered and approved. Because the scope is fixed, the decisions that drive effort, such as how many dynamic secrets engines are in use and how many prefixes must be covered by runbooks, are visible to you before a quote is finalized. Ask any partner to show how each of these items will be recorded and signed off.
Within your infrastructure, the configuration work covers default and maximum lease TTLs for each mount, renewal behavior in the applications and agents that hold leases, and a revocation runbook for each prefix that an incident could require you to revoke. Each runbook should name the operator role allowed to run bao lease revoke -prefix, the audit evidence captured before and after, and the order in which dependent systems are restarted. Revocation is then rehearsed in a non-production environment that mirrors your secrets engines, so the team learns what breaks before an incident forces the same steps. Confirm with your own engineers which applications will fail when their leases are revoked and whether they reconnect cleanly.
Once the initial work is delivered, ongoing support is available as a retainer. A retainer typically covers version upgrades of OpenBao, review of lease metrics and alerts after changes in workload, periodic revocation rehearsals, and updates to runbooks when teams or mount paths change. Ask any partner to define in the quote what is included, how urgent requests are handled, and what is billed separately. DeployOpen does not issue audit reports or certifications for lease controls; if an assessor will review them, confirm early which evidence the assessor expects and who will produce it.

