feat(gateway-target): allow GATEWAY_IAM_ROLE outbound auth on mcpServer / openApiSchema targets (iamCredentialProvider)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 50/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- aws, typescript
- Área
- authentication, cli, tooling
Línea de trabajo
Empieza con src/schema/schemas/mcp.ts y reproduce el problema con agentcore validate; después inspecciona el validador de flags y L3 buildCredentialConfig(). Comprueba también la tabla de Auth de --help y la lista de opciones de la TUI. La tarea estará terminada cuando la autenticación IAM se acepte y se emita correctamente para mcpServer y openApiSchema, se rechace donde no corresponda y el requisito de credenciales ya no se aplique a IAM ni a JWT passthrough.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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_CONFIGallowsGATEWAY_IAM_ROLEonmcpServerandopenApiSchema, withservicerequired there and rejected for Lambda / API Gateway / Smithy -
--signing-service/--signing-regionaccepted for these types, not justpassthrough - flag validator exempts
GATEWAY_IAM_ROLE/JWT_PASSTHROUGHfrom the credential requirement - L3
buildCredentialConfig()emits theiamCredentialProviderblock for these types (today it returnsundefinedoutside the passthrough branch — the #1005 failure shape) -
--helpAuth table and TUI option list updated
Additional Context
@aws/agentcore0.28.1,@aws/agentcore-cdk0.1.0-alpha.50,aws-cdk-lib2.261.0.- Reproduced at config /
validatelevel only; I haven't run a liveCreateGatewayTargetwith 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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 291
- Forks
- 96
- Merge medio
- 21 h 31 min
- PR fusionados (30 d)
- 217
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aws/agentcore-cli
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
aws/agentcore-cli#2395 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
aws/agentcore-cli#2392 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
aws/agentcore-cli#2267 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aws/agentcore-cli#2258 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aws/agentcore-cli#2176 ·
Todos los issues de aws/agentcore-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
bcgov/bc-wallet-mobile#4761 · 1 comentario ·
-
external-issue to-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
area-deployment area-integrations triage:bot-seen
Dificultad 2/5 Medio día Aptitud para principiantes 86/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100