Bird
0
0

Why should sensitive data like passwords be stored using Docker secrets instead of environment variables?

easy📝 Conceptual Q1 of 15
Docker - Security
Why should sensitive data like passwords be stored using Docker secrets instead of environment variables?
ADocker secrets encrypt data and restrict access to authorized services only
BEnvironment variables are easier to manage and more secure
CDocker secrets automatically rotate passwords without user input
DEnvironment variables are encrypted by default in Docker containers
Step-by-Step Solution
Solution:
  1. Step 1: Understand environment variables security

    Environment variables are stored in plain text inside containers and can be exposed easily.
  2. Step 2: Understand Docker secrets security

    Docker secrets are encrypted at rest and in transit, and only accessible to services explicitly granted access.
  3. Final Answer:

    Docker secrets encrypt data and restrict access to authorized services only -> Option A
  4. Quick Check:

    Secrets provide encryption and access control [OK]
Quick Trick: Secrets encrypt and limit access, env vars do not [OK]
Common Mistakes:
  • Assuming environment variables are secure
  • Believing Docker secrets auto-rotate passwords
  • Thinking environment variables are encrypted by default

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes