github / github/copilot-cli

MCP OAuth broken with agentgateway + Entra ID

Ouverte
#4,584 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

triage
Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
14 h 16 min
PR mergées (30 j)
6

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par le flux d’authentification OAuth de Copilot CLI MCP et reproduisez l’échec avec la configuration agentgateway Entra ID décrite dans l’issue. Comparez les versions 1.0.78, 1.0.80 et 1.0.81-8, puis vérifiez que l’authentification réussit tout en préservant le comportement de sécurité de l’issuer de l’authorization-server.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Domaine
api, authentication, cli
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
52/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.