Mapping identity provider groups to OpenBao policies

Use OpenBao identity entities, aliases and external groups so one person has one identity across auth methods and policies follow directory or IdP group membership.

On this page

How identity provider groups map to OpenBao policies

Entities, aliases and external groups let one person hold one OpenBao identity across every auth method, and let policies follow directory or IdP group membership instead of individual grants. An entity is OpenBao's internal record for a person or machine. Each login path produces an alias that links an auth method's identity (for example, an OIDC subject or an LDAP account) to that entity. An external group is a record that names a group in your identity provider or directory and carries the policies to attach. When a login matches a group, OpenBao adds the entity to the group and applies the group's policies to the token it issues. Teams need this when the same person signs in through more than one method, such as OIDC for the web UI and a username and password method for break-glass access, or when access reviews must follow group membership in the directory rather than hand-maintained lists in OpenBao.

The chain works in one direction: the auth method issues a login, OpenBao maps that login to an alias, the alias belongs to an entity, and the entity's external group memberships supply the policies. Each link is a place where access can silently fail to apply. A mismatch in the alias name, a group name that differs in case or format from the claim your IdP sends, or a second entity created by a login path that did not map to the existing alias will each produce a user with the wrong policies. Before rollout, log in through every method with a test account in each directory group and confirm the resulting entity, its aliases and the effective policies. Confirm the exact field names, how aliases are matched and how group membership is refreshed for your OpenBao version in the OpenBao auth methods documentation, because these details change between releases and this page does not define them.

Plan for ownership and removal before you build. Decide who maintains the mapping between IdP groups and policies, and where the mapping is recorded so it can be reviewed. Confirm how a removed directory membership or a disabled account propagates to OpenBao, since an existing token keeps its policies until it expires or is revoked. Your access review should therefore check both group membership in the directory and the active tokens each entity holds. Test a deprovisioning case end to end in a non-production cluster before relying on it for an audit.

How a login becomes a policy set

The flow starts with a user authenticating through an OpenBao auth method, such as OIDC, which produces a login alias. OpenBao matches that alias to an identity entity, and the entity's membership in an external group, populated from the identity provider or directory, determines which policies are attached to the resulting token. The trust boundary sits where the identity provider's group claims enter OpenBao: check that the group names and alias mount accessor on the external group match exactly what the IdP sends, because a mismatch silently grants no policies.

Login alias, entity and external group resolve to policies at issue time.

Why one person needs one entity across auth methods

Each login path that creates its own identity splits the audit trail and the policy picture. If a developer signs in with OIDC on Monday and a username and password method on Tuesday, OpenBao can treat those as two separate identities unless they are linked. Policies attached to one identity do not automatically apply to the other, and audit records for the same person end up spread across two names. Before you map directory groups, decide which auth methods your people and machines will use and confirm how each one records the account name it presents at login. The OpenBao identity documentation at OpenBao auth methods is the starting point for the auth method list, but the exact behavior of each method should be checked in your own test cluster.

An entity is OpenBao's single record for one person or machine, and an alias is the link between that entity and an account name from a specific auth method mount. Each alias ties a mount accessor and an account name, such as a username from one method or a subject claim from another, to the same entity. Tokens issued through any linked method then resolve to that entity, so the policies and audit entries for that person stay consistent. Confirm in the identity docs which fields an alias needs for each of your auth methods, and test that a second login from a different method lands on the existing entity rather than creating a new one. Also decide who is allowed to create aliases, since an incorrect alias can attach one person's access to another account.

OpenBao separates internal groups, which are managed inside OpenBao and hold members you add directly, from external groups, which map to a group name supplied by an auth method such as an identity provider or directory. External group membership is the piece that follows the directory: when someone joins or leaves a group upstream, their effective policies in OpenBao change at their next login, without a manual edit in OpenBao. Keep the membership source clear, because an entity that is both directly assigned and externally grouped can carry policies from both paths. Confirm with the group documentation and your chosen auth method how group names are passed from your provider, whether they are matched by name or by ID, and how often memberships are refreshed in your setup.

Which group source and auth method fit each situation

This table compares the group sources and auth methods OpenBao can use to map identity provider or directory groups to policies, by login situation. Read each row as a question: who is logging in, what the identity source can supply, and what you must confirm before choosing it. The main takeaway is that the group source is set by how the person or machine authenticates, so mapping is usually built per auth method.

SituationGroup source and auth methodWhat it requires and what to confirm
Staff signing in through an existing SSO providerOIDC or JWT login with a groups claimRequires the IdP to emit group claims for the users and apps in scope. Confirm claim name, group ID format, and whether the IdP limits group count in tokens.
Staff whose groups live only in a directoryLDAP or Active Directory group lookup (openbao-plugins LDAP plugin on 2.7 and later)Requires a bind account with read access to user and group objects. Confirm nested group handling, the search base, and that the plugin is installed before upgrading to 2.7.
Domain-joined Windows services and hostsKerberos (openbao-plugins Kerberos plugin on 2.7 and later)Requires a service principal and keytab in the domain and reachable KDCs. Confirm that group membership is resolved by the plugin and tested with the same accounts used in production.
Cloud workloads with native identityAWS, Azure or GCP IAM auth (openbao-plugins)Requires cloud identity bound to the workload and plugin installation. Confirm which cloud attributes map to groups, since native IAM principals may not carry directory groups.
Servers, pipelines and automation with no human loginAppRole with policies bound to the roleRequires no IdP group. Confirm secret ID delivery and TTL limits, and that the role is mapped to a named owner group for review.
Groups that exist only in OpenBaoInternal identity groups with manual or scripted membershipRequires an owner who approves membership changes. Confirm a review cadence and that removals in the IdP are reflected in OpenBao, since internal groups do not sync.
Reference for all auth methodsOpenBao auth methods documentationUse the auth methods page to confirm which methods your OpenBao version ships in the core binary and which are provided by openbao-plugins.

Setting up group-to-policy mapping step by step

This sequence connects your identity provider groups to OpenBao identity groups and policies, so each person gets the same access wherever they log in and access ends when group membership ends.

  1. Enable and configure the identity provider auth method

    The platform team enables the auth method that matches your identity provider, such as OIDC/JWT for an IdP or LDAP for a directory, and sets the issuer, client settings and the claim that carries group names. Confirm the method appears in the auth method list and that a test login returns a token. The check is a successful login with the expected token issued, plus a decoded claim showing the group values OpenBao will receive. Confirm the exact claim name and whether groups are sent in the ID token or fetched from a directory API with your identity team, because this varies by provider.

  2. Confirm the entity and alias created on first login

    Log in once with a test user and inspect the identity store. OpenBao creates an entity for the person and an alias that links the entity to the auth method's identifier for that user. Run the entity list and read the alias metadata to confirm the alias mount accessor matches your auth method. The check is one entity with one alias for the test user. Repeat with a second auth method for the same person, if you use more than one, and confirm both aliases attach to the same entity only where you have configured that link on purpose.

  3. Create external groups with aliases to directory group identifiers

    Create an external group for each IdP or directory group that should grant access, then add a group alias whose name exactly matches the identifier the provider sends in the group claim, and point it at the auth method's accessor. Use the directory's stable group identifier where your provider offers one, since display names can change. The check is that listing group aliases shows each alias bound to the correct accessor and that the names match the values seen in step one.

  4. Attach least-privilege policies to the groups

    Write one narrow policy per role, granting only the paths that role needs, and attach it to the matching external group. Keep administrative policies in separate groups with fewer members. Avoid giving broad read rights on secret paths to whole departments. The check is a policy review that lists each group, its attached policies and the paths they grant, and a read of the group object to confirm the policy names are present. Ask your security team to review any policy that includes sudo or wildcard paths before it is attached.

  5. Verify token policies with test accounts

    Create one test account per group, plus one account in no group. Log in as each and inspect the resulting token. Check that the token's policies are the union of the user's direct and group-derived policies and that paths outside those policies return permission denied. The check is a table of test accounts, expected policies and observed token policies, with no unexpected matches. Include a negative test for each high-value path so a mismatch is caught before real users reach the system.

  6. Run the removal test

    Remove a test account from its IdP or directory group, wait for the next login or token expiry according to your configured token lifetimes, and log in again. Confirm the new token no longer carries the group's policies and that requests to its paths are denied. Note that an existing token keeps its policies until it expires or is revoked, so decide with your security team whether to revoke active tokens during offboarding. The check is a denied request after the group change and a recorded token lifetime.

  7. Document the mapping and schedule group reviews

    Record each IdP group identifier, the OpenBao group it maps to, the attached policies and the owner who approves changes. Store this in your change-controlled repository and set a recurring access review with the identity team. The check is a current mapping inventory that matches the live entity, group and policy listings, and a named owner for each group. Confirm review cadence with your governance policy rather than adopting a default.

Security risks in group-based access

Mapping directory groups to OpenBao policies moves access decisions out of individual accounts and into group membership. Each risk below shows where that shift can fail quietly, and the control that catches it before an auditor or an attacker does.

Broad directory groups granting admin policies

A group such as all-engineering that is mapped to an administrative policy turns every new hire into an OpenBao administrator. Group membership in the identity provider is often managed by people who never think of it as a secrets decision. Check every external group mapped to a policy that grants sys/ paths, policy writes or secrets engine mounts, and keep those mappings to a small, named administrator group. Review the membership of that group on a fixed cadence and record who approved each change.

Auth methods docs

Stale entities after offboarding

An identity provider account that is disabled stops new logins, but the OpenBao entity, its aliases and any tokens or leases issued earlier can outlive it. Offboarding that only disables the directory account leaves the entity in place and its group memberships intact. Confirm that your offboarding process removes or disables the matching entity, revokes its outstanding tokens, and checks that leases tied to that identity are revoked. Test the sequence with a leaver account in a non-production cluster.

Mismatched group identifiers that grant nothing

External group mappings match on the exact group name or identifier that the auth method returns. A mismatch in case, a renamed group, or an identifier that differs between the IdP and the mapping can leave a team without access, which often pushes staff toward shared credentials. The reverse also happens when a similar name maps to the wrong policy. Compare the claim or group value OpenBao receives at login with the mapping configured for it, and test each mapping with a member of the target group before rollout.

Root and admin tokens outside the group model

Root tokens, unseal material and long-lived admin tokens sit outside the identity group model, so no directory change removes them. Teams create them for initial setup or break-glass work and then forget them. Inventory every token with broad capabilities, confirm which ones have an owner in the directory, and confirm that the root token is revoked after setup. Keep a documented break-glass procedure that names who can use it and how each use is logged.

Audit gaps when aliases share one entity

When several auth methods point at one OpenBao entity through aliases, audit log entries show the entity identifier, and it can be hard to tell which login path produced a given request. A user who logs in through OIDC on a laptop and through a certificate on a server appears as one person, which is the goal, but reviewers need to see the alias behind each request. Configure audit devices to capture the entity and alias data, and include alias review in your audit log review so unexpected login paths stand out.

Policies that drift from the group design

Policies are often edited directly to fix an urgent access problem, and the group mapping then no longer reflects what people can do. Over time, a group named for a read-only role may carry write capabilities that nobody approved. Keep policies in version control, make changes through review, and compare the live policy set with the repository on a regular schedule. Ask any provider you engage to show how policy changes are tested and recorded.

Operating group mappings across environments

Before you copy group mappings into every environment, decide whether development, staging and production will share one OpenBao cluster or run as separate clusters. OpenBao supports namespaces for multi-tenant isolation within one cluster, so teams or business units can get their own policy and secrets space without a second cluster. The choice affects who can change mappings, how many external group objects you maintain, and how much of the blast radius sits in one place. Namespaces separate tenants inside a cluster, but they do not replace the operational separation that a separate cluster gives you.

  • Isolation boundary: Confirm in the namespaces documentation which objects are scoped to a namespace, including auth mounts, policies and identity objects, before you map groups in each one.
  • Shared versus separate groups: Decide whether one IdP group maps to policies in several namespaces, or whether each namespace owns its own external group.
  • Blast radius: A misconfigured group alias in a shared cluster can affect every tenant that uses it, so keep production mappings in a separate review path.
  • Naming: Use the same group naming convention in every environment so audit records and reviews line up.
  • Promotion: Move mapping definitions through version control rather than editing live clusters by hand.

Check that each environment's mappings resolve to the intended policies by logging in as a test user from each group and reviewing the resulting token policies.

Limits to confirm before you rely on group mapping

Group-based policy only works when the identity provider, the auth method and OpenBao agree on who belongs to which group and when that membership takes effect. The cards below list the points to verify in your own environment before you map groups to policies for production users.

Group claims each IdP emits

Each identity provider decides which claim carries group membership, its name, and whether it contains group names, group IDs or both. Confirm the exact claim your IdP emits for the users and applications you plan to map, and test it with a real login. An IdP that sends opaque group IDs needs a mapping from those IDs to readable group names before you write policies.

Auth methods docs

How the auth method resolves groups

The same person can have different group data depending on whether they log in with JWT/OIDC, LDAP, Kerberos or another method. Check how the chosen method maps groups into OpenBao identity groups, and whether the mapping runs at login or only at token creation. Document this per method so policy owners know which source governs access.

Auth methods docs

Nested directory group expansion

Directory groups often contain other groups, and a user may reach a policy only through a nested membership. Confirm whether your directory or IdP returns transitive membership in the claim or query, and whether OpenBao receives the expanded list. Without this check, a user may hold access they should not have or lose access they need.

Entities for tokens issued before a change

Tokens carry policies that were resolved when they were issued, so a group change may not affect a token that already exists. Test a user who is removed from a group with an active token, and confirm how OpenBao applies the change to that token and to its entity. Plan for the gap rather than assuming removal is immediate.

Token TTL and revocation speed

Removing a user from a directory group does not revoke access until their tokens expire or are revoked. Set token TTLs and maximum lifetimes against the time you can tolerate for revoked membership, and confirm how your team revokes tokens for a departing user. Shorter TTLs raise login traffic on the IdP and the auth backend, so test that load as well.

Auth methods docs

Alias matching across auth methods

Entity aliases link one person's logins from different methods to a single entity. Confirm which attribute each method uses as the alias name, such as a username, email or subject claim, and that the values match across methods. A mismatch creates duplicate entities, and policies attached to one entity will not apply to the other.

Questions teams ask before mapping groups to policies

How long does it take to map identity provider groups to OpenBao policies?

The duration depends mostly on how many auth methods you need to connect, how many directory groups feed into policies, and how clean those groups are today. A small set of groups that already map cleanly to job functions moves quickly, while a directory with nested, overlapping or stale groups needs cleanup before any policy work can start. No fixed duration is set until the scope is written down. Ask a partner to break the estimate into discovery of group sources, alias and group configuration, policy drafting, and testing with real logins from each method.

What drives the effort up or down in this work?

Four factors shape the effort most:

  • The number of auth methods, since each one needs its own alias mapping to the same entity.
  • The number of groups that need policies, and whether each group's purpose is documented.
  • The quality of the directory, including duplicate accounts, missing attributes and groups named for projects that ended.
  • The number of environments, such as separate namespaces or clusters that need matching policy sets.

Each factor adds discovery, testing and sign-off work, so ask for the count of each in your quote.

Can our internal team map groups to policies without a partner?

Yes, a team that already operates OpenBao and has access to its identity provider can do this work. The skills needed are a clear model of who should hold which privileges, familiarity with OpenBao policy syntax, and the ability to test logins across each auth method. Teams often underestimate the directory review, because group ownership and membership rules are usually held by a different group. If you do this in-house, plan a test pass for every auth method before any production user is moved onto the new policies.

What do we need from the identity provider or directory team?

The directory team needs to supply a current export or read access to the groups in scope, the owner of each group, and the rule that controls membership, whether manual, attribute-based or synced from HR. They also need to confirm which identifier is stable enough to act as the alias key, such as a username, UPN or subject claim, because changing it later breaks entity links. Agree on a change process before go-live, so that a group rename or a new group does not silently grant or remove access.

What recurs after the mapping goes live?

Some work repeats for as long as OpenBao is in use:

  • Access reviews of which groups map to which policies, usually on a schedule your governance process sets.
  • Changes to directory groups, such as new teams, renamed groups or retired projects.
  • New auth methods or new policies, each of which needs alias and test coverage.
  • Upgrades of OpenBao that may affect how group data is read.

Ask the partner which of these are included in a fixed-scope engagement and which would move to an ongoing support arrangement.

How is cost structured in a fixed-scope quote?

A fixed-scope quote is built from a written list of deliverables, such as the group inventory, the entity and alias design, the policy set, the test plan and the handover documentation. Cost follows from that list, so the quote should state which auth methods, groups and environments are covered and what is excluded. One-time work covers the initial design and build. Recurring costs, if any, come from reviews, upgrades or support, and should be priced separately. DeployOpen does not publish a price list, so request a quote built from the written scope.

What should we ask a partner before signing?

Ask for a written scope that names every auth method, the group sources and the environments involved. Ask who performs the directory review and who signs off on policy changes. Ask how they test logins from each method, and what evidence you receive at handover, such as policy files, a mapping table and test results. Ask how group changes after go-live are handled and whether that is included. Finally, ask which steps depend on your own teams, so you can plan their time before the work starts.

What a DeployOpen group mapping engagement includes

A DeployOpen group mapping engagement starts with an inventory of every way people and machines reach your OpenBao cluster today: the auth methods enabled, the identity provider and directory sources behind them, and the policies currently attached to each path. The inventory records which directory groups exist, which accounts are duplicated across methods, and which logins bypass group membership entirely. From that inventory we define the entity and group model: how each person maps to one OpenBao entity, which login aliases attach to it, and which external groups (identity provider or directory groups) map to which internal groups and policies. The model is written down before any configuration changes are made.

Policy design is the largest decision in the engagement and it is reviewed with your security team rather than settled by us alone. Each policy is tied to a named group, a documented job function and the paths it needs, with capabilities kept narrow and administrative paths reserved for a small set of groups. We test the design with sample accounts placed in each group, covering both the allowed and denied paths, and we confirm that removing someone from a directory group removes the matching policy on their next login. Test results, configuration exports and the group-to-policy mapping table are delivered as handover documentation so your team can answer audit questions and make later changes without us.

The scope, deliverables, environments in scope and acceptance tests are agreed in writing before work starts, and a quote follows from that written scope. Cost is driven mainly by the number of auth methods and identity sources, how many distinct job functions need separate policies, whether your directory data is clean enough to map directly, and how many review rounds your security team expects. Ask for the quote to list each of these items separately, along with what is one-time work (design, configuration, testing, documentation) and what recurs if you retain DeployOpen for ongoing changes. Confirm with your OpenBao version and login method owners before scoping, since plugin availability affects which sources can be mapped.

How DeployOpen scopes and delivers OpenBao group mapping

DeployOpen plans, builds, tests and documents identity group mapping for OpenBao inside your own infrastructure, so each person keeps one identity and policies follow directory or IdP group membership. Engagements are fixed-scope, with the mapping rules, test cases and handover agreed in writing before work starts.

How we scope

  • We list the identity providers, directories and auth methods that must map to OpenBao identities and aliases.
  • We inventory the groups that will drive policies and agree which group names become which policy sets.
  • The written scope names deliverables, test cases, environments and the handover items before any build begins.
  • We confirm with you which entity alias merges are allowed so one person never gains duplicate access paths.

How we build

  • We configure external groups and group aliases against your IdP or directory and document each mapping rule.
  • We write policies from least-privilege templates and link each one to the group it serves, with review notes.
  • We test login from every auth method in scope and confirm that group changes add and remove access as expected.
  • We check that removed or offboarded users lose policy-derived access and that existing tokens expire as designed.

How we hand over

  • You receive the mapping matrix, policy files and configuration as documentation tied to your agreed scope.
  • Runbooks cover adding a group, changing a policy, merging duplicate entities and reviewing alias conflicts.
  • Your team walks through test evidence and a handover session covers the items your administrators will own afterward.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, so group mappings can be reviewed after OpenBao upgrades.
  • Retainer work can cover new IdP groups, new auth methods and periodic access reviews of the mapping rules.
  • Ask your DeployOpen contact to confirm retainer terms and response expectations in the written quote.

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.