Authentication in Vault is the act of obtaining a token, but the long-term unit for permission management and auditing is the Identity (Entity). Entities tie the same person or application across multiple auth methods together, and Entity Aliases are the bridges that make that mapping work.
This article covers the definitions and flow most likely to appear on the exam, plus the operational gotchas that trip people up — alias scope, accessor handling, group design, and merging duplicate Entities — with concrete commands.
Vault's Identity store consolidates tokens issued by each auth method into a single canonical principal — the Entity. An Entity has a unique ID within Vault and serves as the anchor for auditing and policy application.
An Entity Alias defines how a local identifier as seen by a specific auth method (e.g., the username for userpass, the sub claim for OIDC) maps to a given Entity. Aliases are scoped per auth method mount, and each alias is uniquely identified by the combination of mount accessor and name.
Basic creation and read commands
## Entity 作成
ENTITY_ID=$(vault write -format=json identity/entity name="alice" | jq -r .data.id)
echo $ENTITY_ID
## 認証メソッドの accessor を取得(例: userpass)
UP_ACCESSOR=$(vault auth list -format=json | jq -r '."userpass/".accessor')
echo $UP_ACCESSOR
## Entity Alias 作成(userpass の alice を Entity に結びつけ)
vault write identity/entity-alias \
name="alice" \
canonical_entity_id="$ENTITY_ID" \
mount_accessor="$UP_ACCESSOR"
## Entity の参照
vault read identity/entity/id/$ENTITY_IDA client logs in via any auth method and receives a token. Vault then looks up the Entity Alias using that token's auth method and local ID (such as username or sub) to find the corresponding Entity. If none is found, some methods will auto-create an alias on first login (for example, depending on OIDC/JWT role configuration).
Final permissions are the union of policies attached directly to the token and policies attached on the Identity side (the Entity itself and the Groups it belongs to). Vault policies are allow-only, so there is no explicit-deny conflict to worry about. When the same capability is granted via multiple paths, the grants simply merge.
From authentication, to Entity binding, to policy resolution
Inspecting the Entity behind a token
## 現在のトークンにひもづく Entity ID を確認
vault token lookup | grep entity_id
## JSON で確認
vault token lookup -format=json | jq -r .data.entity_idIt's common for the same user to use both userpass and OIDC, or for an application to alternate between AppRole and Kubernetes auth. The key is to know exactly what local ID (alias name) each method exposes, and to bind it to the existing Entity using the right mount accessor.
As a rule of thumb: userpass/ldap uses the username; OIDC/JWT defaults to sub (you can override via the role's user_claim); AppRole uses the role_id as the alias name. If you change the method's path (by re-enabling it or moving the mount), the accessor also changes — so you must recreate the alias.
| Aspect | Entity | Entity Alias | Group |
|---|---|---|---|
| Identifier | Entity ID (immutable unique ID) | mount accessor + name (unique within the method) | Group ID (unique within Vault) |
| Role | Canonical record of the principal | Bridges an auth method's local ID to an Entity | Unit for grouping multiple Entities and attaching policies |
| Scope | Vault-wide | A specific auth method mount | Vault-wide (can link to external groups via alias) |
| Policy attachment | Allowed when needed, but Group-centric design is the norm | Not allowed (Aliases carry no permissions) | Allowed (and the recommended target) |
| Typical operations | Create / disable / read | Create / delete (recreate to rebind) | Create / attach policies / manage members / create group aliases |
Example: consolidating multiple methods into a single Entity
## 既存 Entity(alice)に OIDC のエイリアスを追加する
ENTITY_ID=... # 既知の Entity ID
OIDC_ACCESSOR=$(vault auth list -format=json | jq -r '."oidc/".accessor')
## OIDC ロールの user_claim が "email" なら、name はユーザーの email にする
vault write identity/entity-alias \
name="[email protected]" \
canonical_entity_id="$ENTITY_ID" \
mount_accessor="$OIDC_ACCESSOR"In practice, the most maintainable design is to consolidate policies on groups and treat Entities as group members. Map groups coming from external IdPs (OIDC/LDAP and the like) using Vault Group Aliases, and combine them with internal groups as needed.
Final permissions are the union of (1) policies attached when the token was issued, (2) policies attached directly to the Entity (when used), and (3) policies attached to the groups the Entity belongs to. The exam frequently tests this additive model and the group-centric design — keep them in mind.
Example: configuring a group and a group alias
## 内部グループ作成 + ポリシー付与
GROUP_ID=$(vault write -format=json identity/group name="devs" policies="dev-read,kv-common" | jq -r .data.id)
## 既存 Entity をメンバーに追加
vault write identity/group/id/$GROUP_ID member_entity_ids="$ENTITY_ID"
## OIDC の groups クレーム "devs" をこのグループに結びつける
OIDC_ACCESSOR=$(vault auth list -format=json | jq -r '."oidc/".accessor')
vault write identity/group-alias \
name="devs" \
canonical_group_id="$GROUP_ID" \
mount_accessor="$OIDC_ACCESSOR"Adding new auth methods, changing paths, or early operational mistakes can leave a single person with multiple Entities. The safe resolution is to pick a canonical Entity and re-point every auth method's alias at it. Disable the duplicate Entity afterwards — that preserves the audit log while blocking new bindings.
The pitfalls are accessor handling and the accuracy of the alias name (local ID). If the OIDC user_claim has been changed, the alias name can end up being a value you didn't expect. During migration, always cross-check the role configuration against the actual user's claims.
A safe example of consolidation (rebinding aliases)
## 付け替え先(正)の Entity ID
PRIMARY_ENTITY_ID=...
## 認証メソッドの accessor を確認
vault auth list -detailed
## 既存の Entity Alias を列挙して確認
vault list identity/entity-alias/id | sed '1d' | while read ID; do
vault read -format=json identity/entity-alias/id/$ID | jq '{id:.data.id, name:.data.name, mount_accessor:.data.mount_accessor, entity_id:.data.canonical_entity_id}';
done
## 誤った Entity に向いている Alias を削除して作り直す
BAD_ALIAS_ID=...
vault delete identity/entity-alias/id/$BAD_ALIAS_ID
## 正しい Entity に向けて再作成(例: userpass の alice)
UP_ACCESSOR=$(vault auth list -format=json | jq -r '."userpass/".accessor')
vault write identity/entity-alias \
name="alice" \
canonical_entity_id="$PRIMARY_ENTITY_ID" \
mount_accessor="$UP_ACCESSOR"
## 重複 Entity を無効化
DUP_ENTITY_ID=...
vault write identity/entity/id/$DUP_ENTITY_ID disabled=trueStart by asking two questions: which Entity is the token bound to, and which policies are attached to that Entity and its Groups? The typical culprits are a wrong alias accessor or a mismatch between the assumed OIDC user_claim and reality.
Duplicate alias names within the same mount are not allowed. When changing an auth method's path changes the accessor, the old aliases are not invalidated — you have to delete and recreate them explicitly.
Verification commands you'll use most often
## トークンの Entity と有効ポリシー
vault token lookup | egrep 'entity_id|policies'
## パスに対する権限確認(現在のトークン)
vault token capabilities secret/data/app/*
## 認証メソッドと accessor 一覧
vault auth list -detailed
## Entity 一覧と個別詳細
vault list identity/entity/id
vault read identity/entity/id/<ENTITY_ID>
## エイリアスの検索(ID は list で取得)
vault list identity/entity-alias/id
vault read identity/entity-alias/id/<ALIAS_ID>Associate
問題 1
Alice already logs in via userpass, and you want to bind the same user to a newly enabled OIDC method as well. Which procedure correctly consolidates logins from both methods into a single Entity?
正解: A
Entity consolidation happens through Entity Aliases. The OIDC alias name must match the role's user_claim (sub by default), and you must also specify the mount accessor identifying the target auth method along with the existing Entity's canonical_entity_id. Policy names, method paths, and TTLs have no bearing on Entity binding.
If I delete an alias, is the Entity deleted too?
No. An Entity Alias is just a bridge — deleting it leaves the underlying Entity intact. If you want to map the same principal to a different auth method later, keep the Entity and create a new Alias.
If I change an auth method path (re-mount it), what do I need to update?
The mount accessor changes, so every Entity Alias (and Group Alias) tied to that method must be recreated against the new accessor. The old aliases are not updated automatically.
What is the alias name used for AppRole?
The alias name for AppRole is the RoleID — not the Role name. If you rotate the RoleID, plan to re-point the alias as needed, based on your workflow and audit requirements.
Practice with certification-focused question sets
無料で問題を解いてみるNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Vault Core Concepts: Sealed/Unsealed, Auth, Secrets (2026)
Vault fundamentals — sealed/unsealed state, auth methods, se...
Vault Operations Professional (VOP-003): Complete Guide (2026)
Pass the Vault Operations Professional exam — enterprise pat...
Vault Path-Based Routing: API URL Structure (2026)
How Vault's path-based routing works — mount points, sub-pat...
Vault Tokens: Auth Token Mechanics (2026)
Token fundamentals — service vs. batch tokens, accessor, ren...
Vault Token Types: Service, Batch, Periodic (2026)
Service vs. batch tokens compared — performance, ACL behavio...