How do services authenticate each other? What is mTLS, and how does it compare with API keys and JWT?
Short answer
Internal calls still have to prove "I am service A". mTLS is two-way TLS: both client and server present certificates signed by an internal CA, giving strong identity and transport encryption at once; the hard part is issuing and rotating certificates, usually handed to a service mesh.
3 points to say:
- Zero trust: internal calls authenticate too; identity is per workload (certificate), not per IP.
- API keys are weak (secret sent on every request), JWT client credentials sit in the middle, mTLS is strongest because the private key never leaves the machine, but it needs a PKI.
- A service mesh (Istio, Linkerd) does mTLS for you, issues SPIFFE certificates that live a few hours and rotate automatically, and lets you write policies like "only
ordermay callpayment".
Keep reading the deep dive
Create a free account to read the full explanation and follow-up questions, mark questions as studied and review them on a schedule.