Framework guideLast checked 16 October 2026 with AI-assisted research. Editor: Akshay Dubey.Corrections logEditorial policy
On this page
  1. How the exchange works
  2. Three implementations compared
  3. What federation removes, and what it does not
  4. Trust configuration checklist
  5. Evidence that federation is in place
  6. FAQ
  7. Sources

Workload identity federation lets a workload authenticate to a target platform with a token from an identity provider it already has, such as GitHub Actions, a Kubernetes cluster or another cloud, and receive short-lived credentials in exchange. No long-lived key is stored or copied. The security of the arrangement then depends on how narrowly the target trusts that token.

This page explains the mechanism, compares the three main cloud implementations, and sets out what federation removes and what it leaves in place. It ends with a trust configuration checklist with acceptance criteria. Provider facts are from official documentation read on 10 October 2026; the checklist is our suggestion. The identity here is the workload's role, managed identity or service account; the tokens exchanged are credentials.

How the exchange works

  1. Trust is configured once. An administrator registers the external issuer with the target platform and states which tokens it accepts: issuer, audience, and claims such as the subject.
  2. The workload gets a token from its own issuer. For example, a GitHub Actions job requests an OIDC token from GitHub, or a pod receives a projected service account token from its cluster.
  3. The workload presents the token to the target's token service. In AWS this is the AssumeRoleWithWebIdentity call to AWS STS, which does not itself require AWS credentials. Google describes its implementation as following the OAuth 2.0 token exchange model through its Security Token Service.
  4. The target validates the token. It checks the signature against the issuer's published keys, then evaluates the configured conditions against the token's claims. This step is the only point at which your configuration decides who is let in.
  5. Short-lived credentials are returned. They are scoped to the role, managed identity or service account named in the trust, and they expire.

The OAuth building blocks behind this, including token exchange, are covered in OAuth for non-human identity. For workload-to-workload identity rather than workload-to-cloud, see SPIFFE and SPIRE.

Three implementations compared

AspectAWSMicrosoft EntraGoogle Cloud
Trust objectIAM OIDC identity provider plus the role's trust policyFederated identity credential on a user-assigned managed identity or an app registrationWorkload identity pool and provider
How tokens are matchedCondition keys in the trust policy, for example the issuer's :aud and :sub keysissuer, subject and audience must match the token case-sensitivelyAttribute mappings, plus an attribute condition (a CEL expression) that accepts or rejects the credential
Built-in guard railFor GitHub's issuer, IAM rejects a trust policy whose sub condition is missing or only a wildcard, checked when the policy is created or updatedStandard credentials match exactly. A flexible federated identity credential (in preview) uses a claimsMatchingExpression that can include wildcard patterns with the matches operator; for GitHub it must also match repository_id, repository_owner_id or bothGoogle warns that granting access to all identities in a pool can incur risk
Credential lifetimeSession from 15 minutes up to the role maximum of 1 to 12 hours; one hour by defaultNot stated on the pages we readShort-lived service account access tokens expire after one hour by default
Issuer key handlingAWS verifies the issuer's TLS certificate against its own library of trusted root CAs; thumbprints are optional and used only if that is not possibleMicrosoft stores only the first 100 signing keys downloaded from the issuerNot covered here
Where the exchange is loggedCloudTrail records AssumeRoleWithWebIdentity with subjectFromWebIdentityTokenService principal or managed identity sign-in logsCloud Audit Logs; IAM creates an audit entry each time a principal creates short-lived credentials

What federation removes, and what it does not

It removes the stored secret. There is no access key, client secret or service account key to hold in a CI variable, a config file or a developer's laptop, and so none to rotate or leak. This addresses OWASP NHI7 Long-Lived Secrets directly. AWS, Microsoft and Google each describe federation as removing the need for, or the burden of, managing such keys.

It does not remove:

  • Token theft within the lifetime. A token or session credential taken from a running job can be used until it expires. Short lifetimes limit this; they do not prevent it.
  • Trust misconfiguration. OWASP NHI6 warns that trusting a public provider such as GitHub or GitLab without restricting the sub claim can let any user on that platform assume the role. In our view, an unreviewed trust policy can be worse than a well-managed key, because its exposure is to a whole platform rather than to whoever holds one key.
  • Standing permissions. Federation changes the credential, not the authority. The role or service account behind the trust keeps whatever permissions it has. That is why federation alone is not zero standing privilege, which concerns permissions granted only when needed.
  • Dependence on the issuer. If the external issuer, or the pipeline that can request its tokens, is compromised, the target accepts the tokens it mints. In our view the issuer belongs in your third-party risk register (OWASP NHI3).

Trust configuration checklist

The checks below are our suggestion. Each is written so it can be tested from the trust configuration itself, which should live in version control.

CheckWhy it mattersAcceptance criterion
Subject pinnedThe subject identifies which workload may use the trustEvery trust names exact subjects (repository and branch or environment; namespace and service account). Wildcards appear only with a recorded exception
Audience checkedConfirms the token was minted for this targetEvery trust checks audience; no trust relies on audience alone
Issuer exactPrevents tokens from an unintended issuerIssuer URL matches exactly; no shared or test issuers in production trusts
Subject format currentGitHub announced on 23 April 2026 that repositories created, renamed or transferred from 15 July 2026 use an immutable subject format with owner and repository IDs (an update of 10 June 2026 changed the delimiter before each ID from "-" to "@"); existing repositories keep the old format unless they opt inEach GitHub trust is written for the format the repository actually issues, and opt-in changes are coordinated with trust updates
One identity per workloadSharing one role across pipelines destroys attribution (OWASP NHI9)No role or service account is trusted by unrelated workloads
Environments separatedA test pipeline should not reach production (OWASP NHI8)Production roles trust only production branches or environments with required reviewers
Session length minimalShorter sessions reduce the value of a stolen credentialMaximum session duration is set to what the job needs, not the platform maximum
Owner recordedSomeone must answer for the trust and the permissions behind itNamed owner and owning team recorded on the role, identity or pool
Checked in CITrust policy drift is silentA policy-as-code check fails the build on missing or wildcard subject conditions

A worked example with Terraform and a CI check is on GitHub Actions to AWS with OIDC. Cloud-side governance across all three providers is on cloud workload identity governance, and pod-to-cloud federation on Kubernetes service account governance.

Evidence that federation is in place

For an audit or a customer security review, in our interpretation these records show that federation is operating, not just designed:

  • An export of trust configurations (trust policies, federated identity credentials, pool providers) with their subject conditions, from version control or the platform.
  • The CI check output from the period, showing it ran and passed.
  • Logs of the exchanges: CloudTrail AssumeRoleWithWebIdentity events with the subject, Entra sign-in entries for the identity, or Google audit entries for short-lived credential creation.
  • An inventory showing no stored keys for the federated workloads, and the deactivation dates of the keys federation replaced.

Which control frameworks such evidence supports is mapped in the NHI evidence catalogue.

Frequently asked questions

What is workload identity federation?

It lets a workload use a token from an identity provider it already has, such as GitHub Actions, a Kubernetes cluster or another cloud, to obtain short-lived credentials from a target platform. No long-lived key is stored. AWS, Microsoft Entra and Google Cloud each implement it with their own trust objects.

Is workload identity federation more secure than access keys?

It removes the stored secret, which addresses long-lived secret risk (OWASP NHI7). It does not prevent theft of a token within its lifetime, does not reduce the permissions behind the trust, and moves risk into the trust configuration, which must restrict the subject and audience.

How long do federated credentials last?

It depends on the platform. AWS AssumeRoleWithWebIdentity sessions last from 15 minutes up to the role maximum of 1 to 12 hours, one hour by default. Google short-lived service account access tokens expire after one hour by default.

Is workload identity federation the same as zero standing privilege?

No. Federation replaces a long-lived credential with short-lived ones. Zero standing privilege concerns permissions: granting them only for a task and removing them after. A federated role with permanent broad permissions still has standing privilege.

What decides what a federated workload can access?

The permissions of the role, managed identity or service account named in the trust. Federation only decides which external tokens may obtain short-lived credentials for that identity; it does not narrow the identity's permissions. Review the trust conditions (issuer, subject, audience) and the permissions behind them as two separate controls.

How do on-premises workloads get AWS credentials without access keys?

AWS IAM Roles Anywhere issues temporary IAM credentials to servers, containers and applications running outside AWS that present an X.509 certificate from your certificate authority. A trust anchor points to AWS Private CA or an external CA, and a profile sets which roles can be assumed and can apply a session policy. In our view the certificate's private key then becomes the secret to protect.

Sources

From the publisher

HumanAudit, which publishes this site, is preparing the NHI Governance pack: an NHI policy, ownership register, lifecycle procedures and one control set mapped, as our interpretation, to PCI DSS v4.0.1, ISO/IEC 27001:2022, NIS2 and DORA. Planned for March 2027; not yet on sale, and no price has been published.

Monthly change log

Know when the NHI landscape changes.

One email a month from this reference: new deals, standards status changes and corrections. No sponsored content. Unsubscribe from any email.

We first email you a link to confirm. Privacy policy.