Workload identity — how machines prove who they are
The Mesh Series · Article 8
Microsoft Entra IDWorkload identitySPIFFEAzureKubernetesAKSPasswordless.NET & C#

The Mesh Series · Article 8 · Foundations & mental models
A user proves who they are with something they know, something they have, or something they are — a password, a passkey, a fingerprint. A service has none of those. It has no fingers, no phone, no memory between restarts. Yet the moment you break a monolith into services, every one of them has to answer the same question your users answer at the login screen: who are you, and why should I let you in?
Most teams answer it the laziest way possible. They paste a client secret into config and move on.
That secret is the whole problem the rest of this series is trying to kill. So before you wire Entra to Istio, before you terminate user identity at the mesh edge, you need the piece underneath all of it: how a machine proves it is the machine it claims to be, without carrying a secret that anyone who reads a config file can steal.
That piece is workload identity. One concept, drawn:

No secret crosses that diagram. The pod holds a token it didn't choose and can't keep — Kubernetes mints it, scopes it to an audience, and expires it in an hour. Entra trusts that token because you told it to, once, by describing the workload instead of storing a password for it. The credential is the workload's identity, not a string it possesses.
Read that flow twice, because everything in Part B is built on it.
Why regulated enterprises should care
Start with what a client secret actually is. It's a bearer credential. Whoever holds the string is the service — Entra can't tell the difference between your payment API and an attacker who found the string in a Helm values file checked into a repo three years ago. There's no second factor for a machine. The secret is the machine.
Now layer on where these institutions operate. A financial institution in India lives under the CERT-In directions: report a cyber incident within six hours of noticing it, and keep your logs for 180 days inside Indian jurisdiction. A leaked service credential is exactly the kind of incident that starts that clock — and the first question in the post-incident review is always the same. Which identity did the damage, and how did it get in?
"A shared secret that was valid, copied to four places, and we're not sure which copy leaked" is not an answer that survives an RBI inspection or a SAMA maturity assessment. SAMA's Cyber Security Framework grades you on whether controls operate continuously — not whether you had a good intention in a design doc. An identity you can name, scope, and expire is a control you can prove. A secret in appsettings.json is a liability you're hoping nobody asks about.
The uncomfortable version: most breaches involving machine credentials aren't clever. Somebody committed a secret, or logged it, or left it in an image layer. Workload identity doesn't make your service smarter. It removes the object that keeps getting stolen.
Where this fits between Kubernetes, Istio, C#, and Entra
Article 7 left you with a one-liner worth keeping: Entra owns user identity; the mesh owns workload-to-workload identity. Workload identity is the hinge between those two worlds, and it points in two directions.
Outward — proving who you are to Azure. Your service needs a database, a Key Vault, a Cosmos container. Those live behind Entra. So the workload has to hold an Entra identity — a managed identity — and prove it's entitled to that identity without a secret. That proof is federation: Kubernetes vouches for the pod, Entra trusts Kubernetes, and the pod gets an Entra token.
Inward — proving who you are to the service next door. Your payment service calls your ledger service. Neither of them is a user. Entra isn't in that path; it shouldn't be. Inside the mesh, each workload carries a cryptographic identity of its own, and the two prove themselves to each other over mutual TLS. That identity has a name and a standard shape — a SPIFFE ID — and it looks like this:
spiffe://cluster.local/ns/payments/sa/payment-api
Trust boundary, namespace, service account. Same idea as the Entra side — a workload proving who it is with a short-lived, verifiable credential instead of a password — just facing inward, issued by the mesh instead of by Azure.
That's the whole mental model. One workload, two identities: an outward identity for reaching cloud resources through Entra, and an inward identity for reaching its neighbours through the mesh. The rest of Part B is filling in each half. Article 14 goes deep on the mesh side (mTLS, SPIFFE, certificate rotation). Article 15 goes deep on the Azure side (the AKS federation exchange, end to end). Today is the map, not the territory.
Show the config
Three ideas, three pieces of config. None of them contain a secret.
1. The managed identity is the workload's real principal. You create it once. It's a first-class object in Entra with an object ID an auditor can name — not a row in a password table. On AKS, the honest baseline in 2026 is Microsoft Entra Workload ID, which is GA. The older AAD Pod Identity is deprecated; don't start anything new on it.
2. The federated credential is how Kubernetes vouches for the pod. Instead of giving the workload a secret, you tell the managed identity: "trust tokens from this cluster's issuer, for this specific service account." The match is exact and case-sensitive on three fields — issuer, subject, audience. And 3. the pod asks for the identity by wearing a label and an annotation, never a password — on AKS a mutating webhook sees the label and injects the plumbing for you:

—
The subject is a Kubernetes service account — namespace payments, name payment-api. That's the entire trust statement: a pod running as this service account, in this cluster, may act as this managed identity. No pod anywhere else can. Note the limit while you're here — a single managed identity holds at most 20 federated credentials, and Entra keeps only the first 100 signing keys from an issuer. Real numbers, worth knowing before you design a hundred-tenant scheme around one identity.
Now the C#. This is the part people don't believe until they see it — the code has no credential in it at all:

Azure.Identity 1.21.0, .NET 8 (the series baseline — .NET 10 is now the LTS, and this compiles unchanged there). There is no connection string for the vault, no client secret, no certificate file. The credential is the pod's identity, exchanged fresh, expired hourly, and never written down. If you prefer to be explicit rather than lean on DefaultAzureCredential's fallback chain, swap in new WorkloadIdentityCredential() — same result, no ambiguity about which mechanism is in play.
Compare that to what it replaces: a client secret in config, copied into a pipeline variable, echoed into an env var, and pasted into a runbook — four places, one of which you'll forget the day you have to rotate it. This is the "secrets you're afraid to rotate" scar, removed at the root. Not managed better. Gone.
Security · Audit · Integration
Security property gained. No long-lived secret exists for the workload. The credential the pod holds is minted by Kubernetes, scoped to a single audience, and expires in an hour — a stolen copy is worthless before your incident bridge even convenes. You've traded a bearer secret for a verifiable, short-lived assertion.
Audit evidence produced. Every access is attributable to a named Entra principal — a managed identity with an object ID — not an anonymous shared string. When CERT-In's six-hour clock starts, "identity X, federated from service account payments/payment-api, accessed Key Vault Y at time Z" is a sentence you can put in the report. That is the demo-to-audit gap closing: you had the access control before; now you can prove who exercised it.
How it integrates. The outward identity (Entra federation) gets your service into Azure resources. The inward identity (SPIFFE + mesh mTLS) gets it talking to neighbours. Article 15 wires the outward half end to end on AKS; Article 14 wires the inward half. Article 16's default-deny authorization policies are written against the inward SPIFFE identity — which is why it has to exist first.
Alternatives, and when you'd actually pick them
Workload identity federation into Entra is the right default when your workloads run on AKS and consume Azure resources. It's not the only answer, and pretending otherwise is how you end up with the wrong tool welded in.
SPIRE (the SPIFFE reference implementation). If you're multi-cloud, or on-prem, or explicitly don't want Azure to be the root of trust for workload-to-workload identity, SPIRE issues SPIFFE SVIDs across heterogeneous platforms — the platform-agnostic version of what the mesh gives you inside one cluster. It's the serious choice when your estate spans AKS and EKS and bare metal and you want one identity plane over all of it. The cost is real: SPIRE (v1.15.1 as of mid-2026) is another distributed system to run, attest, and keep alive. Pick it when portability across trust domains is a hard requirement — not because it's on a CNCF slide.
HashiCorp Vault. Vault is excellent at brokering secrets you genuinely can't eliminate — third-party API keys, legacy database passwords, credentials for systems that will never speak OIDC. What it isn't is a reason to keep minting service credentials you could have federated away. Use Vault for the secrets that must exist. Don't use it to industrialize the anti-pattern for the ones that don't. Dynamic secrets are a real feature; a short-lived leased credential still beats a static one. But zero credentials beats one.
Legacy AAD Pod Identity. Deprecated. If you're on it, the migration to workload identity is the point of Article 15. Nothing new starts here.
A client secret in config. Always available, always tempting, occasionally defensible — a throwaway spike, a five-minute local repro. The moment it touches an environment an auditor can subpoena, it's a finding waiting to be written. Know that you're taking on a liability, and put a rotation date on the calendar you both know you'll miss.
From the toy to the standard
The toy is one pod, one managed identity, one Key Vault call with no secret in sight. The industry-standard version is the same idea applied without exception: every workload has a named identity, no workload carries a static secret, the outward identity is federated to Entra and the inward identity is a SPIFFE SVID the mesh rotates on its own, and every access — cloud-side and service-to-service — resolves to a principal you can name in an incident report inside six hours.
Notice what just happened. You've removed the machine's password entirely. It proves who it is with a short-lived, verifiable assertion instead of a stored string.
That's the same move passwordless makes for humans — kill the credential, replace it with something phishing-resistant and short-lived. Machines and people, the same fix from two directions. That convergence is the next article: going passwordless, for users and workloads both, and why a growing list of regulators have stopped treating it as optional.
Next in the series — Article 9: Going passwordless, for users and workloads.
Key skills & topics in this article
Microsoft Entra IDWorkload identitySPIFFEAzureKubernetesAKSPasswordless.NET & C#
Also on LinkedIn.