Courseiva
easyMultiple Choice

CV0-004 Practice Question: Is the best practice for securely storing secrets…

Which of the following is the best practice for securely storing secrets such as database passwords in a cloud environment?

⚠ Common exam trap

CV0-004 often tests the misconception that encrypting secrets in shared storage is sufficient, but the exam expects recognition that centralized secrets management with access control and rotation is the true best practice.

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

✓

Use a dedicated secrets management service.

A dedicated secrets management service (e.g., Azure Key Vault, AWS Secrets Manager, HashiCorp Vault) is the best practice because it centralizes secret storage, enforces access control, provides audit logging, and supports automatic rotation. Applications retrieve secrets at runtime via managed identities or short-lived tokens, so secrets never persist in code or repositories. This minimizes the blast radius if a repository or configuration file is compromised.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Hard-code the secrets in the application code.

    Why it's wrong here

    Hard-coding credentials embeds them in source control and container images, where they leak through repositories and logs. It is tempting for quick prototypes or local testing, but production secrets belong in a managed vault or secret manager with rotation and audit, not application code.

  • ✗

    Store secrets in a configuration file in the repository.

    Why it's wrong here

    A configuration file committed to the repository exposes secrets through version history to every contributor, and deletion does not erase earlier commits. It is tempting because it separates configuration from code, and it would be correct for non-secret settings such as feature flags or endpoint URLs, not credentials.

  • ✗

    Encrypt secrets and store them in a shared storage.

    Why it's wrong here

    Encrypting secrets in shared storage still distributes the ciphertext and the decryption key material to every reader, so any compromised workload can recover the plaintext. It is tempting because encryption at rest satisfies auditors, and it would be correct for bulk data rather than credentials needing rotation and audit.

  • ✓

    Use a dedicated secrets management service.

    Why this is correct

    A dedicated secrets management service stores credentials encrypted at rest, enforces fine-grained access policies, and supports rotation and auditing. This removes hard-coded passwords from code and configuration, satisfying the requirement for secure secret storage rather than relying on weaker alternatives such as environment variables or vault-less files.

Quick reference

AAA Protocol Comparison

ProtocolPort(s)EncryptionTransportPrimary Use
RADIUS1812 / 1813Password onlyUDPNetwork access control
TACACS+49Full packetTCPDevice administration
Diameter3868Full sessionTCP / SCTPCarrier / mobile networks
802.1X—EAP-basedLayer 2Port-based access control

TACACS+ encrypts the entire packet; RADIUS only encrypts the password field — a key exam distinction.

About these practice questions

This CV0-004 question is part of Courseiva's 834-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This CV0-004 practice question is part of Courseiva's free CompTIA 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 CV0-004 exam.