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
Additional Context
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_ROLEcredential provider plus aniamCredentialProviderblock (servicerequired —bedrock-agentcorefor MCP servers on AgentCore Runtime;regionoptional). Lambda / API Gateway / Smithy take the barecredentialProviderTypewith noiamCredentialProvider.TARGET_TYPE_AUTH_CONFIGinsrc/schema/schemas/mcp.tsdoesn't allow it:mcpServerisOAUTH | NONE,openApiSchemaisOAUTH | API_KEY. OnlypassthroughgetsGATEWAY_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.jsonfails too:Separately, the flag surface reports the wrong reason — the guard exempts only
NONE, soGATEWAY_IAM_ROLEandJWT_PASSTHROUGHfall through into the OAuth credential requirement: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 justpassthroughGATEWAY_IAM_ROLE/JWT_PASSTHROUGHfrom the credential requirementbuildCredentialConfig()emits theiamCredentialProviderblock for these types (today it returnsundefinedoutside the passthrough branch — the GatewayTarget creation fails for lambda (compute) targets #1005 failure shape)--helpAuth table and TUI option list updatedAdditional Context
@aws/agentcore0.28.1,@aws/agentcore-cdk0.1.0-alpha.50,aws-cdk-lib2.261.0.validatelevel only; I haven't run a liveCreateGatewayTargetwith this shape.API_KEY). Note add gateway-target --help lists api-key outbound auth for target types the validator rejects #1914/fix(add): correct gateway-target --help outbound auth per target type #1915 recorded "mcpServer supports only OAuth or none" — accurate to the validator, but the doc above allows IAM.