MCP OAuth broken with agentgateway + Entra ID
Nessuno ha ancora preso questa issue.
- Lingua principale
- Shell
- Stelle
- 11.2k
- Fork
- 1.9k
- Merge medio
- 14h 16m
- PR unite (30g)
- 6
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Iniziare con il flusso di autenticazione OAuth di Copilot CLI MCP e riprodurre il problema con la configurazione agentgateway Entra ID descritta nell’issue. Confrontare le versioni 1.0.78, 1.0.80 e 1.0.81-8, quindi verificare che l’autenticazione abbia esito positivo preservando il comportamento di sicurezza dell’issuer dell’authorization-server.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Ambito
- api, authentication, cli
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 52/100