Developers need occasional production database access for debugging. How do you grant it safely?
IntermediateScenarioSecrets and Identity Management
Answer
Situation read → Standing access is the risk. Just-in-time, time-boxed, logged access is the goal.
What I'd do →
- No permanent prod DB roles for developers.
- Access request flow (Teleport, StrongDM, Boundary, or an IAM Identity Center permission set with approval) granting 1–4 hours.
- Connect through a bastion-less path: SSM Session Manager port forwarding or the access proxy, with session recording.
- Default to a read-only replica role; writes need a second approver.
- Use IAM database authentication or Vault dynamic users so credentials expire with the session.
Why → Debugging stays possible, but every session has an owner, a reason and an expiry.
Interview tip → Use the phrase "zero standing privileges".
More on Secrets and Identity Management
A team stores database passwords in a `.env` file committed to a private repo. How do you migrate them out?BeginnerYour CI pipeline uses long-lived AWS access keys stored as repository secrets. How do you replace them?IntermediateAn auditor asks how often you rotate database credentials. You currently never do. What do you build?IntermediatePods need AWS access. A developer mounted an IAM user's keys as a Kubernetes Secret. What do you propose instead?BeginnerShould you use Kubernetes Secrets, Sealed Secrets, External Secrets Operator or the Secrets Store CSI driver?IntermediateA Slack webhook URL and a Stripe live key were posted in a public GitHub issue. What is your response sequence?Beginner