Explain auth, key rotation, secrets, and incident response
RobinhoodSoftware Engineer · OnsiteLast updated
This question tests your knowledge of secure microservice communication, the lifecycle management of sensitive credentials, and the operational procedures for mitigating security breaches.
Scenario
You are a senior engineer at a fintech platform. You are tasked with designing the security architecture for a new microservice that processes sensitive payment data. This service must communicate with several downstream internal services.
Task
- Authentication: Propose a mechanism for service-to-service authentication. Explain how you would ensure that Service A knows it is talking to the genuine Service B.
- Secret Management: Where should API keys and database credentials reside? Describe a workflow for storing and retrieving these secrets that minimizes the risk of exposure.
- Key Rotation: Explain how you would implement automated key rotation for a long-lived database credential without causing downtime for the dependent services.
- Incident Response: Your team receives an alert that a service token was accidentally committed to a public repository. Outline the steps you would take to contain the incident and remediate the risk.
Requirements
- Provide a high-level architecture for your proposed solution.
- Address how you handle 'secret zero' (the problem of authenticating the service to the secret manager itself).
- Ensure your incident response plan covers identification, containment, eradication, and post-mortem analysis.
Hints
Hint 1
Consider using Short-Lived Tokens (like SPIFFE/SPIRE or Mutual TLS) to replace long-lived static credentials for internal traffic.
Hint 2
For secret management, think about how dynamic secrets (secrets created on-the-fly with a TTL) can eliminate the need for traditional rotation.
Hint 3
During incident response, prioritize invalidation (revocation) before investigation to stop potential active exploitation.
Follow-up questions
- How would you change your strategy if the secret management tool itself experienced an outage?
- What metrics would you monitor to detect potential credential stuffing or unauthorized access attempts?
- How does your design change if the services span across multiple cloud regions or hybrid-cloud environments?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.