id-token: write
The workflow permission that allows a job to request a GitHub OpenID Connect token.
In more detail
Without it the request variables ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN are not even set on the runner. Because a permissions block replaces the defaults, list any other permissions the job needs, such as contents: read, beside it.
Example
permissions:
contents: read
id-token: writeRelated terms
- workflow permissions — The workflow or job key that sets exactly what the GITHUB_TOKEN may do, such as contents: read.
- OpenID Connect — An identity layer on top of OAuth 2.0 that tells an application who signed in, using a signed ID token.
- configure-aws-credentials action — The AWS-maintained action that exchanges a job's OpenID Connect token for temporary credentials of a named role.
Taught in
- Keyless Authentication: OIDC to the Cloud — Continuous Integration & Continuous Delivery Pipelines
- GITHUB_TOKEN: Least Privilege, Job By Job — GitHub Actions (GH-200) Exam Prep
- OIDC: Cloud Access Without Stored Keys — GitHub Actions (GH-200) Exam Prep
- Supply Chain: Pinning, Trusted Actions And Attestations — GitHub Actions (GH-200) Exam Prep
- YAML-Reading Sprint: What Happens When This Runs? — GitHub Actions (GH-200) Exam Prep