Security Operations

A development team wants its microservices to reach a production database without any long-lived shared credential. Which approach BEST meets this goal?

Show the answer

Correct answerC. Have a secrets manager issue short-lived, per-service database credentials on request

AWhy not this: The secret stays out of code, but it is still long-lived, shared, and readable from any compromised host.

BWhy not this: Anyone who can pull the image can extract the password, and changing it means rebuilding and redeploying every image.

CWhy this is right: Per-service credentials that expire quickly limit the value of a stolen secret and make each workload's access traceable.

DWhy not this: A password that stays valid for a year and is shared by all services gives an attacker a very long window.

A secrets manager can generate unique, short-lived credentials for each service, so a stolen credential soon expires and can be traced to one workload. A shared password in environment variables is tempting because it keeps the secret out of code, but it is still long-lived, shared by every host, and readable from any compromised one.