GitHub Actions OIDC: audience and subject
A trust decision
OIDC connects two decisions: the workflow can request an identity token, and the cloud provider decides whether that identity may receive credentials. A job with id-token: write is allowed to request the token. That setting alone does not grant cloud access.
Compare the expected audience and exact subject with the presented claims. In the fictional exercise, a token for a feature branch must not satisfy a production trust rule. GitHub’s OIDC reference documents immutable subject formats for repositories created after July 15, 2026, along with opt-in and migration cases. Check the repository’s actual format before copying a policy example.
Local and hosted evidence
The teaching model compares fictional audience and subject strings. It does not issue a signed token or exchange one with a cloud provider. A successful local policy check therefore proves only that the fixture matches its configured rule.
Continue with environment protection and approval rules. A matched identity still needs permission to perform the intended operation.