Microservices talk over plain HTTP inside the cluster. Security wants service-to-service authentication. What are your options?
AdvancedScenarioSecrets and Identity Management
Answer
Situation read → The internal network is not a trust boundary. Each service needs a verifiable identity.
What I'd do →
- Service mesh with mTLS: Istio or Linkerd issue SPIFFE identities per service account and rotate certs automatically.
- Enforce strict mode, e.g. Istio
PeerAuthenticationwithmtls.mode: STRICT, after a permissive rollout. - Add authorization: Istio
AuthorizationPolicyallowing onlyordersto callpayments. - Without a mesh: SPIRE for identities plus app-level mTLS, or signed JWTs between services.
- Keep NetworkPolicies as a second layer.
Why → mTLS gives encryption and identity; authorization policies turn identity into least privilege.
Interview tip → Roll out permissive first, watch metrics, then switch to strict.
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