OAuth2 Discovery method fails because FastMCP with GoogleProvider (OAuth) returns issuerUrl with trailing slash
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
issue からリンクされている src/google/adk/auth/oauth2_discovery.py の OAuth2DiscoveryManager.discover_auth_server_metadata から始め、返された issuer が提供された URL とどのように比較されているかを確認してください。末尾にスラッシュを付けた discovery レスポンスを再現し、一致するメタデータが返されることを検証してください。FastMCP スタイルの issuer URL によって discovery が失敗しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The OAuth2DiscoveryManager.discover_auth_server_metadata function retrieves a remote MCP Server's discovery document, to initialize the tool's AuthScheme object.
The function compares the returned issuer URL to the provided issuer URL to defend against MIX-UP attacks (as documented):
if metadata.issuer == issuer_url.rstrip("/"):
However, if the returned issuer has a trailing slash ('/'), as is the case when using FastMCP and the GoogleProvider, the function fails to compare the issuer values and no metadata is returned.
The correct code should be:
if metadata.issuer.rstrip("/") == issuer_url.rstrip("/"):
This is an example of what FastMCP is returning when using SSE transport with a GoogleProvider:
{
"issuer": "http://localhost:8080/",
"authorization_endpoint": "http://localhost:8080/authorize",
"token_endpoint": "http://localhost:8080/token",
"registration_endpoint": "http://localhost:8080/register",
"scopes_supported": [
"openid",
"https://www.googleapis.com/auth/userinfo.email"
],
"response_types_supported": [
"code"
],
"grant_types_supported": [
"authorization_code",
"refresh_token"
],
"token_endpoint_auth_methods_supported": [
"client_secret_post",
"client_secret_basic",
"private_key_jwt",
"none"
],
"code_challenge_methods_supported": [
"S256"
],
"client_id_metadata_document_supported": true
}
- 主要言語
- Python
- スター
- 21.6k
- フォーク
- 4k
- 平均マージ
- 7時間 10分
- マージ済み PR(30日)
- 7
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google/adk-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
google/adk-python#7266 · コメント 1 件 ·
-
mcp
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
google/adk-python#7217 · コメント 3 件 · 担当者 1 名 ·
-
tools
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
google/adk-python#7206 · コメント 1 件 · 担当者 1 名 ·
-
request clarification tools
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
google/adk-python#7205 · コメント 2 件 · 担当者 1 名 ·
-
mcp request clarification
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
google/adk-python#7196 · コメント 2 件 · 担当者 1 名 ·
google/adk-python の issue をすべて見る
似ている issue
-
agent-ready documentation needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
instance instance add
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
searxng/searx-instances#939 · コメント 1 件 ·
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100