CCDV-F practice question 9 of 10

Your Claude application's API keys are stored in a secrets manager. The team is debating whether the same key should be used in development, staging, and production environments. How would you handle the keys across environments?

Full set: 95 questions
Answer options
A: Use distinct keys for each environment so a compromise in one environment does not affect the others during normal operation across the application's lifecycle. Correct answer
B: Rotate the same key across environments at random intervals on the grounds that random rotation provides isolation between environments without requiring distinct keys.
C: Use the same key across all environments for simplicity and treat the propagation of any compromise as a known operational tradeoff for the team's key management approach.
D: Use a single development key everywhere on the grounds that production keys are too risky to deploy across the application's three environments during normal operation.
Correct Answer:
A. Use distinct keys for each environment so a compromise in one environment does not affect the others during normal operation across the application's lifecycle.
Explanation

Security best practices for API key management dictate using distinct keys for different environments (development, staging, production). This principle of isolation ensures that if a development or staging key is accidentally leaked or compromised—which is more likely due to looser controls in non-production environments—the production environment remains secure and unaffected. Furthermore, distinct keys allow for environment-specific rate limiting, accurate cost tracking, and granular access controls without impacting live production traffic.

Why Incorrect

B: Rotating the same key does not provide isolation; a compromise during the active window still affects all environments simultaneously. C: Using the same key across environments violates the principle of least privilege and creates a massive single point of failure. D: Using a development key in production introduces severe security risks and prevents proper production-level access controls and monitoring.

References

1. Anthropic API Fundamentals: "Security and API keys" (Section: Environment isolation and key management).

2. NIST Special Publication 800-57 Part 1 Rev. 5: "Recommendation for Key Management" (Section 5.3, Cryptographic Key Isolation).

Scroll to Top