Workload Identity Explained: Kubernetes, Azure, GCP, and Entra
A workload identity is a non-human identity assigned to software — a container, service, function, or VM — so it can authenticate to other services without hardcoded secrets. Instead of embedding an API key or password, the workload exchanges a short-lived token issued by a trusted provider for access to cloud resources. This matters now because non-human identities already outnumber human identities in most cloud environments, and per security research, they typically carry broader standing privilege with weaker rotation and monitoring than human accounts — making them a prime attack surface.
Managed identity vs. workload identity: what's the difference?
These terms overlap, so precision helps. A managed identity is Microsoft's specific implementation for Azure resources (VMs, App Service, Functions) where Azure manages the credential lifecycle for you — no secrets to store or rotate. Workload identity is the broader, cloud-agnostic concept: any identity representing a workload, including managed identities, Kubernetes service accounts, and federated identities from external providers.
The key distinction:
- Managed identity works for workloads running inside Azure's compute platforms.
- Workload identity federation extends trust to workloads running outside the cloud — GitHub Actions, on-prem Kubernetes, or another cloud — without storing a long-lived secret.
If your workload lives in Azure, a managed identity is usually the simplest choice. If it lives elsewhere but needs Azure resources, you use workload identity federation instead.
How workload identity works in Kubernetes and AKS
Kubernetes workload identity solves a specific problem: pods needing cloud credentials without mounting static secrets. It works through OpenID Connect (OIDC) token federation. The cluster's API server acts as an OIDC issuer. Each pod gets a projected service account token — a short-lived JWT signed by the cluster. The cloud provider is configured to trust that issuer and map the Kubernetes service account to a cloud identity.
The flow is:
- A pod runs under a Kubernetes service account.
- Kubernetes projects a signed, time-limited OIDC token into the pod.
- The pod presents that token to the cloud IAM endpoint.
- The cloud validates the signature against the trusted issuer and returns a short-lived access token scoped to the mapped cloud identity.
In Azure Kubernetes Service (AKS), this is called Microsoft Entra Workload ID. You annotate a Kubernetes service account to link it to an Entra application or managed identity, enable the OIDC issuer on the cluster, and set up a federated credential. The result: pods authenticate to Azure Key Vault, Storage, or SQL with no secrets in the manifest. This replaced the older, deprecated AAD Pod Identity model.
GCP Workload Identity and Workload Identity Federation
GCP Workload Identity lets Google Kubernetes Engine (GKE) pods act as a Google Cloud service account. You bind a Kubernetes service account to an IAM service account, and the GKE metadata server brokers short-lived credentials automatically — again, no downloaded JSON key files, which are a common source of credential leaks.
Workload Identity Federation in GCP goes further: it lets workloads from outside Google Cloud — AWS, Azure, on-prem, or CI/CD pipelines — impersonate a Google service account using their native identity tokens. You configure a workload identity pool and a provider that trusts an external OIDC or SAML issuer. A GitHub Actions job, for example, can deploy to GCP using its own OIDC token rather than a stored service account key. The pattern is identical across clouds: federate trust to an issuer, exchange tokens, grant short-lived scoped access.
Workload identities in Microsoft Entra — and how to govern them
In Microsoft Entra, workload identities are the collective term for service principals and managed identities — the applications and services that access resources rather than people. Entra now offers dedicated governance features for them, including Conditional Access for workload identities (restricting by IP location), access reviews for service principals, and risk detection that flags suspicious sign-ins from app credentials.
This governance gap is the real risk. Because non-human identities outnumber humans and often hold broad standing privilege with weaker rotation and monitoring, a single over-permissioned service principal with a leaked secret can be more damaging than a compromised user. Practical controls to prioritize:
- Eliminate static secrets — adopt federation and managed identities so there's nothing long-lived to steal.
- Scope least privilege per workload — one identity per workload, not a shared super-account.
- Inventory and review — run periodic access reviews on service principals and remove unused ones.
- Monitor token exchange — alert on unexpected issuers or federated credential changes.
If you want to quantify how much standing privilege your non-human identities act
Ready to practise the decisions these articles describe?
Run a free War Room →