Vault Auth Methods are the front door that converts external identity information into Vault tokens. Pick the wrong method and you'll get stuck on initial bootstrapping or rotation; design it well and you can dramatically reduce both operational cost and risk.
This article gives you a sweeping view of the major methods, a selection framework, when to use TTL vs. period, and role design and auditing. We also call out the points most likely to appear on the Associate exam.
Auth Methods handle authentication. Secret Engines handle secret issuance and storage. They serve different roles. Auth Methods accept external credentials (e.g., Kubernetes ServiceAccount JWTs, IAM proofs, LDAP credentials, AppRole role_id/secret_id), validate them, evaluate claims, attach policies, and issue Vault tokens.
Issued tokens carry policies and a TTL (or period) and are used to access Secret Engines. Even when multiple Auth Methods run in parallel, Vault's Identity (Entity/Group) lets you consolidate the same person or workload across them.
The standard Vault authentication flow
Pick an Auth Method based on three questions: who is logging in from where, how do you safely deliver the initial credential, and how do you operate renewal and revocation? What's technically possible falls apart if you can't operate it.
Realistically, screen candidates against the criteria below and validate the surviving 1-2 options in a PoC.
We compare the main methods by primary subject, bootstrap, rotation, external dependencies, and typical use cases. In practice, the four pillars of Kubernetes, OIDC, AppRole, and cloud cover almost every case.
| Method | Primary Subject | Initial Bootstrap | Rotation / Renewal |
|---|---|---|---|
| Token | Human/Machine | Distributed by Vault admins (not recommended) | Renew or reissue the token itself |
| OIDC/JWT | Human (developers/operators) | IdP federation (browser/CLI) | IdP-side session plus Vault token renewal |
| Kubernetes | Machine (Pod) | ServiceAccount JWT (TokenReview) | Pod restart or periodic renewal |
| AppRole | Machine (VM/batch) | Distribute role_id + secret_id (use count/TTL limits available) | Rotate secret_id plus renew token |
| AWS | Machine | IAM proof (STS signature/EC2 document) | Transparent on instance/role changes |
| GCP | Machine | GCE/Workload Identity proof | Transparent via role/SA management |
TTL and period are commonly confused. TTL-based tokens can be renewed up to a maximum lifetime (not exceeding max_ttl). Periodic tokens have no expiration and remain valid as long as they are renewed within the specified period (though they expire if explicitly revoked). Choose between them based on the process's runtime pattern and how easily it can re-login.
Beyond minimizing granted policies in role design: bind ServiceAccount/Namespace for Kubernetes, limit secret_id by use count, TTL, and CIDR for AppRole, and configure strict matching by role/SA/tags for cloud methods. Enable audit logging at least for the auth/* login paths so you can trace who got a token under which role from where.
Minimal AppRole and Kubernetes Auth configuration example (CLI)
# 1) ポリシー(例)
vault policy write app - <<'EOF'
path "secret/data/app/*" {
capabilities = ["read"]
}
EOF
# 2) AppRole を有効化してロール作成
vault auth enable approle
vault write auth/approle/role/app \
token_policies="app" \
token_ttl=1h \
token_max_ttl=4h \
secret_id_ttl=24h \
secret_id_num_uses=10 \
secret_id_bound_cidrs="10.0.0.0/24"
# ログイン用のID取得
ROLE_ID=$(vault read -field=role_id auth/approle/role/app/role-id)
SECRET_ID=$(vault write -f -field=secret_id auth/approle/role/app/secret-id)
# ログイン
vault write auth/approle/login role_id="$ROLE_ID" secret_id="$SECRET_ID"
# 3) Kubernetes Auth を有効化して Role 作成
vault auth enable kubernetes
vault write auth/kubernetes/config \
token_reviewer_jwt="$($(command -v cat) /var/run/secrets/kubernetes.io/serviceaccount/token)" \
kubernetes_host="https://${KUBERNETES_PORT_443_TCP_ADDR}:443" \
kubernetes_ca_cert=@/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
vault write auth/kubernetes/role/demo \
bound_service_account_names="vault-demo" \
bound_service_account_namespaces="default" \
policies="app" \
ttl=1hExam questions center on "which Auth Method fits this requirement" and "which TTL/period setting is correct." In operations, misconfiguration and over-privileged grants are the typical causes of incidents.
The pragmatic migration from legacy environments is to gradually shift humans to OIDC and machines to K8s/cloud IAM/AppRole. You can keep existing userpass/LDAP/GitHub in parallel for a while, but tighten policies and TTLs and beef up auditing to limit risk.
In multi-cloud/hybrid setups, use the cloud-native Auth Method in each environment, consolidate them as a single Entity on Vault's Identity layer, and unify policy distribution by group. This gives you stable operations.
Associate
問題 1
An in-house microservice running on Kubernetes needs to fetch dynamic DB credentials from Vault. Pods auto-scale and you want to avoid manually distributed credentials. Which combination of Auth Method and token type fits best?
正解: A
For machine workloads with automatic authentication on K8s, Kubernetes Auth is the first choice. It fits the Pod lifecycle well and supports bootstrapping via ServiceAccount. Long-running Pods are best served by continuously renewing a periodic token.
What is the difference between periodic tokens and TTL-based tokens?
TTL-based tokens can be renewed up to a maximum lifetime (max_ttl). Periodic tokens have no expiration and stay valid as long as they are renewed within the specified period. token_period must not be combined with TTL settings.
Is it game over if an AppRole role_id leaks?
role_id alone cannot be used to log in; it must be combined with a secret_id. Additionally, secret_id should be constrained by use count, TTL, and CIDR, and rotated/revoked promptly if leaked.
What are the prerequisites for Kubernetes Auth?
Vault must be able to call TokenReview against the Kubernetes API (token_reviewer_jwt, kubernetes_host, and ca must be configured). The Role should strictly bind to specific ServiceAccount names and Namespaces.
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...