MCP OAuth broken with agentgateway + Entra ID
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Shell
- Sterne
- 11.2k
- Forks
- 1.9k
- Ø Merge
- 14 Std. 16 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
Describe the bug
Earlier, https://github.com/github/copilot-cli/issues/4490 was closed but I tested with the 1.0.81 prerelease and for our case the same error persists:
Authentication failed: MCPOAuthError: Incompatible authorization server: authorization server advertised an issuer that does not match the URL its metadata was discovered from (RFC 8414 §3.3); refusing to connect
This issuer mismatch is introduced by https://github.com/agentgateway/agentgateway/pull/2408 that works around several MCP OAuth & Entra ID incompatibilities at the cost of introducing an authorization server discovery proxy.
This works fine with Copilot version 1.0.78. The error occurs with GitHub Copilot CLI 1.0.80 and GitHub Copilot CLI 1.0.81-8 preview.
Can you please implement a skipIssuerValidation configuration option to make this work again?
Affected version
GitHub Copilot CLI 1.0.81-8
Steps to reproduce the behavior
Try to authenticate to MCP server configured on agentgateway with Entra ID following the documentation.
The https://agentgateway.domain/.well-known/oauth-authorization-server/mcp resource returns the original Entra ID issuer:
"issuer": "https://login.microsoftonline.com/tenant-id/v2.0"
Expected behavior
Copilot can authenticate to MCP OAuth server with agentgateway authorization server proxy and Entra ID again.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit dem Copilot CLI MCP OAuth-Authentifizierungsablauf und reproduzieren Sie den Fehler mit der im Issue beschriebenen agentgateway Entra ID-Konfiguration. Vergleichen Sie die Versionen 1.0.78, 1.0.80 und 1.0.81-8 und überprüfen Sie anschließend, dass die Authentifizierung erfolgreich ist, während das Sicherheitsverhalten des Authorization-Server-Issuers erhalten bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Bereich
- api, authentication, cli
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 52/100