Cloud & platform

Workload identity federation

Letting a workload exchange a token from its own platform (CI, Kubernetes, another cloud) for short-lived cloud credentials, with no stored keys.

With workload identity federation the cloud provider trusts an external OIDC issuer. A GitHub Actions job, a Kubernetes service account or a workload in another cloud presents a signed token; the provider checks issuer, audience and subject claims against a trust policy and returns temporary credentials (AWS AssumeRoleWithWebIdentity, GCP workload identity pools, Azure federated credentials).

It removes long-lived access keys from CI secrets, which have been behind many breaches, and gives every credential an expiry measured in minutes.

The trust policy is the whole control. Matching only on the issuer, or using a wildcard sub, lets any repository or any branch (including a fork's pull request) assume the role. Pin the repository, branch or environment, and the audience.

AWS trust policy condition for GitHub Actionsjson
"Condition": {
  "StringEquals": {
    "token.actions.githubusercontent.com:aud": "sts.amazonaws.com",
    "token.actions.githubusercontent.com:sub": "repo:acme/payments:ref:refs/heads/main"
  }
}

Learn it properly

Also used in

Related terms