Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#2,725 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Inizia in core/auth/ema/emaFlow.ts, da mintEmaResourceTokens, e segui il percorso esistente per i client pubblici in redeemIdJagForAccessToken. Rimuovi il requisito che il secret del client di risorsa non sia vuoto, mantenendo però il controllo dell’ID del client di risorsa. Il lavoro è completato quando EMA procede con un secret vuoto usando token_endpoint_auth_method: none; verifica i test di autenticazione pertinenti, se presenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
11.1k
Fork
1.6k
Merge medio
4h 32m
PR unite (30g)
136

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di modelcontextprotocol/inspector

Tutte le issue di modelcontextprotocol/inspector

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.