HashiCorp Vault Associate (003) exam dumps

HashiCorp Vault Associate (003) practice question 51 of 243

Vault Associate (003). Associate level, HashiCorp. Free question with the correct answer and a full explanation.

HashiCorp Vault Associate (003) Question 51

Single answer2c Describe Vault policy syntax: capabilities

A security team wants an application token to read database credentials generated by the database secrets engine at the path database/creds/readonly, but they do not want the token to be able to create, update, or delete anything else. A teammate proposes the following policy stanza:

path "database/creds/readonly" { capabilities = ["read"] }

When the application uses this token to fetch credentials, the request succeeds. Later, another engineer suggests replacing read with list because the application is only "retrieving information." Which statement best describes the correct use of Vault policy capabilities in this scenario?

  1. A

    Keep read, because fetching generated credentials from an exact path requires the read capability; list is for listing keys at a path, not retrieving the secret value.

  2. B

    Replace read with list, because all GET requests in Vault require only the list capability.

  3. C

    Use both create and update, because dynamic secrets are generated on demand and therefore require write access to the endpoint.

  4. D

    Add sudo, because reading from secrets engines that generate credentials requires elevated privileges even when the path is explicitly allowed.

Show answer and explanation

Correct answer: A

Explanation

Vault policies use capabilities such as create, read, update, delete, list, patch, and sudo to control what operations a token can perform on a path. In this scenario, the application needs to retrieve credentials from a specific secrets engine endpoint, so read is the appropriate capability. list is often misunderstood: it allows enumeration of keys or paths where supported, but it does not permit reading the underlying secret contents. Following least-privilege best practice, the policy should grant only read on database/creds/readonly and no broader write or administrative capabilities. This aligns with Vault ACL policy documentation and the documented meaning of capabilities in policy syntax.

  • A. Correct.

    Correct. In Vault ACL policies, read allows reading data from a path, which is what the application is doing when it requests credentials from database/creds/readonly. The list capability is used for listing entries, typically on paths that support listing, and does not grant permission to read the actual secret data. This is a common distinction in Vault policy syntax.

  • B. Incorrect.

    Incorrect. list does not mean "retrieve any information." In Vault, list is specifically for listing available keys or child paths where the endpoint supports that operation. A client that needs the actual credentials from database/creds/readonly needs read, not just list.

  • C. Incorrect.

    Incorrect. Although the database secrets engine generates credentials dynamically, the client operation against database/creds/readonly is still a read-style action from the policy perspective. The application is not configuring the engine or changing roles, so create and update are unnecessary and would grant more access than required.

  • D. Incorrect.

    Incorrect. sudo is only required for specific privileged operations on certain system paths and administrative endpoints. Reading generated credentials from an allowed database secrets path does not require sudo. Adding it would violate least-privilege principles.

Timed practice exam

Take a HashiCorp Vault Associate (003) practice test under exam conditions

70 questions in 60 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam