Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
Workload identity lets a Kubernetes service account exchange a signed token for short-lived cloud credentials, so pods reach cloud services without stored keys or shared node permissions.

What Is Workload Identity in Kubernetes?
Workload identity is the mechanism that lets a pod obtain cloud credentials on the strength of its Kubernetes service account, rather than from a stored key or from the permissions attached to the node it happens to run on. The cluster issues a short-lived, signed token describing the service account; the cloud provider verifies the signature against the cluster’s public keys and returns temporary credentials for a role you have bound to that identity. No secret is stored anywhere, and the credentials expire on their own.
Before workload identity, applications in Kubernetes got cloud access in one of two unsatisfactory ways. Either an access key was placed in a Secret or an environment variable, where it lived indefinitely, was copied into repositories, and had to be rotated by hand; or the pod used the node’s instance profile, which meant every pod on that node inherited the same permissions. The second is worse than it sounds: on a shared cluster, the node role is necessarily the union of what every workload scheduled there might need, so a compromised front-end container can read whatever the batch job next to it was allowed to read.
Workload identity makes the grant specific. The role is bound to system:serviceaccount:payments:ledger and to nothing else, so the blast radius of a compromised pod is whatever that one service account was permitted to do.
sts:AssumeRoleWithWebIdentity for temporary credentials. The IAM role’s trust policy names the OIDC provider and conditions on the sub and aud claims.Workload identity removes stored keys; it does not automatically produce least privilege, and the configuration has sharp edges.
StringLike and a wildcard, such as system:serviceaccount:*, lets any service account in the cluster assume that role. Any developer who can create a pod in any namespace then has your production permissions. Always use StringEquals with the full namespace and service account name.aud condition — sts.amazonaws.com on AWS — allows a token minted for another audience to be replayed. Both the subject and the audience conditions belong in every trust policy.default service account in a namespace used by six deployments is a role granting the union of six needs. One service account per workload is the whole point.Mount tokens only where they are needed: set automountServiceAccountToken: false on service accounts and pods that never call the cloud API or the Kubernetes API. Projected tokens are short-lived and rotated by the kubelet, so confirm your SDK version supports refresh — older libraries read the token once at startup and begin failing after an hour.
For visibility, cloud audit logs record role assumption with the session name, which usually encodes the pod or service account, so you can alert on a role being assumed from an unexpected namespace or at an unexpected rate. That signal is one of the more reliable indicators of a compromised workload, and it belongs in the same detection set as the rest of your Kubernetes security monitoring.
Finally, remember what workload identity does not cover. Credentials for third-party services, database passwords, and signing keys still need a secret store — see encrypting Kubernetes Secrets for how to hold those safely. Workload identity solves the cloud-provider half of the problem extremely well, and leaves the other half to you.
If you would like the trust policies in your clusters reviewed against what an attacker could actually assume, that review is part of our cloud security services.
IRSA uses an OIDC provider registered per cluster and a trust policy on each IAM role, which supports cross-account access and works with any OIDC-aware consumer. EKS Pod Identity uses an agent and associations managed through the EKS API, removing the per-cluster OIDC registration and simplifying role reuse across clusters, but it does not support cross-account assumption in the same way. Many estates use both.
Yes, unless you block it, and that is the most common gap in a workload identity deployment. A pod that can reach the instance metadata endpoint can request the node role’s credentials directly. Set the metadata hop limit to 1 so requests from pods are dropped, require IMDSv2, and add a network policy denying egress to the metadata address.
Only for cloud provider credentials, which is a large share of the problem but not all of it. Third-party API keys, database passwords, signing keys, and certificates still need somewhere to live. The usual pattern is to use workload identity to authenticate to a secrets manager, which then supplies the remaining values, so the only long-lived trust in the system is the cluster’s own identity.
Work from the cloud side rather than the cluster side. List every IAM role whose trust policy references your cluster’s OIDC provider, then check each condition for wildcards in the subject claim and for a missing audience condition. Cross-reference the subjects against service accounts that actually exist, since roles bound to deleted service accounts are a sign of configuration nobody is maintaining.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.