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 questions
Answer options
A: True Correct answer
B: False
Correct Answer:
F; A. True; L; S; E
Explanation

The 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.

Why Incorrect

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.

References

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

Scroll to Top