Sign in
Home/HashiCorp/Vault Associate 002/Free questions

Vault Associate 002 — Free Practice Questions

10 free sample questions from a bank of 92, with the correct answers and explanations. No signup required — start practising right now.

1To give a role the ability to display or output all of the end points under the /secrets/apps/* end point it would need to have which capability set?
  • update
  • read
  • sudo
  • list
  • None of the above
Answer: D

The short version

D — list capability enables browsing endpoints under a path. Reading keys vs listing paths differ.

Key concepts in this question

  • list capability: permits LIST to enumerate keys under a path.
  • read capability: permits GET of the secret value itself.

Why D is correct

To display or output all endpoints/keys under /secrets/apps/*, the policy needs list on that prefix. Without list, a token may read a known key but cannot enumerate the directory. That is why Vault policies separate read and list.

Why the others are wrong

  • A. update allows modifying values, not enumerating keys.
  • B. read allows fetching a known secret value, not listing siblings.
  • C. sudo allows root-protected paths, not listing; it is an extra flag, not enumeration.
  • E. Incorrect because D already provides the needed capability.

Vault-Associate-002 exam tip

See all keys under a path → think list, not read.

2What command creates a secret with the key "my-password" and the value "53cr3t" at path "my-secrets" within the KV secrets engine mounted at "secret"?
  • vault kv put secret/my-secrets/my-password 53cr3t
  • vault kv write secret/my-secrets/my-password 53cr3t
  • vault kv write 53cr3t my-secrets/my-password
  • vault kv put secret/my-secrets my-password-53cr3t
Answer: D

The short version

D — vault kv put with path plus key=value is the KV write form. Only D uses the mount-plus-path with a key pair.

Key concepts in this question

  • KV v2 put: vault kv put <mount>/<path> key=value writes a secret version.
  • Path vs key: path is the secret name, trailing key=value pairs are the data.

Why D is correct

D is the only option with the correct shape: vault kv put secret/my-secrets my-password=53cr3t. It targets the secret mount, path my-secrets, and sets key my-password. The pack text shows a dash typo, but intent is clearly = and no other option is structurally valid.

Why the others are wrong

  • A. Appends the key to the path and passes a bare value with no key=; KV requires key=value pairs.
  • B. Same path error as A, and kv write is the generic low-level form, not the KV put form expected here.
  • C. Arguments are reversed and lack mount/path and key=value syntax, so it cannot create this secret.

Vault-Associate-002 exam tip

Remember: put <mount>/<name> key=value — key goes after the path, never inside it.

3What can be used to limit the scope of a credential breach?
  • Storage of secrets in a distributed ledger
  • Enable audit logging
  • Use of a short-lived dynamic secrets
  • Sharing credentials between applications
Answer: C

The short version

C — short-lived dynamic secrets limit breach blast radius. They expire automatically so stolen creds quickly die.

Key concepts in this question

  • Dynamic secrets: just-in-time credentials generated on request with a lease/TTL.
  • Breach scope: short TTL plus revocation shrinks the window for reuse.

Why C is correct

Short-lived dynamic credentials mean each app gets unique, expiring credentials rather than a shared long-lived password. If one leaks, it expires or can be revoked via its lease, so lateral movement is limited. That is exactly the breach-scope control the question asks for.

Why the others are wrong

  • A. A distributed ledger is not a Vault breach-containment mechanism and does not expire credentials.
  • B. Audit logging helps detection and forensics but does not itself limit scope or expire the credential.
  • D. Sharing credentials between apps widens blast radius, the opposite of the correct practice.

Vault-Associate-002 exam tip

If you see breach scope or rotation pain, pick dynamic / short-lived secrets.

4What environment variable overrides the CLI’s default Vault server address?
  • VAULT_ADDR
  • VAULT_HTTP_ADDRESS
  • VAULT_ADDRESS
  • VAULT_HTTPS_ADDRESS
Answer: A

The short version

A — VAULT_ADDR overrides the CLI server address. It is the canonical env var.

Key concepts in this question

  • VAULT_ADDR: env var for Vault server URL, e.g. https://127.0.0.1:8200.
  • CLI precedence: -address flag beats VAULT_ADDR, which beats default http://127.0.0.1:8200.

Why A is correct

Vault CLI and API clients read VAULT_ADDR to determine which server to contact. Setting it overrides the compiled-in default without editing config or passing flags. The other names are not recognized by Vault.

Why the others are wrong

  • B. VAULT_HTTP_ADDRESS is not a Vault-recognized variable.
  • C. VAULT_ADDRESS is not a Vault-recognized variable; the singular documented name is VAULT_ADDR.
  • D. VAULT_HTTPS_ADDRESS is not a Vault-recognized variable.

Vault-Associate-002 exam tip

Memorize VAULT_ADDR and VAULT_TOKEN — the two CLI workhorses.

5Which of the following statements describe the CLI command below? $ vault login -method=ldap username=mitchellh
  • Generates a token which is response wrapped
  • You will be prompted to enter the password
  • By default, the generated token is valid for 24 hours
  • Fails because the password is not provided
Answer: B

The short version

B — That LDAP login will prompt for the password. Username is given, password is interactive.

Key concepts in this question

  • vault login -method=ldap: LDAP auth method login with username attribute.
  • Password prompt: when password is omitted, CLI interactively prompts.
  • No wrapping / fixed TTL: response-wrapping and 24h default are not implied.

Why B is correct

The command supplies username=mitchellh but no password, so Vault prompts for the LDAP password, as documented in LDAP auth. Vendor prose selects B and cites the LDAP authentication docs. It does not fail, does not wrap by default, and does not guarantee 24h TTL.

Why the others are wrong

  • A. Wrong because no -wrap-ttl or wrapping flag is present, so no response wrapping.
  • C. Wrong because TTL comes from mount / role tuning, not a fixed 24h default.
  • D. Wrong because omission triggers a prompt; it does not fail.

Vault-Associate-002 exam tip

LDAP login missing password equals prompt — not fail.

6The following three policies exist in Vault What do these policies allow an organization to do? app.hcl callcenter.hcl rewrap.hcl
Vault Associate 002 question 6Vault Associate 002 question 6Vault Associate 002 question 6
  • Separates permissions allowed on actions associated with the transit secret engine
  • Nothing, as the minimum permissions to perform useful tasks are not present
  • Encrypt decrypt, and rewrap data using the transit engine all in one policy
  • Create a transit encryption key for encrypting, decrypting, and rewrapping encrypted data
Answer: A

The short version

A — The three policies split transit actions. Separate files isolate encrypt, decrypt, and rewrap rights.

Key concepts in this question

  • Transit capabilities: encrypt, decrypt, rewrap, and key management are distinct paths.
  • Least privilege: app, callcenter, and rewrap suggest scoped roles for different actors.
  • Settled key: flagged and settled answer is A, which stands over conflicting prose.

Why A is correct

A states the set separates permissions allowed on transit actions, matching the three-file naming of app, callcenter, and rewrap. The settled and flagged decision is A, so per key-decisions-stand A is retained. C/D claiming single-policy or key-creation over-read the split.

Why the others are wrong

  • B. Wrong because the policies do grant useful transit capabilities; they are not empty.
  • C. Wrong because the point is separation across files, not one policy doing all three.
  • D. Wrong because creating keys is a different capability from using encrypt/decrypt/rewrap.

Vault-Associate-002 exam tip

Three transit policy names equals split duties — pick separates permissions.

7Your DevOps team would like to provision VMs in GCP via a CICD pipeline. They would like to integrate Vault to protect the credentials used by the tool. Which secrets engine would you recommend?
  • Google Cloud Secrets Engine
  • Identity secrets engine
  • Key/Value secrets engine version 2
  • SSH secrets engine
Answer: A

The short version

A — GCP secrets engine issues dynamic GCP credentials for pipelines. It fits VM provisioning in GCP.

Key concepts in this question

  • GCP secrets engine: generates service-account keys / access tokens on demand.
  • Dynamic cloud creds: no static keys in CI/CD; Vault mints and revokes them.

Why A is correct

For provisioning GCP VMs from CI/CD, the GCP secrets engine can mint short-lived service-account or OAuth credentials scoped to the needed roles. That avoids storing long-lived GCP keys in the pipeline. It is purpose-built for this GCP use case.

Why the others are wrong

  • B. There is no Vault identity secrets engine for issuing cloud credentials; identity manages entities/groups.
  • C. KV v2 stores static secrets only; it cannot mint GCP credentials or rotate them automatically.
  • D. SSH engine handles SSH OTPs/dynamic SSH keys, not GCP API/VM provisioning credentials.

Vault-Associate-002 exam tip

Cloud creds needed → cloud-specific engine (AWS/GCP/Azure), not KV.

8Which of these is not a benefit of dynamic secrets?
  • Supports systems which do not natively provide a method of expiring credentials
  • Minimizes damage of credentials leaking
  • Ensures that administrators can see every password used
  • Replaces cumbersome password rotation tools and practices
Answer: C

The short version

C — admin visibility into every password is not a dynamic-secrets benefit. Dynamic secrets reduce exposure, not increase snooping.

Key concepts in this question

  • Dynamic secrets benefits: auto-expiry, unique creds, no rotation scripts, smaller leak impact.
  • NOT benefit: Vault does not promise admins can see plaintext passwords.

Why C is correct

Dynamic secrets improve security precisely because passwords are ephemeral, unique, and automatically revoked. Claiming admins can see every password contradicts least privilege and is not listed in Vault docs as a benefit. Therefore C is the NOT-benefit exception.

Why the others are wrong

  • A. True benefit: Vault can add expiry/rotation even for systems lacking native expiry.
  • B. True benefit: short TTL and revocation minimize damage if a credential leaks.
  • D. True benefit: on-demand generation replaces manual rotation tools and practices.

Vault-Associate-002 exam tip

NOT questions: three are real benefits, one is odd — pick the odd one.

9Which of the following cannot define the maximum time-to-live (TTL) for a token?
  • By the authentication method
  • By the client system
  • By the mount endpoint configuration
  • A parent token TTL
  • System max TTL
Answer: B

The short version

B — The client system cannot set max TTL. TTL is server-side config, not client choice.

Key concepts in this question

  • Max TTL sources: system max, mount tune, auth method tune, and parent token limits.
  • Client cannot dictate: callers request TTL within limits but cannot define the max.
  • Mount and auth tuning: both can cap TTLs for tokens issued there.

Why B is correct

Maximum TTL is enforced by server configuration — system max, mount endpoint tune, auth method tune, and parent TTL. The client system only requests; it cannot define the ceiling. Vendor prose selects B and notes A, C, D, and E all can define TTL.

Why the others are wrong

  • A. Wrong to pick because auth methods can set max TTL via tune / role config.
  • C. Wrong to pick because mount endpoint tune can cap TTL.
  • D. Wrong to pick because parent token TTL bounds children.
  • E. Wrong to pick because system max TTL globally caps tokens.

Vault-Associate-002 exam tip

Max TTL equals server says — client never sets the ceiling.

10What are orphan tokens?
  • Orphan tokens are tokens with a use limit so you can set the number of uses when you create them
  • Orphan tokens are not children of their parent; therefore, orphan tokens do not expire when their parent does
  • Orphan tokens are tokens with no policies attached
  • Orphan tokens do not expire when their own max TTL is reached
Answer: B

The short version

B — orphan tokens survive parent expiry because they have no parent. They break the revocation tree.

Key concepts in this question

  • Token hierarchy: normal children die when the parent is revoked/expires.
  • Orphan: created with orphan=true or by root/sudo; no parent linkage.

Why B is correct

An orphan token is detached from its creator, so revoking or expiring the parent does not cascade to it. It still has its own TTL/max TTL and policies, but parent lifecycle does not kill it. That matches B exactly.

Why the others are wrong

  • A. Use limit describes use_limit / limited-use tokens, not orphans.
  • C. Orphans still have policies; lack of parent is not lack of policies.
  • D. Orphans still expire on their own TTL/max TTL; they only ignore parent expiry.

Vault-Associate-002 exam tip

Orphan = no parent, so parent death does not kill it.

Want the full bank of 92 questions for Vault Associate 002? See all practice exams.