Lesson 2 of 9 · 27m
mTLS Everywhere Means Workload Identity Everywhere
Use SPIFFE-style workload identity correctly, understand certificate rotation, and avoid confusing transport authentication with application authorization.
The strongest argument for a mesh is not encryption as a checkbox. It is identity. mTLS gives each workload a cryptographic identity that can be used for policy: this exact service account, in this namespace, in this cluster, presented this certificate. That is much stronger than 10.4.18.22 or a shared secret copied into eleven manifests.
Identity is the unit of policy
Istio and many SPIFFE-aware systems represent identity like this:
spiffe://cluster.local/ns/payments/sa/payments-apiThat identity answers "who is calling?" before application code parses a token. It is anchored in a short-lived X.509 certificate, usually requested by the proxy and rotated automatically. In Istio you can inspect it:
istioctl proxy-config secret deploy/payments-api -n payments
kubectl exec deploy/payments-api -c istio-proxy -n payments -- curl -s localhost:15000/certs | headThe operational detail matters: certificate lifetime, CA trust bundle distribution, rotation behavior, and clock sync are production controls. A mesh that rotates certificates badly creates fleet-wide authentication failures at 3 a.m.
mTLS authenticates connections, not users
mTLS tells you which workload made the connection. It does not prove which human clicked a button or whether that human may read a particular invoice. Preserve end-user identity separately, normally as a signed JWT or opaque session token, and enforce object authorization in the service.
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: payments-readers
namespace: payments
spec:
selector:
matchLabels:
app: payments-api
action: ALLOW
rules:
- from:
- source:
principals:
- cluster.local/ns/storefront/sa/checkout
to:
- operation:
methods: ["GET", "POST"]
paths: ["/v1/payments*"]This policy says the checkout workload may call selected payment operations. It says nothing about whether user A owns payment B.
Migration is the hard part
PERMISSIVE mode accepts plaintext and mTLS while you migrate; STRICT requires mTLS. The danger is a namespace that stays permissive forever because nobody measured plaintext traffic. Track policy state and connection metadata until plaintext reaches zero.
Field notes
- Never encode permissions in IP addresses once sidecars are deployed; pod IPs recycle and NAT hides the original peer.
- Authorization policies fail closed or open depending on schema and ordering; test denied and allowed callers explicitly.
- Cross-cluster identity depends on trust-domain design. Same name does not imply same identity across clusters.
- Certificate rotation is not optional housekeeping. Test it before production and alert on rotation failures.
Was this lesson helpful?