Courseiva
Question 59 of 968
easyMultiple ChoiceObjective-mapped

CAS-004 Secure secret storage method Practice Question

Which of the following is a secure method for storing secrets (e.g., API keys, passwords) in a cloud-native application?

⚠ Common exam trap

CompTIA often tests the misconception that base64 encoding or environment variables are 'secure enough' because they hide the secret from casual view, but the trap is that neither provides encryption, access control, or rotation, which are required for secure secret storage in cloud-native applications.

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

A dedicated secrets management service (e.g., AWS Secrets Manager, Azure Key Vault, HashiCorp Vault) provides encryption at rest and in transit, automatic rotation, fine-grained access control via IAM policies, and audit logging. This prevents secrets from being exposed in configuration files, environment dumps, or version control, which is essential for cloud-native applications that must adhere to the principle of least privilege and compliance standards like SOC 2 or PCI DSS.

Answer analysis

Option-by-option breakdown

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

  • Encode secrets in base64 in configuration files

    Why it's wrong here

    Base64 is not encryption; it is easily reversible and does not protect secrets.

  • Store secrets in environment variables

    Why it's wrong here

    Environment variables can be exposed via process listings, logs, or debug interfaces; they are not encrypted.

  • Hardcode secrets in the source code

    Why it's wrong here

    Hardcoding secrets is insecure as they can be read from version control or decompiled code.

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 serviceCorrect answer
Encode secrets in base64 in configuration filesWrong answer — click to see why

Why this is wrong here

Base64 is not encryption; it is easily reversible and does not protect secrets.

Store secrets in environment variablesWrong answer — click to see why

Why this is wrong here

Environment variables can be exposed via process listings, logs, or debug interfaces; they are not encrypted.

Hardcode secrets in the source codeWrong answer — click to see why

Why this is wrong here

Hardcoding secrets is insecure as they can be read from version control or decompiled code.

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?”

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.