Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free HashiCorp Certified: Vault Associate (002) Vault-Associate Exam Questions

Last updated: · 14 practice questions with answers and explanations

Page: 1 / 6 Total 57 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: 1 Compare authentication methods

Skill tested: Selects an authentication method suited to noninteractive workloads and machine identity.

A deployment platform runs short-lived jobs in a cloud environment. Each job must authenticate to Vault without a human entering credentials, and the platform can provide a signed identity document that Vault can validate against the cloud provider. Operators want to avoid distributing long-lived Vault tokens or maintaining a separate username and password for every job. Which authentication approach is the best fit?

Correct Answer: C. Use the cloud authentication method and bind roles to validated workload identity attributes.
Explanation:

A cloud authentication method can validate a workload's provider-issued identity and issue a Vault token according to role bindings, avoiding a separately distributed static Vault credential. This suits noninteractive machine authentication. Userpass and LDAP are generally tied to user credentials and require managing accounts or passwords for workloads. Token authentication accepts an existing Vault token; sharing a long-lived token would undermine the stated goal and increase exposure.

Question 2

New Single answer

Topic: 2 Create Vault policies

Skill tested: Writes least-privilege path and capability rules for a KV v2 secret consumer.

A finance application reads one KV version 2 secret at `kv/data/payments/prod`. It must not list sibling secrets, write data, or access other paths. A policy administrator is preparing an ACL policy, and the KV v2 engine is mounted at `kv/`. Which stanza grants the required access while preserving least privilege?

Correct Answer: D. `path "kv/data/payments/prod" { capabilities = ["read"] }`
Explanation:

For KV v2, data operations use the `/data/` API path, so the policy must target `kv/data/payments/prod`. The `read` capability allows the application to retrieve the secret without granting writes or listing. The path in A omits the KV v2 data segment. B adds an unnecessary list capability, while D grants read access across the mount rather than restricting access to the single required secret.

Question 3

New Multiple answers

Topic: 3 Assess Vault tokens

Skill tested: Chooses token type and lifetime settings appropriate for a renewable workload credential.

A continuously running internal service authenticates through an enabled application authentication method and needs a renewable Vault credential for routine secret access. The service must not hold a root token, and operators want the credential to remain renewable while the service is healthy but be bounded by an administrative maximum lifetime. Select TWO appropriate token-design choices.

Correct Answer: C. Issue a service token with a renewable TTL and configure a maximum TTL appropriate to the service lifecycle.; E. Use the authentication method's token role and policies to constrain the issued service token.
Explanation:

Service tokens support renewal, making them appropriate for a continuously operating workload that must retain access while periodically renewing within configured lifetime limits. Authentication method token roles can constrain token policies, TTLs, and related issuance behavior. Batch tokens are lightweight, nonrenewable tokens and are a poor fit for this renewable service requirement. A zero TTL does not provide the intended bounded lifecycle, and a root token must not be embedded in an application.

Question 4

New Single answer

Topic: 4 Manage Vault leases

Skill tested: Renews a leased credential before expiration using its lease identifier.

An application obtains a dynamic database credential from Vault. The response includes a lease ID and a renewable lease with time remaining. The application has confirmed that its token is still valid, and the database credential is in active use. It must keep the existing credential rather than request another one, and it should avoid interruption when the lease expires. What should the application do next?

Correct Answer: D. Call the lease renewal endpoint with the lease ID before the lease expires.
Explanation:

A renewable lease is extended by submitting its lease ID to Vault's lease renewal operation before expiration, subject to the credential's and token's applicable limits. Revoking the lease would invalidate the credential rather than preserve it. Renewing a token does not automatically renew all leases associated with that token. Requesting another credential generally creates a separate issuance; it does not guarantee that the existing lease is extended.

Question 5

New Multiple answers

Topic: 5 Compare and configure Vault secrets engines

Skill tested: Distinguishes dynamic credential generation from static secret storage for application needs.

A company is onboarding two systems to Vault. A reporting service needs database credentials that Vault can generate with limited privileges and revoke after use. A legacy appliance instead requires a fixed API key that the company already owns and must store and retrieve without Vault generating or rotating it. The team wants to select appropriate engines without changing either system's credential behavior. Which TWO choices meet these requirements?

Correct Answer: B. Use a KV secrets engine to store the appliance's existing API key as a static secret.; D. Use a database secrets engine configured to generate and manage leased database credentials for the reporting service.
Explanation:

A database secrets engine can create dynamic database credentials through configured database roles and issue them with leases, allowing revocation and lifecycle management. KV is designed to store and retrieve static key-value secrets, which matches the appliance's existing API key. KV does not itself generate database credentials, and transit provides cryptographic operations rather than ordinary plaintext secret storage. A database engine requires a database configuration and is not a generic store for an appliance key.

Question 6

New Single answer

Topic: 6 Utilize Vault CLI

Skill tested: Configures the Vault CLI address and token environment variables for authenticated requests.

An operator uses the Vault CLI from a secured administrative workstation. The Vault server is reachable at `https://vault.example.net:8200`, and the operator has already obtained a non-root token with the required policy. They want CLI commands in the current shell to contact that server and authenticate with that token, without adding either value to command history. Which approach is appropriate?

Correct Answer: D. Set `VAULT_ADDR` to the HTTPS server URL and `VAULT_TOKEN` to the token in the shell environment.
Explanation:

The Vault CLI uses `VAULT_ADDR` to locate the server and `VAULT_TOKEN` as the current authentication token. Setting them in the shell environment avoids embedding values in each command line, though the token should still be handled carefully because environment variables can be exposed to processes or diagnostics. `VAULT_NAMESPACE` selects a namespace where applicable, not a server URL. Unseal is a separate operational action, and swapping the address and token values cannot authenticate successfully.

Question 7

New Single answer

Topic: 7 Utilize Vault UI

Skill tested: Uses the UI to enable a secrets engine at a selected mount path with appropriate access.

A Vault administrator is configuring a new isolated project through the web UI. The project needs a KV version 2 mount at `team-a/` for application secrets. The administrator has a token authorized to manage the relevant mount and wants to avoid modifying the existing `secret/` engine or overwriting another team's mount. Which UI action is the most appropriate?

Correct Answer: B. Use the UI's secrets-engine enable workflow, select KV, choose version 2, and set the mount path to `team-a/`.
Explanation:

Enabling an engine is a mount-management operation. The UI workflow allows the administrator to select KV, specify version 2, and mount it at the distinct `team-a/` path, provided the token has the required capabilities. Renaming or altering the existing mount risks affecting current users and does not meet the isolation requirement. Policies grant access but do not create engines, and writing a secret does not automatically enable an absent mount.

Question 8

New Multiple answers

Topic: 8 Be aware of the Vault API

Skill tested: Authenticates API requests with a Vault token and reads KV v2 data through its API path.

A monitoring integration must fetch one KV version 2 secret using `curl`. Vault is available over HTTPS at `https://vault.example.net:8200`, the engine is mounted at `kv/`, and the integration has a Vault token authorized to read the secret at `apps/monitoring`. The integration must use the KV v2 data endpoint and must not place the token in the URL. Which TWO request details are correct?

Correct Answer: D. Request `GET /v1/kv/data/apps/monitoring`.; E. Send the token in the `X-Vault-Token` request header.
Explanation:

Vault API clients authenticate by sending the Vault token in the `X-Vault-Token` header, rather than exposing it in the URL. For KV v2, reading a secret value uses the `/v1//data/` endpoint, which here is `/v1/kv/data/apps/monitoring`. The plain mount-relative path in C omits the versioned data route. The metadata endpoint in E returns metadata operations and does not retrieve the secret's value.

Question 9

New Multiple answers

Topic: 9 Explain Vault architecture

Skill tested: Explains auto-unseal, storage encryption, and the role of unseal mechanisms in Vault startup.

A company operates a Vault cluster using integrated storage and an auto-unseal mechanism backed by a supported key management service. After a maintenance restart, an engineer assumes that Vault's stored data is plaintext because operators no longer enter Shamir key shares. The security team wants a correct explanation for an audit and needs to distinguish the storage encryption key from the mechanism that releases it. Which TWO statements are accurate?

Correct Answer: B. Vault encrypts stored secret data, and auto-unseal helps Vault access the key material needed to become active after startup.; C. With auto-unseal configured, Shamir key shares are not manually entered for routine unsealing, but Vault still uses encryption for stored data.
Explanation:

Vault encrypts data before it is written to its storage backend. Auto-unseal delegates the process of making the necessary key material available to a configured external mechanism, removing the need for operators to submit Shamir shares during routine startup; it does not disable encryption. Integrated storage remains a storage backend and does not remove encryption at rest. The key management service supports unsealing rather than replacing the configured Vault storage backend with a repository for all secrets.

Question 10

New Single answer

Topic: 9 Explain Vault architecture

Skill tested: Identifies response wrapping as a secure, time-limited mechanism for transferring a secret response.

A provisioning service creates a one-time bootstrap credential for a separate deployment controller. The controller cannot receive the credential through the provisioning service's normal data channel, so the team wants to pass a short-lived reference that the controller can redeem once. They also want an operator to verify the response's provenance before the controller uses it. Which Vault capability best fits this handoff?

Correct Answer: D. Use response wrapping to return a short-lived wrapping token that the controller unwraps to obtain the response.
Explanation:

Response wrapping places a response inside a short-lived wrapping token. The recipient can unwrap it to obtain the underlying response, while the wrapping token provides a constrained handoff mechanism and can be checked for wrapping metadata before use. A permanent service token in logs exposes credentials and does not provide one-time delivery. KV version numbers are not wrapping tokens, and replication addresses cluster data distribution rather than secure transfer of a particular response.

Question 11

New Single answer

Topic: 10 Explain encryption as a service

Skill tested: Uses transit encryption and decryption endpoints with Base64-encoded plaintext input.

A payment service must encrypt selected application data before storing it in a separate database. The application should send plaintext to Vault for encryption and later submit the ciphertext to Vault for decryption; Vault must not store the application's data as a KV secret. The transit engine is enabled at `transit/`, and the encryption key is named `payments`. Which implementation matches this design?

Correct Answer: A. Call the transit encrypt endpoint for `payments` with Base64-encoded plaintext, then call the transit decrypt endpoint with the returned ciphertext.
Explanation:

Transit provides encryption-as-a-service: the application sends Base64-encoded plaintext to the key's encrypt endpoint and receives ciphertext, then submits that ciphertext to the decrypt endpoint when needed. The data remains with the application rather than being stored by transit as an ordinary secret. Writing to transit as if it were KV is incorrect, and rotation changes key material rather than encrypting application data or exposing plaintext from key configuration.

Question 12

New Single answer

Topic: 10 Explain encryption as a service

Skill tested: Rotates a transit key while preserving the ability to decrypt previously encrypted ciphertext.

A compliance review requires periodic rotation of the transit key used by an application. The application stores ciphertext produced over several months and must continue decrypting all existing records after rotation. New encryption operations should use the newest key version. The team does not want to re-encrypt every record as part of the rotation event. What should the Vault administrator do?

Correct Answer: B. Rotate the transit key; Vault uses the current key version for new encryption and retains prior versions for decryption.
Explanation:

Rotating a transit key creates a new key version. Encryption uses the latest version, while prior key versions remain available to decrypt ciphertext produced before rotation, so immediate re-encryption is not required. Deleting and recreating the key can make old ciphertext undecryptable. Disabling decryption conflicts with the requirement to read existing records, and manually exporting key material and rewriting all ciphertext is unnecessary for standard key rotation.

Question 13

New Single answer

Topic: 1 Compare authentication methods

Skill tested: Selects an identity-based login method for human operators with centralized account lifecycle management.

A company has human operators who already authenticate to a centralized LDAP directory. Vault access must follow their directory identities, and the security team wants to avoid issuing each operator a separate long-lived Vault password. Access should be controlled by Vault role mappings associated with directory groups. Which authentication method best meets the requirement?

Correct Answer: B. Use the LDAP auth method and map directory groups to Vault policies through roles.
Explanation:

LDAP authentication lets human users authenticate with their directory credentials and supports mapping directory groups to Vault policies through configured roles and group aliases. This aligns Vault access with centralized account lifecycle management. AppRole is primarily intended for machine authentication and distributing SecretIDs to humans adds unnecessary credential handling. Shared tokens undermine individual accountability, while Kubernetes authentication is based on workload identity rather than directory users.

Question 14

New Single answer

Topic: 2 Create Vault policies

Skill tested: Applies policy path matching and capability boundaries to permit narrowly scoped secret creation.

A build service must create or update secrets only beneath `kv/data/builds/` in a KV v2 mount called `kv/`. It must not read existing values, delete secrets, or access metadata endpoints. The policy should cover any secret path below that prefix while avoiding permissions on other projects. Which policy rule is the best match?

Correct Answer: B. `path "kv/data/builds/*" { capabilities = ["create", "update"] }`
Explanation:

The KV v2 data API uses `kv/data/`, and the wildcard after `builds/` scopes the create and update capabilities to secrets beneath the requested project prefix. It does not grant read, delete, or metadata access. The broad rule in B reaches other projects and grants excess capabilities. C targets metadata rather than secret data. D omits the wildcard and adds read access, so it fails the stated scope and least-privilege requirements.