# Free Vault Associate 003 practice questions

> 10 free Vault Associate 003 practice questions with the correct answer and an explanation.

Page: https://devopscodelab.com/exams/vault-associate-003/free-practice-questions/
Practice exams: https://devopscodelab.com/exams/vault-associate-003/

### Question 1 of 10

A platform team wants CI pipelines running on build servers to authenticate to Vault without any human interaction, using a credential pair where one half can be baked into the pipeline config and the other half is delivered at runtime. Which auth method is designed for this machine-oriented workflow?

- A. Userpass
- B. AppRole
- C. GitHub personal access token login
- D. OIDC with an external identity provider

**Answer:** B

**Explanation:** AppRole is built for machines and applications: a role_id (comparable to a username) can be stored in configuration while a short-lived secret_id is delivered at runtime. Userpass is meant for humans with a static password. OIDC relies on a browser redirect to an identity provider, which suits interactive users. GitHub login maps a person's GitHub team membership to policies and is also human-oriented.

### Question 2 of 10

An administrator wants each user to have a private area at kv/data/users/<their entity ID>/ without writing one policy per user. Which policy path achieves this?

- A. path "kv/data/users/+/*" {
  capabilities = ["create", "read", "update", "delete"]
}
- B. path "kv/data/users/$${token.id}/*" {
  capabilities = ["create", "read", "update", "delete"]
}
- C. path "kv/data/users/*" {
  capabilities = ["create", "read", "update", "delete", "sudo"]
}
- D. path "kv/data/users/{{identity.entity.id}}/*" {
  capabilities = ["create", "read", "update", "delete"]
}

**Answer:** D

**Explanation:** Templated policies interpolate identity parameters such as {{identity.entity.id}} at request time, giving each entity its own path with a single policy. The + wildcard matches any user's segment, so everyone could access everyone's area. Token IDs are not a supported template parameter and would change at every login. A broad glob with sudo grants access to all users' data.

### Question 3 of 10

An operator wants every token created for a CI system to be an orphan, carry only the policy ci-deploy, and have an explicit max TTL of 2 hours, while letting the CI admin team mint those tokens without sudo. Which approach fits?

- A. A periodic token with period=2h and policy ci-deploy, shared by all CI jobs
- B. An AppRole named ci with token_policies=ci-deploy and a secret_id_ttl of 2h
- C. A sudo grant on auth/token/create-orphan for the CI admin team's policy
- D. A token role at auth/token/roles/ci with orphan=true, allowed_policies=ci-deploy and token_explicit_max_ttl=2h

**Answer:** D

**Explanation:** Token roles predefine settings such as orphan status, allowed policies and explicit max TTL, and creating tokens against a role does not require sudo for the orphan setting. A shared periodic token is not an orphan per job and can live indefinitely. An AppRole login lets machines authenticate rather than letting the CI admin team mint tokens, and the secret_id TTL does not cap the lifetime of the issued token. Granting sudo on create-orphan conflicts with the no-sudo requirement and does not enforce policies or TTL.

### Question 4 of 10

Which statement about Vault leases is correct?

- A. Each lease is attached to its auth mount instead of to the token that requested it
- B. Every static secret written to a KV version 2 engine is issued with a revocable lease
- C. A lease can be renewed past its max TTL as long as each renewal happens before the current TTL expires
- D. Every dynamic secret is issued with a lease that has an ID, a duration and a renewable flag

**Answer:** D

**Explanation:** Dynamic secrets come with lease metadata (lease_id, lease_duration, renewable), which Vault uses to track and revoke them. KV v2 data is static and carries no revocable lease. Leases are tied to the token that requested the secret, so revoking that token revokes its leases. Renewal can never extend a lease past its maximum TTL.

### Question 5 of 10

An application needs AWS credentials that are valid for a short period and are generated by Vault assuming a pre-existing IAM role. Which AWS secrets engine credential type should the role use?

- A. static_user
- B. federation_token
- C. assumed_role
- D. iam_user

**Answer:** C

**Explanation:** assumed_role makes Vault call sts:AssumeRole on the configured role ARN and return temporary credentials. iam_user creates a new IAM user with access keys for each request. federation_token returns temporary credentials for the Vault IAM user's own permissions scoped by a policy, not by assuming an existing role. Static roles manage keys of an existing user rather than assuming a role.

### Question 6 of 10

A security team requires that a newly generated secret_id passed to an application by an orchestrator is never visible to the orchestrator, and that any interception would be detectable. Which Vault feature meets this requirement?

- A. Response wrapping, with the orchestrator handling only a single-use wrapping token
- B. A batch token with a short TTL that contains the secret_id in its metadata
- C. A cubbyhole entry written by the orchestrator for the application
- D. An AppRole secret_id with secret_id_bound_cidrs set to the orchestrator's subnet range only

**Answer:** A

**Explanation:** Response wrapping places the response in the cubbyhole of a single-use wrapping token; the orchestrator only passes the wrapping token, and if someone unwraps it first the application's unwrap fails, revealing tampering. A cubbyhole is private to the token that wrote it, so the application could not read the orchestrator's entry. Token metadata is readable and not designed to carry secrets. CIDR binding limits where the secret_id is used but still exposes it to the orchestrator.

### Question 7 of 10

A team wants to encrypt large files locally but still have Vault protect the encryption key. Which transit endpoint returns a new key both in plaintext (for local use) and wrapped by a named transit key (for storage)?

- A. transit/datakey/wrapped/<key name>
- B. transit/export/encryption-key/<key name>
- C. transit/datakey/plaintext/<key name>
- D. transit/random/32

**Answer:** C

**Explanation:** The datakey/plaintext endpoint returns a fresh data key in plaintext together with its ciphertext under the named key; the plaintext is used and discarded, and the ciphertext is stored with the file. datakey/wrapped returns only the ciphertext. Exporting the transit key itself exposes the master key and requires it to be exportable. transit/random returns random bytes that are not wrapped by any key.

### Question 8 of 10

Which statement correctly describes the relationship between the unseal key, the root key and the encryption keyring?

- A. The unseal key decrypts the root key, which in turn decrypts the keyring used to encrypt data
- B. The unseal key encrypts data directly, and the root key protects only the audit log
- C. The keyring decrypts the root key, which is then split into shares for unsealing
- D. The root key decrypts the unseal key, which in turn decrypts the keyring and data

**Answer:** A

**Explanation:** Vault's data is encrypted with keys in the keyring, the keyring is protected by the root key, and the root key is protected by the unseal key (split with Shamir or held by an auto-unseal device). The unseal key never encrypts data directly. The hierarchy does not run the other way around, and the keyring does not protect the root key.

### Question 9 of 10

A company runs Vault Enterprise and needs a warm standby cluster in another region that has a full copy of data, including tokens and leases, and that can be promoted if the primary region is lost. Which feature should be used?

- A. Disaster recovery replication
- B. Performance replication
- C. A second independent cluster restored from nightly snapshots
- D. Integrated Storage autopilot with redundancy zones

**Answer:** A

**Explanation:** DR replication copies everything, including tokens and leases, to a secondary that does not serve clients until promoted, so applications keep their tokens after failover. Performance secondaries do not replicate tokens and leases. Redundancy zones improve resilience within one cluster. Nightly snapshots lose up to a day of changes and are not a warm standby.

### Question 10 of 10

A Vault Agent should authenticate with AppRole and write the resulting token to a file that the application reads. Which configuration block provides this?

- A. cache {
  use_auto_auth_token = true
  sink_path           = "/run/app/token"
}
- B. auto_auth {
  method "approle" {
    config = {
      role_id_file_path   = "/etc/vault/role-id"
      secret_id_file_path = "/etc/vault/secret-id"
    }
  }
  sink "file" {
    config = { path = "/run/app/token" }
  }
}
- C. template {
  source      = "/etc/vault/role-id"
  destination = "/run/app/token"
}
- D. listener "tcp" {
  address     = "127.0.0.1:8100"
  tls_disable = true
  token_file  = "/run/app/token"
}

**Answer:** B

**Explanation:** auto_auth contains the method (here AppRole with role_id and secret_id files) and one or more sinks, and a file sink writes the token to the given path. A template renders secret content, not the Agent's token. The cache stanza controls caching and has no sink_path. A listener exposes a local API endpoint and does not write tokens to files.

Ready for a timed run? Take the free 15-question Vault Associate 003 mini exam: https://devopscodelab.com/app/exams/vault-associate-003/mini/

DevOpsCode Lab is not affiliated with HashiCorp. Vault Associate 003 and related names are trademarks of their owners. We write every question ourselves; these are not real exam questions.
