Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng Phù hợp với người mới
#2,725 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@cliffhall đang làm issue này rồi.

Từ ngày 20/10/2026.

  • #2736 của @cliffhall — đã merge

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
authentication, backend

Hướng nghiên cứu

Bắt đầu tại core/auth/ema/emaFlow.ts, ở mintEmaResourceTokens, rồi lần theo luồng hiện có dành cho client công khai trong redeemIdJagForAccessToken. Bỏ yêu cầu secret của resource client phải không rỗng, đồng thời giữ lại bước kiểm tra ID của resource client. Công việc hoàn tất khi EMA tiếp tục với secret rỗng bằng token_endpoint_auth_method: none; kiểm tra các bài kiểm thử xác thực liên quan nếu có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
11.1k
Fork
1.6k
Merge trung bình
5 giờ 41 phút
Pull request đã merge (30 ngày)
149

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelcontextprotocol/inspector

Tất cả issue của modelcontextprotocol/inspector

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.