Protocol practice· Cloud & Workload Identity Members
Workload identity federation: a pipeline gets cloud access with no stored keys
Objective: Lumen Notes deploys from GitHub Actions to AWS with an access key pasted into the repository’s secrets two years ago. Replace it: let AWS trust GitHub’s own tokens, let only the production deploy job in, and make sure a pull request can’t deploy.
5 steps11 concepts 12 min
Where workload federation fitsNot sure? Which protocol?
What may this app do? · 6 labs
- OAuth
- Token exchange
- Workload federationYou are here
- JWT validation
- Just-in-time admin
- Conditional Access
What you’ll do
- 1Tell AWS to trust GitHub’s tokens. Every GitHub Actions job can ask GitHub for a short-lived OpenID Connect token that says which repository, branch and environment it’s running for.
- 2Decide which jobs may become the deploy role. The role notes-deploy can update the production service.
- 3Let the deploy job ask for its token. A job only gets a token if the workflow allows it.
- 4AWS checks the token and hands out credentials. The action sends GitHub’s token to AWS STS with AssumeRoleWithWebIdentity.
- 5A pull request tries to deploy. A contributor opens a pull request that changes the deploy workflow so it runs on pull requests too.