Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

已关闭 适合新手
#2,725 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@cliffhall 已经在做这个了。

开始于 2026年10月20日。

  • #2736 来自 @cliffhall —— 已合并

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript

调研方向

从 core/auth/ema/emaFlow.ts 中的 mintEmaResourceTokens 开始,跟踪 redeemIdJagForAccessToken 中现有的公共客户端流程。移除资源客户端 secret 非空的要求,同时保留资源客户端 ID 检查。完成标准是 EMA 使用空 secret 和 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.6k
平均合并
5 小时 41 分钟
30 天内合并 PR
149

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/inspector 的其他 Issue

查看 modelcontextprotocol/inspector 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。