BrainyBeeBrainyBee
ExploreBlogStart Studying
HomeDesigning and Implementing Microsoft DevOps Solutions (AZ-400)GitHub authentication
Lesson240 words

GitHub authentication

Implement and manage GitHub authentication

Three mechanisms, in descending order of preference.

MechanismIdentityLifetime
GITHUB_TOKENThe workflow run itselfExpires when the job ends
GitHub AppThe app installation, not a personShort-lived installation access token
Personal access tokenA human beingUntil it expires or is revoked

Start with GITHUB_TOKEN

Every workflow run gets one automatically. It is scoped to the repository, its permissions are declarable per workflow or job, and it expires when the job finishes — so there is no credential to store and nothing to rotate.

yaml
permissions: contents: read packages: write

Declaring permissions explicitly narrows the token. This is the cheapest security win in GitHub Actions: default permissions are broader than most jobs need.

When GITHUB_TOKEN is not enough

If a workflow needs permissions the automatic token cannot carry — acting across repositories, for instance — the documented options are to create a GitHub App and generate an installation access token within the workflow, or to store a personal access token as a secret.

Prefer the App. A PAT belongs to a person: it carries that person's access, breaks when they leave, and is a long-lived credential sitting in a secret store. An App is an identity in its own right with its own narrowly scoped permissions.

Primary sources

  • https://docs.github.com/en/actions/tutorials/authenticate-with-github_token
  • https://docs.github.com/en/actions/concepts/security/openid-connect
All Designing and Implementing Microsoft DevOps Solutions (AZ-400) Study Resources

Related Notes

  • Agent and runner infrastructure421 words
  • Agent and runner infrastructure — quick notes150 words
  • Alerting on pipeline events255 words
  • Alerting on pipeline events — quick notes94 words
  • Analyzing usage and application performance241 words
  • Analyzing usage and application performance — quick notes73 words
  • Appropriate access levels217 words
  • Appropriate access levels — quick notes85 words
  • Automating container scanning277 words
  • Automating container scanning — quick notes96 words
  • Automating documentation from Git history191 words
  • Automating documentation from Git history — quick notes55 words

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up.

Start Studying

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free
Designing and Implementing Microsoft DevOps Solutions (AZ-400) ResourcesExplore All HivesBlogHome

© 2026 BrainyBee. Free AI-powered exam prep.