A. B. Khan

mTLS and SPIFFE — identity on the wire

The Mesh Series · Article 14

SPIFFEmTLSIstioAuthorizationPolicySecrets & certificatesCompliance evidenceMicrosoft Entra IDWorkload identity

Cover: mTLS and SPIFFE

The Mesh Series · Article 14 · Where Entra meets Istio

Article 8 gave a workload two identities: an outward one for reaching Azure, and an inward one for reaching its neighbours. Article 10 leaned on the inward identity to write authorization policy. Article 13 called it the third, orthogonal axis of defense. We've referenced it four times. Now we build it — because "the mesh handles mTLS" is the kind of sentence that hides exactly the part an auditor will ask about.

Here's the idea, stripped down. When service A calls service B, each one presents a certificate. That certificate isn't a bolt-on credential — it is the workload's identity, and its name is a SPIFFE ID:

Diagram: mtls

No shared secret crosses that link. Each side proves who it is with a certificate signed by the mesh's own certificate authority, and each side verifies the other's — that's the "mutual" in mTLS. The identity baked into the certificate — spiffe://cluster.local/ns/payments/sa/payment-api — is derived from the workload's Kubernetes service account, so it's not something a developer types or a pipeline injects. It's issued, short-lived, and rotated without anyone touching it.

Why regulated enterprises should care

Encryption in transit is table stakes — everyone claims it, and TLS between services is not the interesting property. The interesting property is identity on the wire: you know which workload is on each end of every connection, cryptographically, not "traffic that arrived from this pod IP." IP addresses are recycled, spoofable, and meaningless the moment a pod reschedules. A SPIFFE identity is a verifiable claim about what the workload is, and it survives rescheduling because it's tied to the service account, not the address.

That distinction is the entire audit story, and it's worth stating in the sharpest form the series has: having mTLS and proving mTLS to an auditor are two different jobs. Anyone can turn on encryption. The regulated institution has to demonstrate that service-to-service traffic is mutually authenticated and encrypted, continuously, and name the identities involved. Under SAMA's maturity model you're graded on the control operating over time, not on a screenshot; under PCI-DSS the segmentation between cardholder-data workloads and everything else has to be real and evidenced. A SPIFFE identity in the mesh's telemetry — service X, identity …/sa/payment-api, talked to service Y over mTLS at time Z — is that evidence. "We enabled mTLS" is the first job; producing that line is the second, and it's the one that passes.

How the pieces come together

Three moving parts, and they're all inside Istio.

istiod is the certificate authority. It runs a CA that signs a short-lived X.509 certificate for every workload in the mesh. The certificate carries the SPIFFE identity as a URI SAN. You can chain istiod's CA to your own root (via cert-manager or SPIRE) when enterprise PKI demands it, but out of the box it just works.

The sidecar (or, under ambient, ztunnel) does the handshake. Envoy fetches the workload's certificate over the Secret Discovery Service and rotates it automatically — the default workload certificate lives about 24 hours, and the proxy re-fetches well before expiry, so rotation is continuous and invisible. No cron job, no restart, no human.

PeerAuthentication sets the rule, and the SPIFFE identity is what everything downstream references. STRICT mode makes mTLS mandatory — plaintext is refused. And the identity in that certificate is exactly the principals value an AuthorizationPolicy matches on (Article 10), and the thing default-deny policy is written against (Article 16). The workload plane doesn't just encrypt; it produces the name the rest of your zero-trust policy is built from.

Show the config

Make mTLS mandatory across a namespace, and authorize against the identity it produces — one switch, one policy:

Code: peerauth

The rotation you don't write — but should be able to see, because "prove it" starts with observing it. The certificate is short-lived by design; you inspect the live SVID a workload is holding, expiry and all, straight from the proxy:

Code: inspect

Your application code changes by exactly nothing. The service doesn't open the TLS connection, doesn't hold the key, doesn't know rotation happened. The identity lives beside the workload, not inside it — which is the whole reason there's no secret to leak.

Security · Audit · Integration

Security property gained. Every service-to-service connection is mutually authenticated and encrypted, and each end is a named, verifiable workload identity rather than an IP. A workload can't impersonate another without its certificate, and that certificate never sits in config to be stolen — it's issued to the running pod and expires in a day.

Audit evidence produced. The SPIFFE identity on each connection is the artifact that turns "we have mTLS" into "here is which identity spoke to which, over mTLS, at this time." That's the line SAMA's continuous-operation grading and PCI's segmentation evidence actually want — the proving half of the job, not the having half.

How it integrates. This is the workload plane the whole series keeps building on: the principals in every AuthorizationPolicy (Article 10), the identity default-deny is written against (Article 16), the third axis of defense in depth (Article 13). And it's one half of Article 8's pair. The other half — how the same workload proves itself outward to Azure with no secret — is the next article.

Alternatives, and when you'd actually pick them

istiod's built-in CA (the default). Right for almost everyone: zero PKI to run, automatic issuance and rotation, SPIFFE identities out of the box. The limit is trust-domain scope — it's your mesh's own root.

cert-manager / istio-csr with your own root. When enterprise PKI or a regulator requires workload certs to chain to a corporate CA, cert-manager issues the intermediate and Istio's CA chains to it. You gain a trust chain your security team already governs; you take on running cert-manager and its issuers. Reach for it when "our own root of trust" is a hard requirement, not a preference.

SPIRE. As in Article 8: when workload identity must span clusters, clouds, or on-prem — a single SPIFFE trust domain over a heterogeneous estate — SPIRE is the platform-agnostic issuer. Real portability, real operational weight; justified by multi-domain scope, not by a diagram.

Manual PKI / app-level TLS. Almost never. Terminating TLS in each service and managing certificates by hand is the rotation-hell the mesh exists to delete — and the failure mode is the silent expiry outage. If you're minting service certs by hand, the mesh is the answer you're avoiding.

PERMISSIVE mode as a destination. PERMISSIVE accepts both plaintext and mTLS — invaluable during migration, so you can onboard workloads without a flag-day cutover. It is not a resting place. Left on, it means any plaintext caller is still accepted, and your "mTLS everywhere" claim is false. Migrate through it; don't live in it.

From the toy to the standard

The toy is PeerAuthentication: STRICT on one namespace. The industry-standard version is mTLS mandatory across the mesh, every workload carrying a short-lived SPIFFE certificate issued and rotated by the CA with no human in the loop, every authorization policy written against those identities, and the identities themselves flowing into telemetry so the control is provable, continuously, to an auditor who wants more than a checkbox. Encryption is the easy half. The identity — and the evidence of it — is the half that matters.

That identity proves a workload to its neighbours inside the mesh. But the same workload also has to reach outward — to Key Vault, to a database, to Azure resources that live behind Entra, not behind the mesh. It can't present a SPIFFE certificate to Key Vault. So how does it prove itself there, still without a secret?

That's Article 15: Entra Workload ID Federation on AKS.


Next in the series — Article 15: Entra Workload ID Federation on AKS.

Key skills & topics in this article

SPIFFEmTLSIstioAuthorizationPolicySecrets & certificatesCompliance evidenceMicrosoft Entra IDWorkload identity

  • #ServiceMesh
  • #Istio
  • #Azure
  • #dotnet
  • #ZeroTrust
  • #Kubernetes

Also on LinkedIn.