Authenticating workloads from several Kubernetes clusters to one OpenBao: when JWT auth fits
When a platform team runs several Kubernetes clusters that all need secrets from one OpenBao, JWT auth lets that OpenBao trust each cluster's service account tokens without a separate authentication setup per cluster. The decision that follows is how OpenBao learns to verify those tokens: through issuer discovery, where each cluster's token issuer publishes its signing configuration at a discovery endpoint OpenBao can reach, or through chained public signing keys, where you copy each cluster's public keys into OpenBao and manage their rotation yourself. Both paths end with the same JWT/OIDC auth method, so the choice is mostly about network reachability and key-rotation ownership.
The Kubernetes auth method works differently. You mount it once per cluster, give each mount the cluster's API endpoint and a reviewer credential, and OpenBao calls that cluster's TokenReview API to check every login. That gives OpenBao a live answer on each login, including whether a token has been invalidated, but it means OpenBao needs network access to every API server and a credential that can call TokenReview in each one. Teams need a multi-cluster approach when those API servers are not reachable from the OpenBao network, when they want one place to define roles, or when the number of clusters makes per-cluster reviewer credentials hard to govern.
The JWT/OIDC method documents fields such as the OIDC discovery URL, the JWKS or public key settings, bound issuer and audience values, and role claim mappings. Exact field names, defaults and behavior differ between versions, so confirm them against the OpenBao auth methods documentation and the release you install before writing any configuration. Also confirm how the Kubernetes service account issuer is set in each cluster, because that value must match the issuer OpenBao expects exactly.
Issuer discovery or chained keys: which method fits your clusters
When a cluster publishes its service account issuer over HTTPS, OpenBao can fetch the OpenID Connect discovery document and the signing keys it links to. Trust is then anchored to the issuer URL, and key material follows the cluster's own rotation.
- Trust material: The JWT auth method can read keys from the issuer's discovery document and its
jwks_uri, or from a JWKS URL you set directly. Confirm the exact configuration keys in the OpenBao auth methods docs before you write the role. - Reachability: Every OpenBao node, including standbys, must reach the issuer URL and the JWKS endpoint over TLS. Check egress rules, proxies and certificate trust on each node, not only on the active one.
- Key rotation: The cluster publishes new keys alongside old ones before it signs with them. Confirm how often OpenBao refreshes its cached keys, then test a rotation in a non-production environment.
- Trust chain ownership: The cluster team owns the issuer URL, its TLS certificate and the key lifecycle. The OpenBao team owns role bindings and claim rules, and should review any change to the issuer.
- Exposure: Discovery documents and public keys are not secrets, but the endpoint still reveals issuer identity. Record what it exposes and restrict it where your policy requires.
Before you rely on this method, confirm the issuer URL, the JWKS endpoint and the key refresh behavior on the distribution you run.
Clusters that are private, air-gapped or unable to publish issuer metadata cannot be validated through discovery. The workable pattern is to import each cluster's public signing keys into OpenBao as a fixed set of trusted keys, so OpenBao never needs a network path to the cluster.
- Trust material: Export the public half of each cluster's service account signing key and load it into the JWT auth configuration as validation keys. Private keys stay inside the cluster.
- Reachability: OpenBao needs no connection to the cluster API or its issuer to validate tokens. Workloads still need a network path to OpenBao to log in, so plan that route separately.
- Key rotation: Every rotation is a change on the OpenBao side. Add the new public key before the cluster starts signing with it, then remove the old key after tokens signed with it have expired. Put both steps in change control.
- Trust chain ownership: The platform team for each cluster hands over key material through a verified channel. The OpenBao team records who supplied each key, when it was imported and who approved it.
- Scale and drift: Each cluster adds keys to manage. Keep the key inventory in version control with review, and check periodically that the imported keys match what each cluster currently signs with.
Before you import keys, confirm how your distribution exposes the signing key, whether it can rotate keys without a restart, and who signs off each import.
Both methods depend on how each distribution configures the service account issuer, the token signing key and the API server. Kubernetes documents OpenID Connect and bearer tokens as supported authentication paths, but the issuer and key settings differ between distributions, so the answers below must be confirmed for each cluster.
- Issuer settings: Confirm the value of the API server's service account issuer flag and whether the distribution sets it to a publicly resolvable URL. This decides whether discovery is possible at all.
- Signing key: Confirm the signing key type, where it is stored, who can read it and whether the distribution rotates it automatically or only on request.
- Version support: Kubernetes maintains the three most recent minor releases, so confirm that each cluster runs a supported version. Plan upgrades with the version skew policy in mind, since control plane and node versions move at different times.
- Managed services: Hosted control planes may restrict access to discovery endpoints or signing keys. Ask the provider in writing what is exposed and how key rotation is announced.
- Conformance limits: CNCF conformance confirms API support, not the token claims your policy depends on. Test the claims your roles require.
Before connecting production workloads, run a test login from each cluster against a non-production OpenBao and confirm the claims it returns.
Configuration options and when each fits
This table compares three ways to let one OpenBao trust tokens from several Kubernetes clusters: JWT auth with issuer discovery, JWT auth with static or chained public keys, and the Kubernetes auth method with TokenReview. Read each row as a question you must answer for your own clusters before choosing. The main takeaway is that discovery is simplest to run but needs network reach to every issuer, while the Kubernetes auth method gives the fastest revocation at the cost of a live API path back to each cluster.
| Decision factor | JWT with issuer discovery | JWT with static or chained keys | Kubernetes auth with TokenReview |
|---|---|---|---|
| Trust source | OpenBao fetches each cluster's OIDC discovery document and signing keys from its issuer URL | OpenBao holds the public signing keys directly, or a chain of them, and trusts those keys for each issuer | OpenBao calls each cluster's API server to validate the presented service account token |
| Network reach required | OpenBao must reach every cluster's issuer endpoint over HTTPS, confirm this with your network team | No live call to the cluster is needed at login time, so reach can be limited to the OpenBao side | OpenBao must reach each cluster's API server and hold a reviewer credential for it |
| Revocation behavior | Revoking a service account or deleting a pod does not stop a token already issued until its lifetime ends, confirm your token TTLs | Same as discovery: a token stays valid until it expires unless you rely on OpenBao-side role or lease revocation | Validation runs on each login, so deleted service accounts fail at the next TokenReview, confirm this against your cluster version |
| Operational load on key rotation | Key rotation on the cluster is picked up through discovery, but confirm refresh timing and cache behavior with your OpenBao version | Every cluster signing key change needs a manual update in OpenBao, so keep a rotation runbook per cluster | Rotating the reviewer token or CA certificate needs an update in OpenBao for each cluster |
| Fit for distroless images | Good fit, since the workload only presents its own projected token and needs no tooling in the image | Good fit for the same reason, with no tooling needed inside the container | Good fit, but the login path depends on the pod's projected token being presented correctly |
| Fit for GitOps setups | Good fit when the issuer URL and role definitions live in version-controlled configuration | Fits GitOps when key material is versioned, but keys in Git need a secure review process | Fits GitOps for roles, but reviewer credentials must come from a secret store, never plain Git |
| Main risk to check | Issuer URL trust: a compromised or misconfigured issuer is trusted for every audience you configure | Key chain mistakes can silently accept tokens from a cluster you did not intend to trust | Reviewer credential scope: it must be limited to TokenReview permissions only, confirm with your RBAC design |
What revocation looks like with JWT auth compared to the Kubernetes auth method
The Kubernetes auth method and JWT auth differ most in when a revoked identity stops working. With the Kubernetes auth method, OpenBao sends the pod's service account token to the originating cluster's TokenReview API at login, so a deleted service account, a removed token or a changed binding is seen at the next login. With JWT auth, OpenBao checks the token's signature against the trusted keys and its claims against the role, and does not ask the issuing cluster whether the identity still exists. A signed JWT stays valid until its expiry unless something in OpenBao cuts it off. The practical consequence is that the revocation point moves from the cluster to OpenBao's role configuration and lease handling. Confirm the token lifetimes your clusters issue, because the exposure window is set by them, and test the exact behavior in a non-production environment before you rely on it.
Two OpenBao controls limit that exposure. Role claim rules, including bound subject and audience values, let you narrow which tokens can log in, and changing or deleting the role stops new logins at once. Tokens OpenBao issues after a JWT login carry leases, so revoking a token or a lease ends access for everything derived from it, and bulk revocation by prefix can end a whole class of leases in one operation. Revoking an existing login does not, however, invalidate the source JWT, so the cluster that issued it must still be treated as untrusted. Check that the token TTL on your OpenBao tokens is short enough for your risk, and that you can run bulk revocation under an operator procedure rather than in an incident call.
To revoke a compromised cluster's trust, plan the steps before you need them. Remove or disable that cluster's JWT auth mount or its role, or rotate its issuer or public signing keys out of the trusted set, so that no new logins succeed. Then revoke tokens and leases issued under that mount and rotate any static secrets those workloads read. Because the Kubernetes auth method depends on the cluster's own TokenReview API, a compromised or unreachable cluster may not answer correctly, which is a reason to keep the JWT path and its key rotation documented and rehearsed. Ask your team to write down who can change the trust configuration, how quickly it takes effect in your OpenBao version, and how the procedure is tested before an incident.
How to set up multi-cluster JWT auth in OpenBao
This sequence connects several Kubernetes clusters to one OpenBao through JWT auth, with one auth path per cluster, bound audiences and subjects, and roles that map service accounts to policies. The result is a tested login path from each cluster that you can review before any workload depends on it.
Confirm the trust model for each cluster
Before changing OpenBao, the platform team records each cluster's API server issuer URL, the service account issuer each cluster signs tokens with, and whether that issuer is publicly discoverable or must be supplied as a static public key set. Decide which audience value each cluster's tokens will carry and which namespaces and service accounts may log in. Check that you can reach each cluster's issuer discovery document from the network where OpenBao runs, for example by requesting the OpenID configuration URL and confirming it returns JSON. The step is done when every cluster has a written issuer, audience and subject list that an OpenBao administrator has reviewed.
Enable JWT auth at a path per cluster
An OpenBao administrator enables the JWT auth method once per cluster, using a distinct path such as a name that identifies the cluster, so each cluster's trust settings stay separate. Use the
bao auth enablecommand with thejwtmethod type and the chosen path. Confirm the mount appears in the output ofbao auth list. The check is that each cluster has its own auth path and no path is shared, so a compromised or misconfigured cluster cannot change another cluster's trust configuration.Collect each cluster's issuer and key material
For each cluster, the platform team gathers the issuer value and either the discovery endpoint or the JSON Web Key Set that signs its service account tokens. If the issuer is reachable, record its URL for
oidc_discovery_url. If it is not reachable from OpenBao, export the public keys and plan to supply them as static keys instead. Do not copy private key material. Verify each set by decoding a sample service account token from that cluster and confirming itsissandaudclaims match the values recorded in step one. The step is complete when each cluster has a verified issuer and one key source written down.Configure each path with issuer and bound claims
Apply the per-cluster configuration with
bao write auth/<path>/config, setting the issuer or discovery URL, or the static public keys, for that cluster only. Setbound_issuerto the value recorded earlier so tokens from other clusters are rejected. Confirm the config by reading it back withbao read auth/<path>/config. The check is that each path reads back the issuer you expect and that the values do not overlap with another cluster's path.Define roles that map service accounts to policies
For each workload group, create a role under the cluster's path with
bao write auth/<path>/role/<name>. Setbound_audiencesto the audience the workload's projected token requests, andbound_subjectorbound_claimsto the service account identity, such as its namespace and name. Attach only the policies that workload needs, and set token TTLs that match how long the workload runs. Read the role back withbao readto confirm the bindings and policies. The check is that each role can be matched by one service account and no wildcard subject grants access to unrelated workloads.Test a login from each cluster
Run a test pod in each cluster that uses a projected service account token with the audience you configured, then exchange that token with
bao write auth/<path>/login role=<name> jwt=<token>. Decode the token first to confirm itsiss,audand subject claims match the role. Confirm the returned token carries only the intended policies withbao token lookup. Also test a negative case, such as a token from a different namespace or cluster, and confirm OpenBao rejects it. The step is done when each cluster logs in successfully, the negative test fails as designed, and the results are recorded for the review.Record the revocation trade-off and hand over
Document how each cluster's access is revoked. With JWT auth, a valid token keeps working until it expires, so you must rely on short token lifetimes, role changes and token revocation rather than deleting a pod-level record in OpenBao. Compare this with the Kubernetes auth method, which validates tokens through the API server's TokenReview flow and therefore depends on that cluster being reachable. Ask the owners of each cluster to confirm the revocation process, the escalation contact and the review schedule. The sequence is complete when the runbook is signed off and each cluster's owner knows how to remove access.
Security and operational considerations for shared trust across clusters
A single OpenBao that trusts several clusters concentrates risk: a weak bound claim, an over-broad policy or a compromised issuer key affects every cluster that relies on it. The cards below are the controls to design and verify before the first cluster is onboarded, and each one should be reviewed again when a cluster is added or retired.
Bind audiences and subjects per cluster
Each JWT role should bind to a specific audience and to the service account subjects it is meant to serve, not to a whole namespace or to every account a cluster can issue. Set the audience to a value unique to the OpenBao deployment and check that tokens minted for other services in the same cluster are rejected. Where a role covers one cluster only, bind that cluster's issuer as well, so a token from a different cluster cannot satisfy the role even if its subject matches. Test both rejection paths with tokens you create on purpose.
OpenBao auth docsScope policies to each role
Attach the narrowest policy to each role that the workload needs, such as read on one KV path for one application. Avoid shared policies that grant wide reads so a login from one cluster can reach secrets owned by another team. Review policies whenever a role is created, and record which workload each policy serves. Ask whether a token from a compromised cluster could read any path beyond the one its role names, and fix any path that returns yes.
Isolate issuer trust per cluster
Keep the issuer, its discovery document and its public signing keys configured separately for each cluster, so that trust in one cluster can be withdrawn without touching the others. When using chained public keys rather than discovery, store the key set for each cluster under its own configuration and do not merge them into one shared set. Confirm which issuer each role accepts before a cluster is decommissioned, and remove that trust in the same change.
Rotate signing keys ahead of trust
Cluster service account signing keys can be rotated, and OpenBao must trust the new public keys before any token signed with them is presented. Publish the new keys to OpenBao first, confirm that logins still succeed with tokens from both old and new keys, and only then retire the old keys on the cluster. Record the order in the runbook, since a rotation in the wrong order causes logins to fail for every workload in that cluster at once.
Audit logins across clusters
Enable OpenBao audit logging and review login requests for each JWT role, noting the cluster issuer and subject that were presented. Logs should show failed logins as well as successful ones, because a spike in rejected tokens from one cluster is an early sign of misconfiguration or misuse. Confirm where audit logs are sent and who can read them, and check that the log fields you depend on appear in your OpenBao version before you build alerts on them.
OpenBao namespaces docsUse namespaces for tenant boundaries
OpenBao namespaces provide multi-tenant isolation within one cluster of OpenBao. Where teams or environments must not share auth methods, policies or secrets, place them in separate namespaces rather than relying on path naming alone. Decide before onboarding whether each cluster or each tenant gets its own namespace, and confirm with your own tests that policies in one namespace cannot read another. Namespaces do not replace the audience and subject binding on each role.
Namespaces docsQuestions teams ask before running multi-cluster auth on OpenBao
What drives the effort of setting up multi-cluster auth on OpenBao?
The effort depends mainly on how many clusters you connect, how each one exposes its service account signing keys, and how much policy design sits behind each role. Each cluster adds an issuer to trust, a JWT or Kubernetes auth configuration, and a set of roles that map service accounts to policies. Clusters with different key rotation habits, private issuer URLs or mixed Kubernetes versions take longer to verify. Ask any partner to break the work down by cluster, role design, network path and testing, so you can see which items scale with cluster count and which are one-time.
Can an internal team set this up without outside help?
A team that already runs Kubernetes and operates OpenBao can usually build a first cluster connection alone, because the auth method is documented and the configuration is small. The harder part is repeating it safely across clusters and keeping trust decisions reviewed. Internal teams often underestimate the work of testing token claims, rotating signing keys and documenting who approves a new cluster. If your team has no prior experience with OpenBao auth methods or Kubernetes identity, a fixed-scope engagement can cover design and handover while your staff build the rest.
What does the work need from cluster owners and the network team?
Cluster owners must confirm the service account issuer each cluster publishes, whether its discovery and key endpoints are reachable from OpenBao, and how signing keys are rotated. The network team must allow OpenBao to reach those endpoints or confirm that public signing keys can be distributed instead. Both groups should agree on who may request a new cluster trust, who approves it and how changes are logged. Without these answers, the design stalls at the first connectivity test, so collect them before the scope is signed.
How long does it take to define the multi-cluster design?
The design phase length is driven by the number of clusters, the number of distinct trust domains, and how many teams must agree on role boundaries. Clusters that share an identity provider and conventions define faster than clusters run by separate business units with separate change controls. Plan time for workshops with each cluster owner, a written decision record for the chosen trust approach, and a test cluster to prove the flow. Ask for the design deliverables and their review steps in the written scope, and confirm the calendar with the people who approve changes.
What should we do when a Kubernetes cluster is decommissioned?
Remove the cluster's trust first, then its roles, then its policies that no other cluster uses. Revoke any tokens or leases the cluster's workloads still hold, and confirm that no pipeline still points at its issuer. Because JWT trust is tied to the issuer, deleting the auth configuration stops new logins, but existing tokens remain valid until they expire, so check their time-to-live settings. Record the removal in your change log and review secrets that were readable only from that cluster, since they may need rotation.
How does one shared OpenBao compare with one OpenBao per cluster?
A shared OpenBao gives one place to manage policies, audit logs and secrets, and it avoids running several HA clusters. The trade-off is a larger blast radius, because a misconfigured trust or a compromised admin path affects every connected cluster. One OpenBao per cluster isolates failures and keeps each team in control, but it multiplies upgrades, backups and unseal operations. OpenBao namespaces can separate tenants inside one cluster, which is a middle option to evaluate. Decide with your security team based on your risk tolerance and operating capacity, and confirm the chosen design against the OpenBao namespaces documentation.
Which authentication method should we pick: JWT or Kubernetes auth?
The Kubernetes auth method asks each cluster's API server to validate a pod's token, which gives strong revocation through the API, but it needs network reach and credentials for every cluster. JWT auth trusts a token signed by a key the cluster publishes, so OpenBao checks signatures without calling each API, but revoking a single workload depends on short token lifetimes and on removing trust. Choose based on how fast you must cut off a compromised workload, how reachable each API server is, and how your clusters publish their keys. Confirm the behavior of each option with the OpenBao auth methods documentation before deciding.
Limits to confirm in your environment before you commit
JWT auth lets one OpenBao trust several clusters, but the design depends on details that vary by OpenBao release, Kubernetes distribution and network layout. The cards below list what to confirm in your own environment before you commit to this pattern.
OpenBao version and JWT behavior
Confirm which OpenBao release you will run and read its release notes for changes to the JWT auth method, including how it validates issuers, audiences and bound claims. Behavior that is correct in one minor line can change in another, so pin the version you tested and retest it when you upgrade. The current release lines in the project's release history are a useful starting point.
OpenBao releasesIssuer and token settings per distribution
Each cluster's service account issuer URL, signing key and token settings can differ, and managed Kubernetes distributions do not always expose them the same way. Record the issuer each cluster puts in the iss claim, the audience your tokens carry, and whether tokens are bound to pods and time-limited. Mismatches here cause authentication failures that look like misconfiguration in OpenBao.
Network reachability to discovery endpoints
If OpenBao fetches OIDC discovery documents or JWKS keys from each cluster's API server, every cluster's discovery endpoint must be reachable from the OpenBao nodes, including across network zones and through any proxies or firewalls. Confirm DNS resolution, TLS trust for the cluster certificates and the behavior when an endpoint is down. If you use chained public signing keys instead, confirm the keys can be distributed to OpenBao without relying on live cluster access.
Signing key rotation you can track
Ask each platform team whether signing keys rotate on a schedule and who is told when they do. Key rotation that OpenBao does not learn about in time causes token validation to fail for every workload in that cluster at once. Record the rotation cadence, how the new public keys reach OpenBao and whether old keys stay valid for an overlap period. Assign an owner for each cluster's rotation events.
Whether token expiry is an acceptable cut-off
JWT logins do not give you the per-identity revocation that the Kubernetes auth method gets from checking each token against the API server. Once a token is issued, OpenBao accepts it until it expires or the lease is revoked, so the cut-off is token lifetime plus any lease you revoke. Decide whether your security team accepts that window for decommissioned workloads, compromised pods and departing platform staff, and document the compensating controls if it does not.
How workloads from several clusters reach one OpenBao
The flow starts with a pod in each cluster presenting its projected service account token to OpenBao's JWT auth method. OpenBao checks the token signature against the signing keys it trusts for that cluster, which it fetches through issuer discovery or from keys you configure directly. Each cluster sits behind its own trust boundary, so a token is accepted only from the issuer registered for that boundary. Check that each cluster's issuer and audience match the OpenBao JWT role, and that the policy returned is limited to the workloads that cluster should reach.
Pods in two clusters authenticate to one OpenBao through their own trusted issuers.
How to test cross-cluster logins before production
Test every cluster's login path against the production OpenBao configuration before any workload depends on it. For each cluster, run a login from a pod using its own projected service account token, confirm the returned token carries the policies you intended, and confirm a read succeeds only on the paths that role allows. Repeat the test from a pod in each namespace that a JWT role binds to, because a role bound to a subject pattern can pass in one namespace and fail in another. Record the issuer URL, audience, role name and bound claims used for each cluster so the results can be compared with the configuration later.
Negative tests matter as much as positive ones. Present a token with the wrong audience, a token whose subject belongs to a service account outside the bound list, and a token signed by a key that is not in the trusted set. Each attempt should be refused with a clear error, and the attempt should appear in the audit log. Then run a rotation rehearsal: rotate the signing key in one cluster, or the chained public key set if you use that model, and confirm logins resume after the new key is published and fail for tokens signed with the old key once it is removed. Ask the platform team to confirm how long the issuer keeps serving the previous key, because that window decides how long old tokens remain usable.
Run a revocation drill for a removed cluster. Remove that cluster's trust entry, delete or disable its JWT role, and then try a login with a token that was still valid before removal. Be aware that an already issued OpenBao token remains valid until its TTL or explicit revocation, so the drill should also revoke the tokens that role created and confirm the leases were cleaned up. Keep the evidence: the configuration diff, the test commands and outputs, audit log entries for the refused logins, and a signed record of who approved each step. Ask the team to confirm the audit device destination, log retention period, and who can read the audit entries, since these determine whether the evidence will hold up in review.
How DeployOpen scopes and delivers multi-cluster OpenBao authentication
DeployOpen plans and implements multi-cluster workload authentication for OpenBao inside your own infrastructure, starting from an agreed written scope. We map each cluster's issuer, key publication and revocation needs, then build and test the JWT auth configuration so that each cluster's workloads authenticate to the right roles.
How we scope
- We inventory every Kubernetes cluster, its service account issuer settings and whether its public keys are reachable from OpenBao.
- We agree in writing whether issuer discovery or chained public signing keys fits each cluster, with the reasons recorded.
- We define the revocation requirement per workload and document where the JWT approach differs from the Kubernetes auth method.
How we build
- We configure JWT auth mounts, bound audiences, bound subjects and role claim rules for each cluster in a test OpenBao first.
- We run negative tests with tokens from unexpected namespaces, service accounts and expired or foreign issuers to confirm they are refused.
- We keep configuration in version-controlled files so each cluster change is reviewed before it reaches production.
How we hand over
- We deliver a written runbook covering issuer rotation, signing key rollover, role onboarding for a new cluster and offboarding.
- We document the revocation procedure for each role, including how existing tokens are ended when a cluster is retired.
- We provide the test scripts and evidence used during acceptance so your security and platform teams can rerun them.
How we support
- Support after handover is available as a retainer, which covers reviews when a cluster upgrade changes issuer or token behavior.
- We can retest authentication paths after OpenBao upgrades and after changes to Kubernetes service account token settings.
- Continuous testing of the multi-cluster auth setup is available under the same retainer, scoped in writing with your team.

