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

feat(gateway-target): allow GATEWAY_IAM_ROLE outbound auth on mcpServer / openApiSchema targets (iamCredentialProvider)

Aperta
#2,245 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
50/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
aws, typescript

Direzione di ricerca

Inizia da src/schema/schemas/mcp.ts e riproduci il problema con agentcore validate, poi esamina il validatore dei flag e L3 buildCredentialConfig(). Controlla anche la tabella Auth di --help e l’elenco delle opzioni della TUI. Il lavoro è completato quando l’autenticazione IAM viene accettata ed emessa correttamente per mcpServer e openApiSchema, rifiutata dove non è appropriata e il requisito delle credenziali non si applica più a IAM o JWT passthrough.

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

Descrizione

Description

Gateway supports IAM outbound auth to MCP server and OpenAPI targets — the gateway signs with SigV4 via its service role. Per Set up outbound authorization for your gateway, these two target types take a GATEWAY_IAM_ROLE credential provider plus an iamCredentialProvider block (service required — bedrock-agentcore for MCP servers on AgentCore Runtime; region optional). Lambda / API Gateway / Smithy take the bare credentialProviderType with no iamCredentialProvider.

TARGET_TYPE_AUTH_CONFIG in src/schema/schemas/mcp.ts doesn't allow it: mcpServer is OAUTH | NONE, openApiSchema is OAUTH | API_KEY. Only passthrough gets GATEWAY_IAM_ROLE. So there's no way to put an IAM-auth MCP server hosted on AgentCore Runtime behind a gateway — it forces an OAuth provider in front of a runtime that already authenticates with SigV4.

It's a schema block, not just a missing flag — hand-editing agentcore.json fails too:

$ agentcore validate
  - agentCoreGateways[0].targets[0].outboundAuth:
    mcpServer targets do not support GATEWAY_IAM_ROLE outbound auth

Separately, the flag surface reports the wrong reason — the guard exempts only NONE, so GATEWAY_IAM_ROLE and JWT_PASSTHROUGH fall through into the OAuth credential requirement:

$ agentcore add gateway-target --type mcp-server --outbound-auth gateway-iam-role \
    --signing-service bedrock-agentcore ...
--credential-name or inline OAuth fields (--oauth-client-id, --oauth-client-secret,
--oauth-discovery-url) required when outbound auth type is gateway-iam-role
Acceptance Criteria
  • TARGET_TYPE_AUTH_CONFIG allows GATEWAY_IAM_ROLE on mcpServer and openApiSchema, with service required there and rejected for Lambda / API Gateway / Smithy
  • --signing-service / --signing-region accepted for these types, not just passthrough
  • flag validator exempts GATEWAY_IAM_ROLE / JWT_PASSTHROUGH from the credential requirement
  • L3 buildCredentialConfig() emits the iamCredentialProvider block for these types (today it returns undefined outside the passthrough branch — the #1005 failure shape)
  • --help Auth table and TUI option list updated
Additional Context
  • @aws/agentcore 0.28.1, @aws/agentcore-cdk 0.1.0-alpha.50, aws-cdk-lib 2.261.0.
  • Reproduced at config / validate level only; I haven't run a live CreateGatewayTarget with this shape.
  • Related: #1359 (same map, API_KEY). Note #1914/#1915 recorded "mcpServer supports only OAuth or none" — accurate to the validator, but the doc above allows IAM.
Lingua principale
TypeScript
Stelle
291
Fork
96
Merge medio
20h 50m
PR unite (30g)
214

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 aws/agentcore-cli

Tutte le issue di aws/agentcore-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.