Skip to content
All posts

Workload Identity Explained: Kubernetes, Azure, GCP

October 7, 2026 · Team PlayCISO · Updated Oct 27, 2026
Put it into practice
Plan your keyless workload identity
Pick EKS, AKS, GKE or GitHub Actions and get the exact pattern (Pod Identity or IRSA, Entra Workload ID, Workload Identity Federation) plus the steps to retire static keys.
Open the NHI checklist and planner

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 are widely reported to outnumber human identities in cloud environments, and they commonly 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.

Azure workload identity vs managed identity, in one answer: they are not alternatives so much as layers. A managed identity is the Entra identity, and Azure manages its credentials. Microsoft Entra Workload ID (Azure workload identity) is the federation mechanism that lets a workload that cannot use a managed identity directly, such as an AKS pod or a CI job, exchange its own OIDC token for an Entra token. That federated credential can be attached to a user-assigned managed identity or to an app registration (not to a system-assigned managed identity), so on AKS you commonly use both.

QuestionManaged identityWorkload identity (federation)
What it isAn Entra identity with credentials managed by AzureA trust between Entra and an external OIDC issuer, such as an AKS cluster or GitHub Actions
Where the workload runsAzure compute: VMs, App Service, Functions and similarAKS pods, other Kubernetes clusters, CI/CD pipelines or another cloud
How it gets a tokenFrom the Azure platform’s managed identity endpointExchanges a short-lived OIDC token from its own issuer for an Entra token
Secrets to storeNoneNone
Typical AKS setupThe identity the pod signs in as (user-assigned)The federated credential plus the annotated Kubernetes service account

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.

Useful next, if this was relevant to you

Showing 1 of 3: Cloud Posture Lab

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.

Kubernetes workload identity on Amazon EKS

On Amazon EKS, Kubernetes workload identity is provided by IAM Roles for Service Accounts (IRSA) and by the newer EKS Pod Identity. Both let a pod use an AWS IAM role without storing access keys.

  • IRSA: you register the cluster's OIDC issuer as an IAM identity provider, annotate a Kubernetes service account with the IAM role to use (eks.amazonaws.com/role-arn), and the pod exchanges its projected service account token with AWS STS (AssumeRoleWithWebIdentity) for temporary credentials. The role's trust policy restricts which namespace and service account may assume it.
  • EKS Pod Identity: you install the EKS Pod Identity Agent add-on and create a pod identity association between a service account and an IAM role. No per-cluster OIDC identity provider setup is needed.

The pattern is the same one used on AKS and GKE: a short-lived token signed by the cluster is traded for short-lived, scoped cloud credentials. Give each workload its own role instead of relying on a broad node role that every pod on the node inherits.

GCP Workload Identity and Workload Identity Federation

GKE Workload Identity (now called Workload Identity Federation for GKE) lets Google Kubernetes Engine pods authenticate to Google Cloud APIs. You can grant IAM roles directly to a Kubernetes service account, or link it to an IAM service account for the pod to impersonate, 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 location or risk; a Workload Identities Premium feature), 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 actually carry, PlayCISO's Identity Risk scoring tool (Pro) scores a human user, a service account or an AI agent from 0 to 100 across blast radius, authentication strength, exposure, governance and monitoring, in your browser.

Frequently asked questions

What is Kubernetes workload identity?

Kubernetes workload identity lets a pod authenticate to cloud services as a cloud identity without mounting static secrets. The cluster acts as an OIDC issuer and projects a short-lived, signed service account token into the pod. The cloud provider trusts that issuer and exchanges the token for short-lived credentials scoped to a mapped identity. It is called Microsoft Entra Workload ID on AKS, Workload Identity Federation for GKE on Google Cloud, and IRSA or EKS Pod Identity on Amazon EKS.

What is the difference between Azure workload identity and managed identity?

A managed identity is an identity in Microsoft Entra ID whose credentials Azure manages for you; Azure resources such as VMs, App Service and Functions use it to get tokens with no secret to store. Azure workload identity (Microsoft Entra Workload ID) is how a workload that cannot use a managed identity directly, such as a pod in AKS or a GitHub Actions job, gets an Entra token by federation: you add a federated identity credential that trusts the workload's OIDC issuer to a user-assigned managed identity or an app registration. So they are not either-or. On AKS, workload identity is the mechanism, and a user-assigned managed identity is often the identity it signs in as.

Plan your keyless workload identity
Pick EKS, AKS, GKE or GitHub Actions and get the exact pattern (Pod Identity or IRSA, Entra Workload ID, Workload Identity Federation) plus the steps to retire static keys.
Open the NHI checklist and planner
Take this with you
Managed identity vs. workload identity:… · How workload identity works in Kubernete… · Kubernetes workload identity on Amazon EKS · GCP Workload Identity and Workload Ident… · Workload identities in Microsoft Entra —…

Ready to practise the decisions these articles describe?

Run your first Cyber War Room free →

Pro