easyMultiple ChoiceObjective-mapped
CAS-004 Secure secret storage Practice Question
Which of the following is the BEST practice for securely storing secrets (e.g., database passwords) in a cloud-native application?
⚠ Common exam trap
The CAS-004 exam often tests the misconception that environment variables are a secure storage method because they are not in source code, but the trap is that they are still plaintext and accessible via runtime introspection, logging, or orchestration APIs, lacking the encryption and access control of a dedicated secrets manager.
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 secrets management service with encryption and access policies
Cloud-native applications should rely on a dedicated secrets management service (e.g., AWS Secrets Manager, Azure Key Vault, HashiCorp Vault) that encrypts secrets at rest and in transit, enforces fine-grained access policies via IAM, and supports automatic rotation. This approach decouples secrets from code and infrastructure, eliminating the risks of exposure through version control, logs, or misconfigured permissions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Embed the secrets in the application's source code
Why it's wrong here
Hardcoding secrets exposes them in version control and to anyone with code access.
- ✗
Store them in environment variables
Why it's wrong here
Environment variables can be leaked through debugging interfaces or process listings; they are not encrypted.
- ✗
Store them in a configuration file with restricted file permissions
Why it's wrong here
File permissions can be bypassed; configuration files are often not encrypted.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The CAS-005 exam frequently reuses these exact scenarios with slightly different constraints.
✓Use a secrets management service with encryption and access policiesCorrect answer▾
✗Embed the secrets in the application's source codeWrong answer — click to see why▾
Why this is wrong here
Hardcoding secrets exposes them in version control and to anyone with code access.
✗Store them in environment variablesWrong answer — click to see why▾
Why this is wrong here
Environment variables can be leaked through debugging interfaces or process listings; they are not encrypted.
✗Store them in a configuration file with restricted file permissionsWrong answer — click to see why▾
Why this is wrong here
File permissions can be bypassed; configuration files are often not encrypted.
Analysis generated from the official CAS-005blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Go deeper
Related to this question
About these practice questions
Courseiva writes every CAS-005 question from scratch — 968 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CAS-005 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 CAS-005 exam.