The Root Token is the most powerful token in Vault, holding sudo privileges over every feature including operations under sys/. Convenient as it is, any misuse or leak translates directly into a cluster-wide crisis.
This article covers what the Root Token really is, the bootstrap path toward least-privilege design, the revoke/regenerate workflow (generate-root), and the points most often tested on the exam. Content assumes stable features from the official documentation.
The Initial Root Token issued when Vault is initialized is effectively the supreme-privilege token, with policy-level full access including create/read/update/delete/list/sudo on path "*". Many sys/ endpoints require sudo, and the Root Token can execute them without restriction.
The Root Token is not for daily operations. Once audit and authentication are in place during initial setup, the principle is to hand off to a broadly scoped administrator token and revoke the Root Token. In real environments the Root Token may be non-expiring, so do not rely on lifetime — always assume an explicit revoke is required.
| Type | Scope | Typical TTL / lifetime | Creation / acquisition |
|---|---|---|---|
| Root Token | Full access (including sudo and sys/*) | Often non-expiring (environment dependent); explicit revoke recommended | Issued at init; regenerate via generate-root when needed |
| Administrator token (broad) | Broad within a namespace or team scope; sudo only on the paths that need it | Hours to days (renewable) | Login via an Auth Method like OIDC/LDAP plus ACL policies |
| Automation token (AppRole, etc.) | Least privilege on target paths; no sudo as a rule | Minutes to hours (short-lived, periodically renewed) | AppRole/auth flow plus wrapping tokens |
Right after receiving the Initial Root Token, the things to do are: enable audit, prepare auth methods, write ACL policies, build the administrator role, and end the Root Token's role (revoke). Establishing a flow that does not hold onto the Root Token minimizes the blast radius of any leak.
The safe operational flow is: 1) enable an audit device first, 2) enable the required Secrets Engines / Auth Methods, 3) write ACL policies for admins and operators, 4) configure an auth method (OIDC/LDAP/AppRole), issue and verify an administrator token, 5) revoke the Root Token.
Bootstrap flow (overview)
The safe stance is: do not store the Root Token; regenerate it when you actually need it. Never use the Root Token in automation or routine operations. Codify any Root-required task into a runbook, and minimize the time between issue and revoke.
Inventory the operations that truly require sudo (sys/auth, sys/mount, sys/policies, etc.) and grant only narrowly scoped sudo on the administrator policy. Enable the audit log first, and ensure every Root Token use is captured by audit.
The default for the Root Token is an explicit revoke. If you are logged in with the existing Root, use vault token revoke -self; from another session, use vault token revoke <token>. On a suspected leak, revoke immediately and regenerate only if needed.
Regeneration uses vault operator generate-root. With the OTP method: 1) run -init to obtain the nonce and OTP, 2) the required quorum of Unseal Key (or recovery key) holders apply their keys in sequence to complete the encoded token, 3) decode with the OTP to obtain the new Root Token. Finish the intended operation promptly afterwards and revoke the Root Token again. Using a PGP key to limit who can decode is a common pattern as well.
Example: temporarily regenerating a Root Token with the OTP method
# 1) 初期化: nonceとOTPを取得
$ vault operator generate-root -init -otp
Nonce : 9b1d... (記録)
One-time OTP : c2VjdXJlLW90cA== (記録)
# 2) クォーラム分のキーを順次適用
$ vault operator generate-root -nonce=9b1d...
Unseal Key (will be hidden): <キー1を入力>
Progress: 1/3
$ vault operator generate-root -nonce=9b1d...
Unseal Key (will be hidden): <キー2を入力>
Progress: 2/3
$ vault operator generate-root -nonce=9b1d...
Unseal Key (will be hidden): <キー3を入力>
Progress: 3/3
Encoded Token: eyJlbmNvZGVkX3Jvb3QiOi... (記録)
# 3) 復号してRoot Tokenを取り出す
$ vault operator generate-root -decode=eyJlbmNvZGVkX3Jvb3QiOi... -otp=c2VjdXJlLW90cA==
Root Token: s.zwJ9... (用途限定で使用)
# 4) 目的操作完了後に明示失効
$ VAULT_TOKEN=s.zwJ9... vault token revoke -selfWhich operations require sudo can be checked with path-help. Hitting a sudo-required endpoint with a normal token results in permission denied. Only add sudo to the administrator policy for the specific paths that need it.
Use vault token lookup to inspect token state and vault capabilities to inspect permissions. When using the Root Token, also verify that the audit log captures the operation in question.
On the exams, what comes up often is whether you understand that the Root Token is limited to initial bootstrap and that the order is audit → auth → policy → Root revoke. generate-root is a multi-step process involving a quorum of key holders, and you may be asked about safe distribution using OTP or PGP.
Common traps include confusing basic terms: the difference between sudo and root, designing administrator tokens (obtained via an auth method) with scoped sudo, not using the Root Token for automation, and the fact that Unseal/Recovery keys are not tokens.
Associate / Ops
問題 1
After initializing Vault and receiving the Initial Root Token, which is the most appropriate immediate course of action?
正解: A
The correct answer is to enable audit first, set up the entry point for day-to-day operations via an auth method and ACLs, and then revoke the Root Token. Long-term storage or automation use of the Root Token is inappropriate, and explicit revocation is preferred over relying on TTL.
I lost the Root Token. What should I do?
If you need one, regenerate a temporary Root Token with generate-root. Run -init to obtain a nonce and OTP, have a quorum of Unseal/Recovery key holders apply their keys in sequence to complete the encoded value, then decode it with the OTP. Revoke the Root Token immediately after the work is done.
Can a TTL be set on the Root Token?
Behavior varies by environment, but the Root Token may be effectively non-expiring. Do not rely on TTL — minimize usage and assume an explicit revoke is required. For operational rotation, the recommended approach is to issue a Root Token with generate-root only when needed and revoke it immediately afterwards.
What is the difference between the root policy and sudo?
sudo is a capability that authorizes administrative operations on specific endpoints. The root policy is effectively an all-powerful policy that grants create/read/update/delete/list/sudo on path "*", which is what lets the Root Token execute sudo-required operations such as sys/*. For administrator tokens, grant sudo only on the specific paths that actually need it.
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...