Courseiva
Security →easyMultiple Choice

CCDV-F Security Practice Question

Which of the following is the most secure way to handle API keys in an Anthropic-integrated cloud application?

⚠ Common exam trap

Candidates often suggest storing keys in environment variables or configuration files, which are easily exposed, rather than using secure, centralized secret management services.

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 cloud-native secret management service to inject keys at runtime.

Managing secrets securely is a standard security practice. Using a dedicated secret manager allows for automatic rotation, granular access control, and audit logging. This prevents the keys from being stored in version control or plain text files, reducing the risk of unauthorized access. It is the industry-standard approach for protecting credentials used by distributed cloud applications.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Store keys in an encrypted JSON file within the application directory.

    Why it's wrong here

    Storing keys in a file, even if encrypted, is insecure because the decryption key or logic must also exist on the server. If an attacker gains file-system access, they can likely retrieve both the data and the method to decrypt it, rendering the encryption ineffective as a security measure.

  • ✓

    Use a cloud-native secret management service to inject keys at runtime.

    Why this is correct

    Secret management services provide a secure, centralized way to store and retrieve sensitive credentials. By injecting keys at runtime, the application never stores them on the persistent disk, minimizing the attack surface. This allows for seamless rotation without requiring code changes, significantly enhancing the overall security posture of the infrastructure.

  • ✗

    Define keys as environment variables in the Dockerfile during build.

    Why it's wrong here

    Embedding secrets in a Dockerfile makes them part of the image layer history. Once an image is pushed to a registry, anyone with pull access can inspect the layers and extract the keys. This practice is considered a critical security vulnerability and should be avoided in all deployment pipelines.

  • ✗

    Hardcode the keys as constants in the configuration file.

    Why it's wrong here

    Hardcoded keys are easily exposed through source control, log files, or accidental commits. This is the least secure method for credential management and violates basic software development security standards. It makes key rotation impossible without a full redeployment and increases the risk of global credential compromise across all environments.

About these practice questions

This CCDV-F question is part of Courseiva's 257-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 Anthropic exam blueprint

This CCDV-F practice question is part of Courseiva's free Anthropic 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 CCDV-F exam.