Interview Prep/GitHub Actions/OIDC & Cloud Authentication

A PR workflow intended to use the read-only role fails with AccessDenied, but `main` works.

IntermediateTroubleshootingOIDC & Cloud Authentication
Answer

Likely causes → PR token sub is repo:ORG/REPO:pull_request; the trust allows only the ref form. Or the PR is from a fork where OIDC tokens are not issued with write.

Diagnose → Decode claims; check fork status.

Fix → Add a separate role trusting repo:ORG/REPO:pull_request with read-only permissions.

Prevent → Document the four sub forms in your platform guide.

All GitHub Actions questions Roadmap: GitHub Actions

More on OIDC & Cloud Authentication