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.
"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
- Cryptography you actually needSecEng · Foundations of Security EngineeringFree
- Identity: authentication, authorisation and tokensSecEng · Foundations of Security EngineeringFree
- Supply chain: trusting code you did not writeSecEng · Application Security & DevSecOpsFree
- Cloud IAM: least privilege that survives contact with teamsSecEng · Cloud & Platform SecurityPro
- Kubernetes security: hard to get in, harder to get outSecEng · Cloud & Platform SecurityPro
- Zero trust reference architectureSecEng · Advanced: Security Architecture at ScalePro
- Multi-tenant isolationSecEng · Advanced: Security Architecture at ScalePro
- Security metrics, SLOs and risk quantificationSecEng · Advanced: Security Architecture at ScalePro