Opscraft
How SSL/TLS works · Lesson 4 of 8 · 3 min read

Mutual TLS and service identity

mTLS

In normal TLS only the server presents a certificate. In mutual TLS, the server also requests a client certificate and verifies it against a trusted CA. Uses:

  • Service-to-service authentication in zero-trust networks — each workload has a cryptographic identity.
  • APIs for partners/devices (IoT, B2B integrations).
  • Kubernetes itself: the API server, kubelets and etcd authenticate each other with mTLS.
Enlarge diagramorders serviceclientpayments serviceservereach side checks the other against the trusted CAClientHelloserver certificate + "send me yours"client certificate + proof of its keyencrypted, mutually authenticated traffic
Figure 1. Mutual TLS: the server also asks for a certificate, so both sides prove who they are.
Swipe sideways to see all of it, or tap to open it full screen.

Service meshes

Istio, Linkerd and Cilium automate mTLS:

  • A mesh CA issues short-lived certificates (hours) to each workload, with identities based on the Kubernetes ServiceAccount — Istio uses SPIFFE IDs like spiffe://cluster.local/ns/shop/sa/orders.
  • Sidecars (or node proxies in ambient mode) perform TLS transparently — apps speak plain HTTP to localhost.
  • Policies enforce it: Istio PeerAuthentication (mode: STRICT requires mTLS) and AuthorizationPolicy (which identities may call which services).
  • Rotation is automatic and constant — no expiry outages.
Enlarge diagramORDERS PODPAYMENTS PODappplain HTTPsidecarEnvoyappplain HTTPsidecarEnvoymesh CA (istiod)short-lived certs per ServiceAccount (SPIFFE IDs)mTLS between sidecars
Figure 2. In a service mesh the sidecar proxies do mTLS for you. Apps speak plain HTTP to localhost; everything between pods is encrypted and authenticated.
Swipe sideways to see all of it, or tap to open it full screen.

Why encrypt internal traffic at all

"It's inside our VPC" isn't a security boundary: a compromised pod, a misconfigured peering, or a malicious insider can sniff or spoof internal traffic. Zero trust says authenticate and encrypt every hop. Compliance regimes (PCI-DSS, RBI guidelines for financial services in India, HIPAA) often require encryption in transit internally too. Credentials and tokens in internal API calls need protection just as much as external ones.