Mutual TLS (mTLS)
Mutual TLS (mTLS) is a two-way authentication protocol where both client and server present certificates and verify each other before encrypted communication begins. In a service mesh, sidecar proxies apply mTLS between services automatically, with no application code changes.
Regular TLS vs mTLS
With regular TLS, as on a bank's website, only the server proves its identity. With mTLS the server also verifies the client, so a service accepts calls only from workloads it can cryptographically identify.
How the mesh does it
Applications send plain HTTP to the local sidecar. The sidecars perform the mTLS handshake, encrypt traffic between pods, and decrypt it on arrival. The mesh CA issues short-lived certificates tied to each workload's ServiceAccount identity and rotates them automatically. In Istio, workload certificates default to a 24 hour lifetime.
Configure in Istio
apiVersion: security.istio.io/v1kind: PeerAuthenticationmetadata: name: default namespace: productionspec: mtls: mode: STRICT| Mode | Behaviour |
|---|---|
| STRICT | Only mTLS accepted |
| PERMISSIVE | Both mTLS and plaintext accepted |
Roll out with PERMISSIVE, verify with mesh telemetry that traffic is encrypted, then move namespace by namespace to STRICT.
RemembermTLS proves identity and encrypts. It does not decide who may call whom. Add AuthorizationPolicy for that.
SecurityDo not enable STRICT before every workload in scope has a sidecar. Anything without one, including probes and jobs, will be rejected.
Common MistakeBelieving mTLS replaces NetworkPolicy. They are complementary layers.
Frequently Asked Questions
How is mTLS different from the TLS on a public website?
Regular TLS verifies only the server. mTLS also verifies the client, so both sides are authenticated before data flows.
Why do I need to roll out PERMISSIVE first?
STRICT rejects plaintext. Pods without sidecars, external health checks, and legacy clients fail instantly. PERMISSIVE lets you migrate gradually and verify.
Does the application have to handle certificates?
No. The sidecars handle issuance, rotation, and the handshake, so application code stays unchanged.