[docs] auth: Document Copilot fine-grained PAT auth-prefix override and integration-ID fallback - #8055
Merged
Merged
Conversation
…d GITHUB_COPILOT_INTEGRATION_ID fallback Corrects docs/auth-matrix.md and docs/environment.md to reflect PR #8038 (Fix Copilot proxy auth and GHEC model discovery, merged 2026-09-02): - COPILOT_GITHUB_TOKEN values starting with github_pat_ (fine-grained PATs) now always use the Bearer auth prefix on every Copilot target (github.com, GHEC, GHES, Business), overriding the previous target-based token/Bearer selection that still applies to classic PATs and OAuth tokens. - Copilot-Integration-Id now also falls back to GITHUB_COPILOT_INTEGRATION_ID when COPILOT_INTEGRATION_ID is unset. - Cross-referenced the stronger fine-grained-PAT guarantee from the existing Classic PAT + COPILOT_MODEL remediation guidance in docs/environment.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The documentation accurately reflects the implementation and tests.
Pull request overview
Documents Copilot authentication behavior introduced by PR #8038.
Changes:
- Clarifies fine-grained PATs always use
Bearer. - Documents integration-ID fallback precedence.
File summaries
| File | Description |
|---|---|
docs/auth-matrix.md |
Updates Copilot authentication and integration-ID rules. |
docs/environment.md |
Expands fine-grained PAT remediation guidance. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
✅ Copilot review passed with no inline comments. @github-actions[bot] Add the |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git log),docs/auth-matrix.md,docs/environment.md,docs/authentication-architecture.md,docs/api-proxy-sidecar.md,docs/awf-config-spec.md,docs/github_actions.md,README.md, and the current-main implementation incontainers/api-proxy/providers/copilot.js,containers/api-proxy/providers/copilot-auth.js,src/services/api-proxy-env-config.ts, and their associated Jest test files.COPILOT_GITHUB_TOKEN, andCopilot-Integration-Idresolution order.docs/environment.md,docs/auth-matrix.md, anddocs/authentication-architecture.md— no changes needed there.Documentation Changes
docs/auth-matrix.mdCOPILOT_GITHUB_TOKENvalues prefixedgithub_pat_always use the Bearer auth prefix on every Copilot target (github.com, GHEC, GHES, Business), never falling back to thetoken <value>prefix that classic PATs/OAuth tokens require on GHEC/GHES/Business targets.Copilot-Integration-Iddescription and its attribution-headers table row to include theGITHUB_COPILOT_INTEGRATION_IDfallback (checked only whenCOPILOT_INTEGRATION_IDis unset).docs/environment.mdCOPILOT_MODELIncompatibility" section to note that fine-grained PATs now authenticate with a consistentBearerprefix across all Copilot targets (not just github.com), linking to the updateddocs/auth-matrix.mdsection.Validation
containers/api-proxy/providers/copilot-auth.js(getGitHubTokenAuthPrefix,isGithubCopilotCatalogTarget,isGhecCopilotApiTarget),containers/api-proxy/providers/copilot.js(integration-ID resolution, auth-prefix selection),src/services/api-proxy-env-config.ts(GITHUB_COPILOT_INTEGRATION_IDforwarding), and their test filescontainers/api-proxy/copilot-auth.test.js,containers/api-proxy/copilot-adapter-enterprise.test.js,src/services/api-proxy-env-config.test.ts— all confirm the shipped behavior onmain(merged via PR Fix Copilot proxy auth and GHEC model discovery #8038).https://github.com/github/gh-aw-firewall/pull/8038) resolve to a real merged PR; no markdownlint tooling was available offline (network-restricted sandbox), so structure was checked manually.ghp_,gho_,sk-,github_pat_<real value>) — only pre-existing placeholder/documentation strings and the genericgithub_pat_*pattern reference are present; no real credentials were added.Sources
400errors)Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
msfeed25.pkgs.visualstudio.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.