MCP OAuth broken with agentgateway + Entra ID
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Copilot CLI MCP OAuth 認証フローから始め、issue に記載されている agentgateway Entra ID セットアップに対して失敗を再現します。1.0.78、1.0.80、1.0.81-8 の各バージョンを比較し、その後、authorization-server issuer の安全性の動作を維持したまま認証が成功することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 領域
- api, authentication, cli
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100