Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

EMA leg 3 requires a resource-AS client secret, which blocks public clients the redeem already supports

オープン 初心者向け
#2,725 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript

調査の方向性

core/auth/ema/emaFlow.ts の mintEmaResourceTokens から始めて、redeemIdJagForAccessToken にある既存のパブリッククライアント向けの処理を追ってください。リソースクライアントのシークレットが空でないことを必須とする要件を削除し、リソースクライアント ID のチェックは維持してください。EMA が空のシークレットを使用して token_endpoint_auth_method: none で処理を進めることを完了条件とし、該当する認証テストがあれば確認してください。

索引モデルが issue の本文から書いたものです。

説明

mintEmaResourceTokens (core/auth/ema/emaFlow.ts) refuses to start the EMA mint unless resourceClientSecret is non-empty:

if (!config.resourceClientSecret?.trim()) {
  throw new Error(
    "EMA requires resource authorization server client secret in server OAuth settings (Test Client secret from xaa.dev resource registration)",
  );
}

But redeemIdJagForAccessToken, which it calls for leg 3, already handles a public client:

token_endpoint_auth_method: params.resourceClientSecret ? "client_secret_post" : "none"

So the guard rules out a case the redeem supports.

Impact: A resource authorization server that registers clients with token_endpoint_auth_method: none can't be used with EMA in Inspector. That covers any server that forces none at DCR, whatever the client asks for. The user gets an error pointing at xaa.dev, which isn't the resource AS in that case.

Reproduce (2.11.0):

  1. Register a client at a resource AS whose DCR returns token_endpoint_auth_method: none.
  2. In Server Settings, turn on Enterprise-managed authorization. Set Resource AS Client ID to that client and leave Resource AS Client Secret empty.
  3. Connect. It fails with EMA legs 2–3 (resource token mint): EMA requires resource authorization server client secret … before leg 2 runs.

Workaround: put any non-empty secret in the field. That only works if the AS ignores an unexpected client_secret on a public client. A strict AS would refuse it with invalid_client.

Suggested fix: drop the secret guard and keep only the resourceClientId check, so an empty secret goes through the existing none path. If a hint is still wanted, it belongs on an invalid_client response from the token endpoint, not before the request. The field's help text could also say the secret is optional for public clients.

主要言語
TypeScript
スター
11.1k
フォーク
1.5k
平均マージ
4時間 32分
マージ済み PR(30日)
136

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/inspector のほかの issue

modelcontextprotocol/inspector の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。