HCVA0-003 practice question 20 of 35
True or False? The following policy permits a user to read secrets contained in the path secrets/cloud/apps/jenkins? text CollapseWrapCopy path "secrets/cloud/apps/jenkins/*" { capabilities = ["create", "read", "update", "delete", "list"] }
Full set: 285 questionsThe policy path "secrets/cloud/apps/jenkins/" uses a glob wildcard () at the end of the path definition. According to HashiCorp Vault's policy syntax, this wildcard matches any suffix appended to the path, but it does not match the path prefix itself. Therefore, this policy grants the specified capabilities (create, read, update, delete, list) to child paths such as secrets/cloud/apps/jenkins/api-key or secrets/cloud/apps/jenkins/db-password. However, it does not grant any capabilities on the exact path secrets/cloud/apps/jenkins. If a secret were stored at the path secrets/cloud/apps/jenkins, a user with only this policy would be denied access when attempting to read it. Because the policy does not permit reading all secrets that could be contained within or at this logical path, the statement is false.
The "True" option is incorrect because it misinterprets the scope of the wildcard. While the policy does allow reading secrets that are children of the specified path, it fails to grant permission for a secret located at the path prefix itself. In technical examinations, such precision is critical. A policy that grants partial access does not make the general statement "permits a user to read secrets contained in the path" fully true, as it excludes a valid location within that path.
1. HashiCorp. (n.d.). Policies. Vault Documentation.
Location: Section: "Paths"
Content: The official documentation states, "The glob character () can be used at the end of a path to match any suffix. For example, a policy with path "secret/foo/" will match secret/foo/bar and secret/foo/baz/zip, but not secret/foo." This directly confirms that the policy in the question does not apply to the .../jenkins path itself, only to its children.
URL: https://developer.hashicorp.com/vault/docs/concepts/policies#paths
2. HashiCorp. (n.d.). Secure Introduction to Vault: Vault Policies. HashiCorp Learn.
Location: Step 3: "Write a policy"
Content: The tutorials on writing policies consistently demonstrate that different path patterns are required for different operations. For instance, granting the list capability is often done on the "folder" path (e.g., path "secret/data/my-app/"), while read/write operations are granted on the children using a wildcard (e.g., path "secret/data/my-app/"). This reinforces the concept that .../ and .../ are distinct paths with different purposes and permissions.
URL: https://developer.hashicorp.com/vault/tutorials/getting-started/policies
Keep practicing
Take the free HCVA0-003 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other HCVA0-003 practice questions
- Question 1Which two characters can be used when writing a policy to reflect a wildcard or path segm…
- Question 2You have multiple Vault clusters in your environment, one for test and one for production…
- Question 3Short-lived, dynamically generated secrets provide organizations with many benefits. Sele…
- Question 4When Vault is sealed, which are the only two operations available to a Vault administrato…
- Question 6What is the default method of authentication after first initializing Vault?
- Question 7Which two interfaces automatically assume the token for subsequent requests after success…
