Courseiva
Create Vault policieshardMultiple ChoiceObjective-mapped

VA-003 Create Vault policies Practice Question

A Vault administrator is designing a policy for a CI/CD pipeline that must be able to read dynamic database credentials from "database/creds/my-role" and also write to "secret/data/ci-cd" for storing build artifacts. The policy should follow the principle of least privilege. Which policy statements should be used?

⚠ Common exam trap

The exam often tests distinguishing between valid capabilities (e.g., 'create' and 'update') and invalid ones (e.g., 'write'), as well as the correct use of exact paths versus wildcards. Candidates may mistakenly include 'delete' or use a wildcard, leading to over-permissioning or incorrect syntax.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

path "database/creds/my-role" { capabilities = ["read"] }; path "secret/data/ci-cd" { capabilities = ["create", "update"] }

It grants the minimum required capabilities: 'read' for reading dynamic database credentials from 'database/creds/my-role', and 'create' and 'update' for writing to 'secret/data/ci-cd'. The principle of least privilege dictates that 'delete' is unnecessary for storing build artifacts, and the path must be exact without a wildcard to avoid granting unintended access to sub-paths.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • path "database/creds/my-role" { capabilities = ["read"] }; path "secret/data/ci-cd" { capabilities = ["create", "update", "delete"] }

    Why it's wrong here

    Delete capability is not required for writing build artifacts, violating least privilege.

  • path "database/creds/my-role" { capabilities = ["read"] }; path "secret/data/ci-cd" { capabilities = ["create", "update"] }

    Why this is correct

    This grants read to credentials and create/update to the specific secret path, following least privilege.

  • path "database/creds/my-role" { capabilities = ["read"] }; path "secret/data/ci-cd/*" { capabilities = ["create", "update"] }

    Why it's wrong here

    The glob * would also write to any subpath, which is broader than necessary.

  • path "database/creds/my-role" { capabilities = ["read"] }; path "secret/data/ci-cd" { capabilities = ["write"] }

    Why it's wrong here

    'write' is not a valid Vault capability; use create and update instead.

About these practice questions

One of 498 original VA-003 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This VA-003 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the VA-003 exam.