HCVA0-003 practice question 1 of 35

Which two characters can be used when writing a policy to reflect a wildcard or path segment? (Select two)

Full set: 285 questions
Answer options
A: The ampersand &
B: The at symbol @
C: The splat character * Correct answer
D: A dollar sign $
E: The pound symbol #
F: The plus symbol + Correct answer
Correct Answer:
C. The splat character *; F. The plus symbol +
Explanation

In Hahicorp (HashiCorp) Vault policies, specific characters are used for wildcarding in path definitions. The plus symbol + acts as a wildcard that matches any value for a single path segment. For example, a policy for secret/+/data would match secret/user1/data and secret/team-alpha/data, but not secret/data. The splat or glob character is a wildcard that can be used at the end of a path to match any suffix. For instance, secret/data/ would match both secret/data/app1 and secret/data/app1/config. These characters provide flexibility in defining broad permissions without creating individual policies for every path.

Why Incorrect

A. The ampersand & is not a recognized wildcard or special character within Hahicorp Vault policy path syntax.
B. The at symbol @ has no special meaning for path matching in Hahicorp Vault policies.
D. A dollar sign $ is not used as a wildcard character in Hahicorp Vault policy path definitions.
E. The pound symbol # is used to denote comments within HCL (HashiCorp Configuration Language), not for path matching.

References

1. HashiCorp Vault Official Documentation, "Policies": Under the "Policy Syntax" section, the subsection on "Paths" explicitly details the usage of wildcard characters. It states, "The + character can be used to allow any character in a single path segment" and "The glob character () can be used as a wildcard... The glob character is only allowed at the end of the path." This document is the primary source for Hahicorp HCVA0 003 exam content.

Source: HashiCorp Vault Documentation

Section: Security -> Policies -> Policy Syntax -> Paths

URL: https://developer.hashicorp.com/vault/docs/concepts/policies#paths (Accessed content describes the function of + and in path definitions).

Scroll to Top