Home / HashiCorp Certified: Vault Associate (003) / Mock exam
HashiCorp Certified: Vault Associate (003) Exam-style mock test

HashiCorp Vault Associate (003) Practice Exams — 6 Mock Tests|Practice test

Full explanations Exam format Pass line 70%
33 USD One-time · lifetime access
Enroll →

Sample questions

Example1 · Authentication methods
A payments platform runs batch jobs on CI runners that must log in to Vault with no human present and no reliance on a cloud provider identity. The security team wants a role id plus a secret id that they can rotate independently. Which auth method fits this requirement?
・Userpass, built around one shared service password
Incorrect. A shared password is static and hard to rotate per runner, and it is meant for interactive users.
・GitHub, mapping an organization team to policy
Incorrect. The GitHub method ties login to a user token, so it targets people rather than headless jobs.
・OIDC, redirecting the user through a browser
Incorrect. That flow needs an interactive browser login, which a headless CI runner cannot complete.
✓AppRole, using a role id with a secret id
Correct. AppRole issues a role id and a rotatable secret id, which suits automated workloads with no human and no cloud identity.
Explanation
AppRole is purpose-built for machine logins where a cloud identity is unavailable, exposing a role id and an independently rotatable secret id.
Example2 · Vault policies
A fintech team needs a policy that lets a service read and list secrets under a path but never change or remove them. Which capabilities set belongs in the policy?
・["create", "update"]
Incorrect. Create and update both grant write access, which the requirement explicitly forbids.
・["read", "delete"]
Incorrect. Delete would let the service remove secrets, violating the read-only intent.
・["sudo", "list"]
Incorrect. The sudo capability unlocks protected endpoints and far exceeds a read-only need.
✓["read", "list"]
Correct. Granting only read and list lets the service view and enumerate secrets without any write or delete power.
Explanation
Vault capabilities map directly to actions; read plus list gives view-only access while any create, update, delete, or sudo adds mutation power.
Example3 · Vault tokens
A high-frequency trading service makes thousands of short logins per second and wants tokens that avoid storage writes and need no renewal. Which token type suits this load?
・Service tokens
Incorrect. Service tokens are written to storage and carry more features, adding overhead at extreme volume.
・Root tokens
Incorrect. Root tokens are unrestricted and must be tightly controlled, not spread across many sessions.
✓Batch tokens
Correct. Batch tokens are encrypted, lightweight, and not persisted, so they scale to very high login rates.
・Periodic tokens
Incorrect. Periodic tokens still persist in storage and are meant for long-lived renewals, not burst logins.
Explanation
Batch tokens trade some features for performance; being memory-only and non-persistent, they fit very high request rates.
Example4 · Vault leases
A clinical database credential issued by Vault is nearing the end of its lease, and the billing service must keep using it. Which command extends the lease?
・vault lease revoke <lease_id>
Incorrect. Revoking the lease invalidates the credential immediately, the opposite of keeping it usable.
✓vault lease renew <lease_id>
Correct. The lease renew command extends the lease duration so the service can keep using the credential.
・vault lease lookup <lease_id>
Incorrect. Lookup reports lease metadata but does not extend the remaining time on the lease.
・vault token renew <lease_id>
Incorrect. Token renew acts on tokens, not on secret leases, so it does not extend this database credential.
Explanation
vault lease renew extends a lease up to its max TTL, while revoke ends it, lookup only reads it, and token renew targets tokens.
Example5 · Secrets engines
A hospital app needs database credentials that are unique per request and expire automatically, so a leaked value is useless within the hour. Which secrets engine fits?
・The KV version 2 secrets engine
Incorrect. KV stores static values that must be rotated manually and are not unique per request.
・The cubbyhole secrets engine per token
Incorrect. Cubbyhole stores token-scoped data but does not generate database logins on demand.
・The transit secrets engine for keys
Incorrect. Transit performs encryption as a service and does not issue database credentials at all.
✓The database secrets engine for dynamic creds
Correct. The database engine generates short-lived, per-request credentials that Vault revokes when the lease ends.
Explanation
The database secrets engine mints unique, auto-expiring credentials per request, unlike static KV, token-scoped cubbyhole, or key-only transit.
Example6 · Encryption as a service
A billing service holds a transit ciphertext string and must recover the original patient identifier at read time. Which API call returns the plaintext?
・POST /v1/transit/encrypt/billing with ciphertext
Incorrect. The encrypt endpoint turns plaintext into ciphertext, the opposite of recovering the identifier.
✓POST /v1/transit/decrypt/billing with ciphertext
Correct. Posting the ciphertext to the transit decrypt endpoint returns the base64 plaintext for that key.
・POST /v1/transit/rewrap/billing with ciphertext
Incorrect. Rewrap re-encrypts ciphertext to a newer key version but does not reveal the plaintext.
・GET /v1/transit/keys/billing for the material
Incorrect. Reading the keys path exposes key metadata and cannot decrypt a specific ciphertext value.
Explanation
transit/decrypt/<key> converts ciphertext back to plaintext, while encrypt, rewrap, and keys serve encryption, key-version migration, and metadata respectively.
Example7 · Vault architecture fundamentals
A retailer's deployment script runs the Vault CLI but keeps targeting the local loopback address instead of the production cluster at https://vault.shop.internal:8200. Which environment variable must the script set?
・VAULT_TOKEN
Incorrect. VAULT_TOKEN supplies credentials but does not change which server address the CLI targets.
✓VAULT_ADDR
Correct. VAULT_ADDR sets the cluster endpoint the CLI connects to, overriding the loopback default.
・VAULT_NAMESPACE
Incorrect. VAULT_NAMESPACE selects an Enterprise namespace, not the server address.
・VAULT_CACERT
Incorrect. VAULT_CACERT points at a CA file for TLS trust, not the target address.
Explanation
The CLI defaults to the local loopback unless VAULT_ADDR names the intended cluster endpoint.
Example8 · Vault deployment architecture
A retailer runs self-managed Vault on integrated storage and wants the cluster to tolerate losing one node while still keeping a raft quorum. What is the smallest voting node count that achieves this?
・Two nodes
Incorrect. With two nodes, losing one breaks the majority and the cluster cannot keep quorum.
✓Three nodes
Correct. Three voting nodes keep a majority of two if one node is lost, preserving quorum.
・Four nodes
Incorrect. Four works but is more than the minimum and offers no extra fault tolerance over three.
・One node
Incorrect. A single node has no redundancy and cannot survive any loss.
Explanation
Raft needs a majority to keep quorum, so three voting nodes is the minimum that survives a single-node failure.
Example9 · Access management architecture
A legacy inventory binary at a retailer cannot speak Vault's API and only reads credentials from a file on disk. Which component bridges that gap by fetching secrets and templating them to a file?
✓The Vault Agent running a file template block
Correct. The Vault Agent authenticates, fetches secrets, and renders them to a file the legacy app can read.
・The Vault Secrets Operator reconciling custom resources
Incorrect. The Secrets Operator targets Kubernetes objects, not a plain file on a legacy host.
・A performance replication secondary serving local reads
Incorrect. A replication secondary copies cluster data and does not template files for apps.
・The transit secrets engine mount handling encryption
Incorrect. Transit encrypts data and does not deliver credentials to a file.
Explanation
Vault Agent's templating writes secrets to disk so applications that cannot call the API still receive credentials.
Example10 · Authentication methods
A robotics integrator asks what an auth method fundamentally does when a programmable logic controller successfully logs in to Vault. Which description states its core purpose?
✓It verifies an external identity and returns a token carrying policies
Correct. An auth method validates an external identity and issues a token whose attached policies gate access.
・It assigns a static role id that the controller can never rotate later on
Incorrect. A role id belongs only to AppRole and is not what every auth method produces on login.
・It permanently stores the controller's secrets inside the mount for reuse
Incorrect. Auth methods validate identity; secrets are held by secrets engines, not the login flow.
・It opens a direct tunnel to the storage backend for fast reads
Incorrect. Clients never reach storage directly; the barrier and API mediate every request.
Explanation
An authentication method maps a trusted external identity to an internal Vault token that carries the policies governing what the caller may do.
Example11 · Authentication methods
An automotive supplier runs its telemetry collector on virtual machines inside a cloud provider and wants each instance to log in to Vault using its signed instance identity document, with no secret stored on the host. Which auth method fits this best?
✓AWS, verifying the instance identity signed by the provider
Correct. The AWS method validates the provider-signed instance identity, so hosts log in without any stored secret.
・Userpass, with one shared password baked into the machine image
Incorrect. A shared password stored in the image is a static secret and defeats the no-secret goal.
・TLS certificates, issued manually to every single instance
Incorrect. Hand-issuing certificates per instance scales poorly and still leaves a secret on each host.
・OIDC, which bounces the caller through a browser consent page
Incorrect. The browser consent flow targets interactive people, not headless telemetry collectors.
Explanation
Cloud instance-identity methods such as AWS let hosts authenticate using a provider-signed document, removing any need to pre-place a secret on the machine.
Example12 · Authentication methods
A city permits office wants residents' portal logins to flow through the agency's existing single sign-on provider over a browser redirect. An operator has run `vault auth enable oidc`. Which follow-up command registers the provider and default role so logins resolve correctly?
・vault policy write oidc portal.hcl to bind the provider
Incorrect. Writing a policy only defines permissions; it does not tell the OIDC method where the identity provider lives.
・vault token create -role=oidc to activate the redirect
Incorrect. Creating a token by role mints a token directly and bypasses the provider configuration entirely.
・vault secrets tune auth/oidc to point at the provider
Incorrect. Tuning adjusts mount settings such as TTLs and does not register a discovery URL or default role.
✓vault write auth/oidc/config oidc_discovery_url=... default_role="portal"
Correct. Writing to auth/oidc/config supplies the discovery URL and a default role, which the OIDC method needs before any browser login can succeed.
Explanation
Enabling OIDC is only step one; the method still needs its config endpoint populated with the provider discovery URL and a default role before interactive logins work.
Example13 · Authentication methods
A tax bureau's batch reconciliation tool runs on bare-metal servers in the agency's own data center, with no cloud identity and no Kubernetes. The operators want the tool to present a role id and a periodically rotated secret id to obtain a token. Which auth method matches this on-premises machine scenario?
・AWS, which verifies a signed cloud instance identity document
Incorrect. AWS auth depends on a cloud instance identity that bare-metal data-center servers do not have.
・Kubernetes, which trusts a projected pod service account token
Incorrect. The Kubernetes method needs a cluster projecting service account tokens, which is absent here.
✓AppRole, issuing a role id with a rotatable secret id
Correct. AppRole fits headless on-premises workloads, pairing a role id with a secret id the team can rotate on a schedule.
・OIDC, which drives an interactive browser-based redirect login
Incorrect. That flow requires a human at a browser, so an unattended batch tool cannot use it.
Explanation
With no cloud or Kubernetes identity to lean on, AppRole is the standard machine method, using a role id and an independently rotatable secret id.
Example14 · Authentication methods
A video-streaming SaaS deploys its transcoder on Google Compute Engine, and the platform team wants each node to present its signed instance metadata to Vault rather than carry a baked secret. Enabling which auth method lets the node trade that cloud-signed identity for a token?
・The userpass method, keyed to one shared account
Incorrect. Userpass relies on a shared static password that must be distributed and rotated, which is what the team wants to avoid.
✓The gcp method, which trusts the instance's signed metadata document
Correct. The gcp auth method verifies the instance's cloud-signed identity, so nodes authenticate with no stored secret.
・The approle method, handing out a secret id per node
Incorrect. AppRole would still require delivering a secret id to each node, so a credential lives on the host.
・The github method, reading a personal access token
Incorrect. The github method expects a human user's access token and does not read cloud instance identity.
Explanation
Cloud auth methods such as gcp let a workload prove its identity through provider-signed metadata, removing any secret from the host.
Example15 · Authentication methods
An operator at an ad-tech platform runs `vault auth enable -path=partners oidc` and the command succeeds. What is the direct consequence of the -path flag in that invocation?
✓It mounts the oidc method at auth/partners/ instead of auth/oidc/
Correct. The -path flag changes the mount location, so logins target auth/partners/ rather than the default auth/oidc/.
・It sets the default role used for every login attempt
Incorrect. The default role is configured separately on the method, not by the mount path flag.
・It restricts the method to tokens shorter than the given path
Incorrect. The path flag has nothing to do with token length; it only names the mount point.
・It stores the identity provider's client secret at that path
Incorrect. The client secret is written later into the method's config, not implied by the enable command.
Explanation
Supplying -path at enable time relocates the method's mount, so all of its login and config paths live under that custom prefix.
▶ Try 10 free questions (graded)
Measure your readiness with a full mock exam
All questions · full explanations · lifetime access
Enroll(33 USD)