cert-bank

Guides

이 글을 한국어로 읽기

Vault Associate (003) Study Guide: Follow One Request from Login to Revocation

The Vault Associate exam has nine objectives, and studied one by one they feel like nine separate subjects. They are not. They describe the stations of a single request: a client proves who it is, receives a token, the token's policies are checked against a path, a secrets engine answers, the answer carries a lease, and sooner or later the token and the lease end. Under all of it sits the encrypted storage and the seal. This guide follows that request from start to finish, because most exam questions ask what happens at one station, or what happens downstream when something changes upstream.

Study guide · HashiCorp Certified: Vault Associate (003) (VLT-VA003)

Vault Associate (003) Study Guide: Follow One Request from Login to Revocation

The exam in brief

One hour, proctored online, in English, testing Vault 1.19. Question types are true or false, multiple choice and multiple answer; a multiple-answer item tells you how many to choose. HashiCorp does not publish the number of questions, the pass mark or objective weights, so check the official exam page and cover all nine objectives. Among the 253 VLT-VA003 questions in this question bank, 17% ask for several answers, and more than one in five tells a "this stopped working" story. The word "token" appears in 56 question stems, far more often than "policy" (30) or "lease" (28).

Station 1: who are you? (auth methods)

An auth method checks identity and, on success, returns a token, never a secret. Choosing a method means choosing where identity comes from, so first decide whether the client is a person or a workload.

Clue in the questionMethod
Staff sign in to the UI through the company SSOJWT/OIDC with an OIDC role (browser redirect)
Use our Active Directory passwordsLDAP
A CI platform already issues signed JWTs to its jobsJWT role (no browser)
A pod needs a token with no pre-shared secretKubernetes
A workload on AWS proves its identityAWS, iam type (recommended)
An app or batch job; an orchestrator can deliver a one-time secretAppRole, with a response-wrapped SecretID

The classic trap: an OIDC role in a headless pipeline. A browser redirect cannot happen there. Also remember that sharing one login across people destroys the audit trail, because everyone appears as one entity.

Station 2: the token

Service tokens are stored and tracked, so they can be renewed, revoked, have children, an accessor and a cubbyhole. Batch tokens are encrypted blobs with nothing stored; they cannot be renewed or revoked by hand and have no accessor or children. Choose batch for huge numbers of short, simple jobs and service for everything else. A short TTL does not make a service token stateless.

Lifetime rules carry many points:

  • Renewal restarts the TTL window from now; it does not add time to the old end.
  • Renewal stops working at the max TTL. A token renewed correctly for weeks that suddenly dies has reached it.
  • A periodic token has no max TTL (unless an explicit one is set) and lives as long as it is renewed within each period, which suits long-running services.
  • Revoking a parent revokes all its children and their leases. Orphan tokens have no parent; tokens from any login other than the token method are orphans.

Station 3: the policy check

Vault denies by default. A request succeeds only if some policy on the token has a matching path stanza with the capability the HTTP verb needs: GET is read, POST or PUT is create or update, LIST is list. Generating database credentials is a GET, so read is enough.

  • * is a prefix match and only allowed at the end. + stands for exactly one segment and can appear anywhere.
  • On KV version 2, values live under data/ and key listings under metadata/. A policy on secret/app/db matches nothing a vault kv get sends.
  • deny beats everything, including sudo. sudo is needed only for root-protected paths such as audit devices, seal and prefix revocation.
Going deeper: why a narrower stanza can take capabilities away

When several policies on a token contain the identical path pattern, their capabilities are combined. When different patterns match the same request, Vault does not combine them: only the highest-priority pattern applies. A pattern ranks lower when its first wildcard comes earlier, when it ends in * and the other does not, when it has more + segments, or when it is shorter. So a token with read and update on secret/data/* plus only read on secret/data/app/* cannot update secret/data/app/x: the more specific stanza wins and it grants only read. Questions that list two policies and ask what a token can do are testing this rule.

Beginner tip: start a throwaway dev server with vault server -dev, enable KV version 2, and run any command with -output-policy added: the CLI prints the exact policy that request would need instead of running it. Then write a small policy, create a token with it and test paths with vault token capabilities TOKEN PATH. Seeing data/ appear in the printed policy fixes the KV v2 path rule for good.

Station 4: the secrets engine

Static engines store what you give them (KV). Dynamic engines create credentials on request (database, AWS) and revoke them later. PKI issues certificates, SSH signs keys or issues credentials, cubbyhole is private to one token, and transit encrypts without storing your data. Response wrapping hands a value through a single-use wrapping token, so a middleman never sees it.

Transit gets its own objective. Plaintext must be base64-encoded. A ciphertext such as vault:v2:... names the key version, not the key. Rotating adds a version; old ciphertext still decrypts. rewrap moves ciphertext to the newest version without exposing plaintext, and the application must store the result itself. min_decryption_version stops old versions from decrypting.

Station 5: the lease and the end of the line

Every dynamic secret, and every service token, has a lease. KV data does not. A lease ID begins with the path the secret came from, which is why vault lease revoke -prefix aws/ can revoke every AWS credential at once (it needs sudo). Renewal keeps the same secret and lease ID, and the increment is counted from now. When a lease expires, or the token that created it is revoked, Vault revokes the secret at its source. Disabling an engine revokes everything it issued and deletes its data, which is heavier than revoking by prefix.

VLT-VA003: the stations of a single Vault request
1
Auth method
The client proves who it is and receives a token, never a secret
2
Token
Service or batch; renewal restarts the TTL and stops at the max TTL
3
Policy check
Deny by default; a matching path stanza must grant the needed capability
4
Secrets engine
Static KV, dynamic credentials, PKI, transit; response wrapping
5
Lease and the end
When the lease expires or its token is revoked, Vault revokes the secret at its source
A request moves left to right; a change at one station shows up at the stations after it.

Underneath: barrier, seal and cluster

Everything Vault writes passes through the barrier and is encrypted, so storage is treated as untrusted. A chain of keys protects it: the unseal key protects the root key, which protects the encryption key. vault operator init runs once per cluster and prints key shares (5 shares, threshold 3 by default) and an initial root token. A sealed node can report status and accept shares, nothing else.

Going deeper: what recovery keys can and cannot do

With auto-unseal, a trusted external service such as a cloud KMS decrypts the root key at startup, so restarted nodes come up unsealed without people. Initialization then returns recovery keys instead of unseal keys. Recovery keys cannot unseal anything; they only authorize quorum operations such as generating a new root token or rekeying. This is why "use the recovery keys to unseal after the KMS key was deleted" is wrong: if the KMS key is gone, the root key cannot be decrypted and the data is unreachable. Moving from Shamir to auto-unseal is a seal migration, done with vault operator unseal -migrate; the old Shamir keys become the recovery keys.

Deployment questions ask about Integrated Storage with a quorum of nodes, HA with one active node and standbys, and the difference between self-managed Vault and HCP Vault Dedicated (HashiCorp runs storage, unseal, upgrades and backups; you still configure auth, policies and engines). Replication, DR or performance, is a Vault Enterprise feature.

Delivering the secret to the application

The last objective asks who must be Vault-aware. Vault Agent runs beside an unchanged application, logs in by itself (auto-auth), renews the token and renders secrets into files with templates; it works on virtual machines too. The Vault Secrets Operator syncs secrets into native Kubernetes Secrets and is Kubernetes-only. Calling the API directly gives the most control, for example transit on every record, but the application must know Vault.

A study order

  1. Policies and tokens first; they appear inside questions from every other objective.
  2. Auth methods, then leases.
  3. Secrets engines and transit.
  4. Architecture: barrier, init, seal and unseal; then clusters, auto-unseal and HCP Vault Dedicated.
  5. Agent and the Secrets Operator, then mixed timed sets.

Practise

Practise in the question bank: every question explains each option, right and wrong. Start with the domain you just studied, then take a timed mock exam.

Exam facts and objectives as described in HashiCorp's Vault Associate (003) exam content. Question count, pass mark and weights are not published; check the official exam page.