OpenBao dynamic Consul and Nomad ACL tokens

Issue short-lived Consul and Nomad ACL tokens from OpenBao using the openbao-plugins, with lease-based expiry, scoped policies and a planned rollout in infrastructure you control.

On this page

When teams issue dynamic Consul and Nomad ACL tokens from OpenBao

Dynamic Consul and Nomad ACL tokens replace the long-lived management or workload tokens that many teams keep in agent configuration files, job specs and CI variables. Instead of one token that works until someone remembers to rotate it, OpenBao issues a token for each request, with a time-to-live, and revokes it when the lease ends. The plugins are worth the effort when a Consul or Nomad cluster is used by several teams or pipelines, when tokens are currently copied into places where they are hard to find and rotate, or when an auditor asks who could have used a given token on a given day. If your cluster has one operator and no automated consumers, a static token held in a secrets engine may be enough.

OpenBao's lease model is the core of the design. Each generated token is attached to a lease, and OpenBao revokes it automatically when the lease expires or when you revoke it directly, including in bulk. The What is OpenBao overview describes leasing and bulk revocation as part of the platform's dynamic secrets behavior. Be aware that the Consul and Nomad engines are not in the core binary. They are distributed through openbao-plugins, so you need to decide how each plugin is obtained, pinned to a version and registered on every node that serves requests. Confirm the current plugin versions and their compatibility with your Consul and Nomad releases with the openbao-plugins project before you commit to a schedule.

Before building, decide which ACL policies or roles each consumer may request, how long tokens should live for a CI job compared with a long-running agent, and who may read the engine's own management credential. The management token that OpenBao uses to create ACL tokens is the most sensitive piece of the setup, so plan its storage and rotation first. Also confirm how revocation behaves when a Consul or Nomad server is unreachable at lease expiry, because a token that cannot be revoked remains valid until the target accepts the change. Write those answers down as the acceptance criteria for the build, since they determine how the plugins are configured and tested.

How a workload gets a Consul or Nomad token from OpenBao

The flow starts with a workload that authenticates to OpenBao, then requests a token from a Consul or Nomad secrets engine role. OpenBao calls the target ACL API, receives a token and returns it to the workload with a lease. When the lease expires or is revoked, OpenBao asks the ACL API to remove the token. Check that the workload's identity, the engine role's policy and the lease length are each set on purpose, and that the Consul or Nomad servers sit on the far side of a clearly marked trust boundary.

Token issuance and revocation between a workload, OpenBao and the ACL API.

Consul or Nomad: how the token model differs for each

Consul authorizes requests through ACL policies, which are sets of rules that grant read, write or deny access to resources such as services, keys, nodes and sessions. Policies are not attached to tokens directly in most designs. Instead, a Consul ACL role bundles one or more policies, and a token is created from that role, so the token inherits whatever the role grants at the moment it is evaluated.

  • Policies hold the rules: Each policy defines resource-level permissions. Review them as the unit of least privilege, since every token issued through a role carries them.
  • Roles bind policies to tokens: A role references policies by name or ID. Changing a role changes the effective access of tokens created from it, so track role edits as access changes.
  • Token binding happens at issuance: The OpenBao plugin creates a Consul token that is bound to the configured role or policies. The token's lifetime in OpenBao is controlled by the lease, which is separate from Consul's own expiration settings.
  • Service and node identities: Consul can attach service or node identities to a token, which grants scoped access to the resources of one service or node. Decide whether your roles need these identities or only explicit policies.
  • Global and local tokens: Consul distinguishes tokens that replicate across datacenters from those that stay local. Confirm which scope your issued tokens need before you configure the role.

Before relying on any of this, confirm the exact role and policy fields and their behavior against the version of the Consul plugin pinned in your environment.

Which configuration options fit which setup

This table compares the main configuration choices for OpenBao-issued Consul and Nomad ACL tokens, including the management credential, policy binding, TTLs, token locality and namespace or partition scoping. Read each row for the setup it suits and the operational cost it adds, then confirm the exact parameter names and defaults against the plugin documentation for your versions before you build.

OptionWhen it fitsOperational cost
Management token held by OpenBaoSingle OpenBao cluster that mints tokens for one Consul or Nomad datacenter and has a clear owner for the bootstrap credentialThe token must be rotated and stored safely, and every rotation needs a planned update to the plugin configuration and a check that issuance still works
Narrow management token scoped to token creationTeams that want OpenBao to create and revoke only the ACL tokens it issues, rather than broad administrative controlRequires testing that the policy grants every operation the plugin performs, and a rerun of that test after each Consul or Nomad upgrade
Policy binding per roleEach consuming service or job group needs a distinct, least-privilege ACL policy that matches what it reads or writesMore roles to review and name consistently; every policy change must be traced to the roles that reference it
Shared broad policy across rolesSmall environments with few consumers where separate policies would add more review effort than the risk they removeAny compromised lease carries the full scope, and audit trails show less about which workload needed which permission
Short TTL with renewalLong-running services or jobs that can renew leases automatically and tolerate a brief re-issue during renewal failureRenewal logic and monitoring must work across restarts, and a renewal outage becomes an authentication outage for that workload
Longer TTL with a bounded max TTLBatch jobs or scripts that finish within a known window and cannot easily run renewal loopsA longer window of exposure if a token leaks, so the maximum lifetime and revocation procedure need explicit sign-off
Local tokens (not replicated)Tokens that should stay with the datacenter that issued them, which matters when Consul or Nomad clusters run in several regionsEach datacenter needs its own issuance path and monitoring, and tokens cannot be used across regions without separate planning
Namespace or partition scopingConsul Enterprise or Nomad Enterprise setups that separate teams or environments by namespace or partition, where the role must not reach across boundariesRequires the edition and feature check for each product version, plus a mapping of every namespace to an owning team and a review of cross-namespace access

Setting up the Consul and Nomad engines step by step

This sequence takes an OpenBao cluster from a bare server to a working Consul or Nomad secrets engine that issues short-lived ACL tokens. Each step closes with a check, so the team knows the engine is ready before any workload depends on it. Confirm plugin names, versions and configuration keys against the openbao-plugins documentation for your release.

  1. Install and verify the plugin version

    The platform engineer who runs OpenBao obtains the Consul and Nomad plugin builds from openbao-plugins, checks that each build matches the OpenBao core version running in the cluster, and registers the plugin binaries with the server according to the project's plugin documentation. Confirm the plugin name, the release tag and the checksum before registration, and record them in your change log. The step is done when the plugin catalog lists both plugins and the version reported by the plugin matches the version you approved.

  2. Enable the engine mounts

    The same engineer enables a separate mount for Consul and a separate mount for Nomad, each with its own path, so that policies, audit entries and lease handling can be scoped per system. Use one mount per Consul datacenter or Nomad region if your topology has more than one. Confirm the mount paths against your naming standard before enabling them. The step is done when the mount list shows both paths with the expected plugin type and the audit device records the mount operation.

  3. Create a least-privilege bootstrap management token

    A security engineer creates a management token in Consul and a management token in Nomad that OpenBao will use to create and revoke child tokens. Scope the bootstrap token to the minimum ACL permissions the plugin documents for token creation and revocation, and avoid reusing a human administrator's token. Store the bootstrap token only in OpenBao's own configuration path or in an approved secret store, and restrict who can read it. The step is done when a test call using the bootstrap token can create and revoke a throwaway token, and a call that exceeds its permissions is denied.

  4. Write the engine configuration

    The engineer writes the Consul and Nomad engine configuration with the cluster addresses, the bootstrap token and the TLS settings your environment requires, using the configuration keys listed in the plugin documentation for your release. Point the Consul address at a reachable server or load balancer and confirm that OpenBao can reach it over the network path you have approved. If the Consul or Nomad API uses a private certificate authority, load that CA into OpenBao's trust settings before testing. The step is done when reading the configuration back returns the expected addresses, and a connectivity check against the Consul or Nomad API succeeds.

  5. Define roles for each consuming team

    The engineer, working with the team that owns each service, defines one role per access pattern, such as a read-only Consul role for a service's health checks or a Nomad role limited to submitting jobs in one namespace. Each role maps to the Consul policies or Nomad policies that the team needs, and sets a token time-to-live that matches how long a workload runs. Confirm the policy names with the service owner and keep roles narrow, because a role's permissions are what every issued token carries. The step is done when each role reads back with its policy list and TTL, and a reviewer has signed off on the permissions.

  6. Test issuance, use and expiry

    The engineer requests a token from each role, uses it against the Consul or Nomad API to confirm that it allows the intended actions and blocks the others, and then waits for its lease to expire or revokes it early. Check that the token disappears from Consul or Nomad after expiry, and confirm in the audit log that OpenBao recorded the issuance and the revocation. Repeat the test once for each role before any workload uses it. The step is done when every role issues a working token, every token stops working at expiry or revocation, and the audit entries for both events are present.

How leases, TTLs and revocation affect running services

The lease TTL sets how long an issued Consul or Nomad ACL token stays valid before the client must renew it, and the max TTL sets the ceiling beyond which renewal stops. Renewal can extend a lease only up to that ceiling, so the integration that holds the token needs two behaviors: renew on a schedule shorter than the TTL, and request a new token once the max TTL is reached. Check which TTL fields the plugin exposes for each token type you configure (for example ttl and max_ttl on the role), and confirm with the plugin documentation whether the Consul and Nomad token types you choose have a max TTL at all. Record the values you set, because they determine how often every consumer must renew.

When a lease expires or is revoked, OpenBao stops accepting the token, and the Consul or Nomad API calls that depend on it start failing. Whether a running allocation or service keeps working depends on how each system uses the token at runtime. Some operations need the token on every request, while others only need it when they read or write ACL-governed resources, so a lapsed token can affect registration, health reporting or scheduling before anything visibly breaks. Bulk revocation, which the OpenBao documentation on leasing describes as a way to revoke many leases at once, is useful during an incident. It also cuts access for every consumer under the revoked prefix or mount, so a runbook should name who may trigger it, which consumers it affects and how tokens are reissued afterward.

Test renewal and expiry before any production use. In a staging cluster that mirrors your Consul or Nomad topology, shorten the TTLs, confirm that each consumer renews on time, then let a lease expire on purpose and observe which agents, clients and jobs fail and how quickly they recover once a new token is issued. Run a bulk revocation against a test prefix and time the recovery. Keep the results with the TTL values you chose, and repeat the test after every plugin or Consul and Nomad upgrade, since renewal behavior is part of what those upgrades can change. Confirm the expected behavior with the plugin maintainers and your Consul and Nomad versions before you set production values.

Security risks to design for before rollout

Dynamic Consul and Nomad tokens move trust into OpenBao, so a mistake there reaches your cluster ACLs directly. The cards below cover the risks to design against before any role is published, each paired with the control to put in place and check.

Bootstrap management token

Consul and Nomad each start with a bootstrap token that can create any other token. If OpenBao holds that credential, anyone who reads the engine configuration can mint administrative access. Store the bootstrap token only in the secrets engine configuration, restrict who can read or update that path, and replace it with a scoped management token once the engine is working. Ask who holds root or policy-admin rights in OpenBao before you configure it.

Namespace docs

Over-broad token policies

A dynamic role is only as narrow as the Consul ACL policy or Nomad policy it references. A role that attaches a broad policy gives every lease holder that access for the lease lifetime, and each request can create a new lease. Write one policy per workload, grant only the services, namespaces or job paths that workload needs, and review each role's policy list during every change request.

Token values leaking into logs

A Consul or Nomad token is a bearer credential, so a value printed by a CI job, an application log or a debug command grants the same access as the original request. Confirm that pipelines, Nomad job templates and Consul agent logs do not echo the secret field, and make the consumer write tokens to memory or a restricted file. Test log output with a short-lived token before rollout.

OpenBao as single trust point

Once OpenBao issues cluster ACL tokens, an outage or compromise of OpenBao also affects who can change or read Consul and Nomad state. Treat OpenBao as tier-one infrastructure: run it highly available, keep its audit device enabled, and decide in advance how operators would reach the clusters if OpenBao were unavailable, such as a break-glass management token held offline under two-person control.

OpenBao HA docs

Secret zero for workloads

A workload needs its own credential to log in to OpenBao before it can receive a Consul or Nomad token, and that first credential is the secret zero. If it is a long-lived value copied into an image or a repository, the dynamic tokens gain little. Choose an identity-based login such as a platform-issued JWT or Kubernetes identity where possible, and confirm how the workload's login is bound to a specific role and TTL.

Questions buyers ask about dynamic Consul and Nomad tokens

What drives the effort of issuing Consul and Nomad tokens from OpenBao?

Effort follows the shape of your access model. The main drivers are the number of roles you need, how complex each Consul or Nomad policy is, how your Consul and Nomad clusters are laid out (single or multiple datacenters, federation, and whether Nomad runs with Consul integration), and how workloads authenticate to OpenBao. Each role needs a policy that matches a real job, and each workload identity needs a trusted way to prove who it is before it receives a token. Teams with few roles and simple policies usually have a shorter path than teams that map dozens of services to fine-grained ACLs across several clusters. Ask for the scope to list each role, each policy and each auth path explicitly.

Can our own platform team set up Consul and Nomad tokens in OpenBao?

Yes, if your team already runs OpenBao, Consul and Nomad and has someone comfortable with ACL policy language. The harder part is usually not the plugin configuration but deciding which identities get which permissions, and keeping those decisions consistent as services change. A capable internal team can handle the build if it has time to test token lifetimes, revocation and failure modes before production. Teams without recent Consul or Nomad ACL experience often benefit from an outside review of the policy design, even when they run the installation themselves. A written scope makes it clear which part your team owns and which part a partner would cover.

What do we need to provide from our platform and security teams?

The work needs input from three groups. Platform engineers provide access to the OpenBao cluster, the Consul and Nomad clusters, and the non-production environments used for testing. Security engineers define who may request which kind of token, how long tokens should live, and how revocation is handled when a workload is retired or compromised. Application owners describe what each service reads and writes so that policies grant only those actions. Expect the security team to review policies before they reach production, and plan for a named contact who can approve role changes during the build.

How long does a Consul and Nomad token engagement take?

Duration depends on the scope agreed in writing, not on a fixed template. A short engagement covers one Consul cluster, one Nomad cluster, a small set of roles and a test environment. A longer one adds multiple clusters, many roles, workload authentication for each platform, and a production cutover with monitoring. Timelines are set in the written scope, which should name the environments, the role inventory, the testing steps and the handover. Ask for the schedule to be tied to those deliverables so you can see what is done at each milestone.

How do Consul and Nomad topology choices change the work?

Topology changes both the configuration and the testing. A single datacenter with one Consul cluster is the simplest case. Multiple datacenters, WAN federation, or Nomad jobs that depend on Consul service identities add more places where a token must be valid and where a policy can be too broad or too narrow. Nomad job submission, Consul service registration and Consul service mesh access may each need their own role. Plan test cases for each cluster you operate, and confirm with your Consul and Nomad documentation how ACL tokens are replicated and validated in your version. Ask the partner to show which topology they tested.

Which workload authentication method should we use for Consul and Nomad tokens?

The right method depends on where your workloads run and how they already prove identity. Teams often compare AppRole for long-running servers, Kubernetes or JWT/OIDC auth where the platform issues identity tokens, and TLS certificate auth where machines already carry certificates. OpenBao recommends AppRole for servers, so many teams start there for host-based workloads. The decision should be written down with the trust relationship, the secret-zero delivery path and the owner of each credential. Confirm the exact auth method behavior in the OpenBao auth methods documentation before committing to a design.

What are the risks if Consul or Nomad tokens are scoped incorrectly?

The main risks are over-broad tokens that let a workload read or change services it does not own, and under-scoped tokens that break deployments at the worst time. Both are avoided by writing policies from the workload's real needs, testing them in a non-production cluster, and checking revocation. Lease-based expiry limits how long a stolen token remains useful, but it does not fix a wrong policy. Ask the partner how they test policy denial as well as success, and how they handle a token that outlives its workload.

Does DeployOpen handle the whole Consul and Nomad token setup?

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms in infrastructure you control, so the work can include OpenBao plugin setup, role and policy design, workload auth configuration, testing and operating documentation. Most engagements are fixed-scope, and the scope, deliverables and timeline are agreed in writing before work starts. Ongoing support and upgrades are available as retainers. DeployOpen does not publish a price list, so a quote follows from the written scope.

How DeployOpen scopes and delivers Consul and Nomad token issuance

DeployOpen starts with the engine and policy model, because that is where most of the risk sits. Before any plugin is installed, the work defines which OpenBao mount issues Consul tokens and which issues Nomad tokens, which Consul ACL policies and Nomad policies each role maps to, and which OpenBao auth method (for example, AppRole for servers or JWT/OIDC for CI jobs) is allowed to request each role. The plan also records who owns the bootstrap or management credential that OpenBao uses to create tokens in Consul and Nomad, how that credential is stored and rotated, and which token TTLs are acceptable for each workload. Each of these decisions is written down with the owning team before implementation begins.

Implementation happens inside your infrastructure, on your OpenBao cluster and against your Consul and Nomad servers. DeployOpen configures the engines and roles, wires the plugins from openbao-plugins into the deployment, and then tests the behavior that matters for security: that a token is issued only to the intended identity, that its ACL policies grant no more than the role describes, that it expires at the lease boundary, and that revocation removes it from Consul or Nomad when the lease is revoked or the role is deleted. Test results, including failed cases and their fixes, are part of the delivered evidence. The exact plugin versions and their compatibility with your Consul and Nomad releases should be confirmed against the plugin documentation during planning.

The delivered runbook covers day-two work: rotating the management credential, adding roles when a new service joins, investigating a token that did not revoke, and handling plugin and OpenBao upgrades. Engagements are fixed-scope, so the written scope, deliverables and timelines are agreed before work starts, and any change to the role model is handled through a written change to that scope. For upgrades and continuous checks after go-live, DeployOpen offers retainers. Ask any provider, including DeployOpen, to state in the quote which items are one-time and which recur, and who performs each upgrade test.

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.