Skip to content

[docs] auth: GHEC Copilot auth header prefix corrected to token - #7120

Merged
lpcox merged 3 commits into
mainfrom
docs/auth-ghec-token-prefix-f2084f147d97329d
Aug 9, 2026
Merged

[docs] auth: GHEC Copilot auth header prefix corrected to token#7120
lpcox merged 3 commits into
mainfrom
docs/auth-ghec-token-prefix-f2084f147d97329d

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Documentation Changes

  • docs/auth-matrix.md: Updated the GHEC (*.ghe.com) row in the "GitHub OAuth Token (Standard)" table, the "Auth Header Prefix Rules" table, and the accompanying prose notes to state the auth header uses the token <value> prefix (not Bearer) for the derived GHEC data-residency Copilot target copilot-api.<subdomain>.ghe.com. This matches the fix merged in PR fix(api-proxy): correct auth prefix for derived GHEC Copilot targets #6991 (fix(api-proxy): correct auth prefix for derived GHEC Copilot targets), which found the enterprise/business-style 400 Bad Request behavior also applies to GHEC targets and added isGhecCopilotApiTarget() to copilotTargetRequiresGitHubTokenPrefix() in containers/api-proxy/providers/copilot-auth.js.

Validation

  • Implementation/tests checked: containers/api-proxy/providers/copilot-auth.js (copilotTargetRequiresGitHubTokenPrefix, isGhecCopilotApiTarget), copilot-adapter-enterprise.test.js, copilot-auth.test.js, server.auth-matrix.test.js — all confirm the token prefix is now used for copilot-api.*.ghe.com targets on main.
  • Cross-checked docs/authentication-architecture.md for GHEC/OIDC claims — no stale text found there.
  • Markdown structure and tables reviewed; only the specific stale cells/prose sentences were changed, no unrelated edits.
  • Diff reviewed for credential/token/JWT content — none present; only documentation prose about header-prefix behavior.

Sources

Generated by Auth Doctor Updater · auto · 84.5 AIC · ⊞ 11.5K ·

PR #6991 fixed the GHEC data-residency Copilot target (copilot-api.<subdomain>.ghe.com)
to require the 'token' Authorization prefix instead of 'Bearer', matching the
enterprise and business targets' behavior. The auth matrix documentation still
described GHEC as using 'Bearer', which is now stale.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added ai-generated documentation Improvements or additions to documentation labels Aug 8, 2026
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Documentation Preview

Documentation build failed for this PR. View logs.

Built from commit 431d3c6

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns Copilot authentication documentation with GHEC behavior introduced in #6991.

Changes:

  • Documents token <value> for derived GHEC targets.
  • Updates authentication-prefix tables and explanatory notes.
Show a summary per file
File Description
docs/auth-matrix.md Corrects GHEC Copilot authorization-prefix guidance.

Review details

Tip

Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Suppressed comments (1)

docs/auth-matrix.md:383

  • “Standard prefix” is not defined here, and the preceding note describes both Bearer and token as generally accepted formats. Keep the exact Bearer prefix stated by the table so this summary cannot be interpreted as target-dependent.
The `token` prefix is used for GitHub OAuth tokens on the derived GHEC data-residency, enterprise, and business Copilot targets, or when GHES is otherwise detected (see `copilotTargetRequiresGitHubTokenPrefix()` in `copilot-auth.js`). BYOK and OIDC always use the standard prefix. As noted above, this is AWF-implementation-specific behavior driven by observed `400` errors from those targets — not a general GitHub REST API requirement.
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread docs/auth-matrix.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

✅ Copilot review passed with no inline comments.

@github-actions[bot] Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Build Test Suite completed successfully!

Generated by Build Test Suite for #7120

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

Warning

Firewall blocked 5 domains

The following domains were blocked by the firewall during workflow execution:

  • msfeed12.pkgs.visualstudio.com
  • msfeed17.pkgs.visualstudio.com
  • msfeed2.pkgs.visualstudio.com
  • msfeed25.pkgs.visualstudio.com
  • registry.npmjs.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "msfeed12.pkgs.visualstudio.com"
    - "msfeed17.pkgs.visualstudio.com"
    - "msfeed2.pkgs.visualstudio.com"
    - "msfeed25.pkgs.visualstudio.com"
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Gemini completed. All facets verified. 💎

Gemini Smoke Test PASS: MCP(✅), Connectivity(✅), File(✅), Bash(✅)

💎 Faceted by Smoke Gemini

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Docker Sbx

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅

📡 OTel tracing validated by Smoke OTel Tracing

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Contribution Check completed successfully!

Contribution check complete: the PR updates documentation only and matches CONTRIBUTING.md requirements; no missing tests, docs, or file-organization issues found.

Generated by Contribution Check for #7120

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Claude passed

Generated by Smoke Claude for #7120

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Gemini completed. All facets verified. 💎

Smoke test completed with FAIL status due to connectivity issues.

💎 Faceted by Smoke Gemini

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Docker Sbx

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

Warning

Firewall blocked 5 domains

The following domains were blocked by the firewall during workflow execution:

  • msfeed12.pkgs.visualstudio.com
  • msfeed17.pkgs.visualstudio.com
  • msfeed2.pkgs.visualstudio.com
  • msfeed25.pkgs.visualstudio.com
  • registry.npmjs.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "msfeed12.pkgs.visualstudio.com"
    - "msfeed17.pkgs.visualstudio.com"
    - "msfeed2.pkgs.visualstudio.com"
    - "msfeed25.pkgs.visualstudio.com"
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Contribution Check completed successfully!

PR #7120 follows CONTRIBUTING.md: the change is documentation-only with a small test expectation update, the description is clear and references related PRs/issues, and files are in the correct docs/tests locations. No missing guideline items found.

Generated by Contribution Check for #7120

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Claude passed

Generated by Smoke Claude for #7120

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Build Test Suite completed successfully!

Generated by Build Test Suite for #7120

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅

📡 OTel tracing validated by Smoke OTel Tracing

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Test: Copilot BYOK (Direct) Mode

MCP PRs: #7146 Upgrade gh-aw extension to latest pre-release and recompile workflows; #7124 Update Runner Doctor with C9 and B20 failure modes

  • ✅ GitHub MCP connectivity
  • ✅ GitHub.com connectivity (HTTP 200)
  • ✅ File write/read test
  • ✅ BYOK inference test

Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy → api.githubcopilot.com

Overall: PASS

cc @lpcox

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Test: Claude Engine Validation

Check Status
API ✅ PASS
gh CLI ✅ PASS
File ✅ PASS

Overall result: PASS

Generated by Smoke Claude for #7120 · haiku45 · 55 AIC · ⊞ 3.6K ·
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

EGRESS_RESULT allow=pass deny=pass

✅ Allowed domain (github.com) reachable: allowed=200
✅ Non-allowed domain (example.com) blocked: denied=000 (403 CONNECT tunnel failure)

Overall: PASS

cc @lpcox

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Test: Copilot Engine@lpcox

Overall: PASS

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Test Results:

  • Redis PING: ❌ (Temporary failure in name resolution)
  • PostgreSQL pg_isready: ❌ (no response)
  • PostgreSQL SELECT 1: ❌ (could not translate host name)

Overall: FAILhost.docker.internal DNS resolution failed in sandbox; no service reachable.

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Test: API Proxy OTel Tracing

  • Scenario 1 (Module Loading): otel.js loads successfully, exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled.
  • Scenario 2 (Test Suite): 68/68 tests passed across otel.test.js, otel-fanout.test.js, otel-workload-identity.test.js (3 suites, 0 failures).
  • Scenario 3 (Env Var Forwarding): env-passthrough.ts forwards GITHUB_AW_OTEL_TRACE_ID/GITHUB_AW_OTEL_PARENT_SPAN_ID/COPILOT_OTEL_FILE_EXPORTER_PATH to the agent; api-proxy-env-config.ts forwards OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, trace/parent-span IDs, and OTEL_SERVICE_NAME into api-proxy.
  • Scenario 4 (Token Tracker Integration): onUsage callback confirmed in token-tracker-http.js as the OTEL hook point (invoked with normalized usage + model after extraction).
  • Scenario 5 (OTEL Diagnostics): /tmp/gh-aw/otel.jsonl contains an exported span (gh-aw.agent.setup) confirming the exporter path works; no api-proxy LLM spans present since this run made no proxied LLM calls — expected, not a failure.

Overall: All 5 scenarios pass.

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@lpcox
lpcox deployed to aoai-model August 9, 2026 16:15 — with GitHub Actions Active
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Gemini Engine Smoke Test Results

  • GitHub MCP Testing: ✅ (Tool functional; results filtered by secrecy policy)
  • GitHub.com Connectivity: ❌ (HTTP 000 - Connection failed)
  • File Writing Testing: ✅ (Verified)
  • Bash Tool Testing: ✅ (Verified)

Overall Status: FAIL

💎 Faceted by Smoke Gemini
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Chroot Version Comparison Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.13 Python 3.12.13 ✅ YES
Node.js v24.18.0 v22.23.2 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall: FAILED — Node.js version mismatch between host and chroot environment. smoke-chroot label not applied since not all runtime versions matched.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Test

  • PR title: [docs] auth: GHEC Copilot auth header prefix corrected to token
  • Queried PRs: Drive Google provider adapters (Gemini, Vertex) from declarative specs; [WIP] Add support for allow-host-ports in services without legacy security
  • Last merged PRs: Upgrade gh-aw extension to latest pre-release and recompile workflows; Update Runner Doctor with C9 and B20 failure modes
  • gh reads: ✅
  • Playwright title check: ✅
  • File write/read: ✅
  • Discussion step: ❌ blocked
  • npm ci && npm run build: ❌ (403 on yocto-queue-0.1.0.tgz)
  • Overall: FAIL

Warning

Firewall blocked 5 domains

The following domains were blocked by the firewall during workflow execution:

  • msfeed12.pkgs.visualstudio.com
  • msfeed17.pkgs.visualstudio.com
  • msfeed2.pkgs.visualstudio.com
  • msfeed25.pkgs.visualstudio.com
  • registry.npmjs.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "msfeed12.pkgs.visualstudio.com"
    - "msfeed17.pkgs.visualstudio.com"
    - "msfeed2.pkgs.visualstudio.com"
    - "msfeed25.pkgs.visualstudio.com"
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia 1/1 passed ✅ PASS
Bun hono 1/1 passed ✅ PASS
C++ fmt N/A ✅ PASS
C++ json N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world N/A (ran ok) ✅ PASS
.NET json-parse N/A (ran ok) ✅ PASS
Go color passed ✅ PASS
Go env passed ✅ PASS
Go uuid passed ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx passed ✅ PASS
Node.js execa passed ✅ PASS
Node.js p-limit passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — PASS

Notes:

  • Java builds initially failed with LocalRepositoryNotAccessibleException because ~/.m2/repository is not writable in this environment; retried with -Dmaven.repo.local=/tmp/m2-repo and both projects then compiled and passed tests successfully. No firewall-related failures observed.

Generated by Build Test Suite for #7120 · auto · 64.3 AIC · ⊞ 11.5K ·
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Smoke Test: Docker Sbx Validation

  • MCP connectivity: ✅ (PR data matches pre-fetched, though live PR fetch filtered by secrecy policy)
  • GitHub.com HTTP: ✅ (200)
  • File write/read: ✅ (verified smoke-test-docker-sbx-31323171109.txt)

Pre-fetched PRs: #7146 (by @lpcox), #7124 (by @app/copilot-swe-agent)

Overall: PASS

cc @lpcox

📰 BREAKING: Report filed by Smoke Docker Sbx
Add label ready-for-aw to run again

@lpcox
lpcox merged commit c6964bd into main Aug 9, 2026
136 of 139 checks passed
@lpcox
lpcox deleted the docs/auth-ghec-token-prefix-f2084f147d97329d branch August 9, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants