D5: GITHUB_TOKEN, PATs & OIDC
GH-200 GitHub Actions exam practice questions · 11 flashcards
Question
GITHUB_TOKEN lifecycle?
1 / 11
Tip: Space flips the card, ← / → navigate.
Show all 11 GITHUB_TOKEN, PATs & OIDC practice questions and answers
- GITHUB_TOKEN lifecycle?Created per job, scoped to the repo, expires when job ends (or max 24h).
- GITHUB_TOKEN vs PAT?GITHUB_TOKEN: automatic, ephemeral, repo-scoped. PAT: user-tied, long-lived, broader — use only when needed.
- Restricting write scopes?permissions: contents: read etc.; default read-only.
- When need PAT/GitHub App token?Cross-repo access or triggering other workflows.
- GitHub App token in workflows?actions/create-github-app-token for scoped, short-lived cross-repo access.
- OIDC in Actions?Workflow obtains a signed JWT from GitHub's OIDC provider to exchange for cloud credentials.
- OIDC permission?permissions: id-token: write.
- OIDC claims?sub (repo:org/repo:ref:refs/heads/main or environment), aud, repository, ref, job_workflow_ref.
- Cloud trust config?AWS IAM OIDC provider/role, Azure federated credential, GCP Workload Identity Federation.
- Benefit of OIDC?No long-lived cloud secrets stored in GitHub.
- Scenario: deploy to AWS without storing access keys. Approach?OIDC with configure-aws-credentials and role trust on sub claim.