The traditional way for a workload to call a cloud API is to give it a long-lived access key, which then has to be stored, distributed, rotated and protected from leaks. Workload identity replaces that with federation. The platform running the workload, such as a Kubernetes cluster or a CI system, issues it a signed, short-lived token (usually an OIDC JSON Web Token) that says who it is. The cloud provider is configured to trust that issuer and to exchange tokens matching specific claims for temporary credentials of a chosen role. Nothing long-lived is stored in the workload.
Common implementations include IAM Roles for Service Accounts (IRSA) and EKS Pod Identity on AWS, Workload Identity Federation for GKE on Google Cloud, Microsoft Entra Workload ID on Azure, OIDC federation from CI systems such as GitHub Actions, and SPIFFE/SPIRE for platform-neutral identities.
How it is used in practice
In Kubernetes, a service account is annotated with, or bound to, the cloud role it may assume, and pods running as that service account receive a projected token that the cloud SDK exchanges automatically. In CI, a pipeline requests an OIDC token for a run and the cloud trusts tokens for a specific repository and branch. Security teams adopt workload identity to remove standing secrets from their estate and to make every cloud call attributable to a specific workload.
Common pitfalls
- Trust policies that are too broad. A role that trusts any service account in a cluster, or any branch of a repository, hands its permissions to far more workloads than intended.
- Removing secrets but not privilege. Federation fixes credential handling; the assumed role can still be over-privileged. Least privilege is a separate job.
- Default service accounts. A pod that names no service account runs as
default, and a binding on that account applies to every such pod. - Cross-namespace confusion. A same-named service account in another namespace is a different identity.
- Invisible mapping. If nobody records which workload holds which cloud role, the blast radius of a compromised pod is unknown.
How TrustIvan relates to it
When a Kubernetes cluster is connected, TrustIvan reads each service account's workload-identity annotation (IRSA's eks.amazonaws.com/role-arn, GKE's iam.gke.io/gcp-service-account and Azure's azure.workload.identity/client-id) and records the bound cloud identity on every workload that runs as it. It applies Kubernetes' own rules: a pod with no service account runs as default, and only a binding in the workload's own namespace counts. The three annotations are named explicitly rather than pattern-matched. In NHI Security's access analysis, a path through such an annotation is marked inferred rather than observed. See Cloud and Kubernetes.
Related terms
- Service account A service account is an identity created for an application, workload or automation to authenticate as, rather than for a person, and granted permissions through roles or bindings.
- Machine identity A machine identity is the cryptographic credential, such as an X.509 certificate, an SSH key or a signed workload token, that a device, server, container or service uses to prove what it is to other systems.
- Non-human identity (NHI) A non-human identity (NHI) is any identity that authenticates and acts without a person at the keyboard: a service account, IAM role, API key, OAuth application, CI/CD robot, workload identity or AI agent.
- Least privilege The principle of least privilege says that every user, process and machine identity should hold only the permissions it needs to do its job, and only for as long as it needs them.
- Credential rotation Credential rotation is the practice of replacing a secret, such as an API key, access key, token, password or certificate, with a new one and retiring the old, either on a schedule or in response to exposure.
Guides on Workload identity
- Kubernetes Admission Control for Image Provenance Sign container images in CI, attest how they were built, and refuse unsigned or unpinned images at admission with Kyverno and ValidatingAdmissionPolicy.
- Least Privilege for CI/CD Identities: GitHub Actions OIDC Replace long-lived cloud keys in CI with GitHub Actions OIDC, then scope the trust policy, the role and GITHUB_TOKEN so a pipeline can do only its own job.
On the platform: Identity graph. All glossary terms