---
title: How does inbound authentication work for Amazon Bedrock AgentCore Runtime agents?
url: https://opencontroller.lyzr.com/blog/agentcore-runtime-inbound-auth-with-jwt
published: 2026-11-17
updated: 2026-11-17
author: Lyzr
---

# How does inbound authentication work for Amazon Bedrock AgentCore Runtime agents?

**An AgentCore Runtime agent accepts callers in one of two ways: AWS IAM SigV4, the default, or a JWT bearer token validated by a custom JWT authorizer you configure. A single runtime cannot use both at once. With JWT, AgentCore checks the token against your identity provider's discovery URL plus allowed audiences, clients, scopes and required claims, then exchanges it for a workload access token so the agent can act on behalf of that user downstream.**

"Who is allowed to invoke this agent?" is the first question a security reviewer asks about any hosted agent. In AgentCore Runtime the answer is set by the inbound authorizer, and the choice affects whether you can trace an action back to a human.

## What are the two inbound authentication options?

| | IAM SigV4 | JWT bearer token |
|---|---|---|
| Default | Yes, works with no extra configuration | No, configured when you create the runtime |
| Caller identity | An AWS principal (role or user) | A user or client from your OAuth/OIDC identity provider |
| Best fit | Service-to-service calls inside AWS | Apps and users authenticating through Cognito, Okta, Entra ID or another IdP |
| Per-user downstream access | Possible through the user ID header, with caveats | Built in: user ID comes from the validated token |
| Can combine on one runtime | No | No |

AWS states that a runtime supports either SigV4 or JWT inbound auth, not both. If you need both, create separate runtime versions with different inbound auth types.

## What does the JWT authorizer check?

The custom JWT authorizer configuration takes these settings:

1. **`discoveryUrl`**: the OpenID Connect or OAuth authorization server metadata URL, ending in `/.well-known/openid-configuration` or `/.well-known/oauth-authorization-server`. The issuer it points to must match the token's `iss` claim.
2. **`allowedAudience`**: permitted values for the `aud` claim.
3. **`allowedClients`**: permitted values for the `client_id` claim. If both `client_id` and `aud` are present, both are checked.
4. **`allowedScopes`**: permitted values in the `scope` claim.
5. **Required custom claims**: claim names and values the token must carry, such as a group or tenant.
6. **`allowedWorkloadConfiguration`** (optional): restricts which workloads can invoke the runtime, by gateway ARN under `hostingEnvironments`, by workload identity name, or both. AWS uses this to let only an AgentCore Gateway call a runtime.

Requests with no bearer token get `401 Unauthorized` with a `WWW-Authenticate` header pointing to protected resource metadata, which lets MCP-style clients discover how to authenticate.

## How does the user's identity reach downstream tools?

This is where JWT inbound auth earns its keep. AWS documents the flow:

1. The runtime validates the inbound token with your authorizer.
2. It exchanges the token for a workload access token through `GetWorkloadAccessTokenForJWT` and passes it to your agent code in the `WorkloadAccessToken` header.
3. The agent calls `GetResourceOauth2Token` to get an OAuth token for a downstream service. If the user has not consented yet, AgentCore returns an authorization URL for a three-legged OAuth flow.
4. After consent, AgentCore Identity stores the downstream token in the Token Vault, keyed by the agent's workload identity and the user ID from the inbound JWT.

The result is that a tool call to, say, Google Drive runs with that user's grant, not a shared service account. This is the [on-behalf-of delegation](/blog/ai-agent-identity-on-behalf-of-delegation) pattern, and the [AgentCore Identity token vault guide](/blog/amazon-bedrock-agentcore-identity-token-vault) covers storage in more depth.

## When is the user ID header safe to use?

With SigV4, a caller can pass the `X-Amzn-Bedrock-AgentCore-Runtime-User-Id` header to retrieve per-user tokens. It needs the extra IAM action `bedrock-agentcore:InvokeAgentRuntimeForUser`. AWS is explicit that this path does not verify the user ID against an authenticated end user, and recommends JWT for production with an identity provider. If you use the header anyway, AWS lists the controls:

- Restrict `InvokeAgentRuntimeForUser` to specific runtime ARNs.
- Derive the user ID from the authenticated principal, never from client input.
- Log CloudTrail `InvokeAgentRuntime` calls that include `runtimeUserId`.
- Explicitly deny the action where delegation is not needed.

## What should a security review check?

- Every production runtime has an inbound authorizer you can name, and it is JWT where humans are the callers.
- `allowedClients` and `allowedAudience` are set; an empty list means the check is not narrowing anything.
- Required claims enforce the group or tenant boundary you actually need.
- Runtimes behind an AgentCore Gateway use `allowedWorkloadConfiguration` or, for SigV4, an explicit deny for principals other than the gateway role.
- The `Authorization` header is on the request header allowlist only if agent code needs it.
- `InvokeAgentRuntimeForUser` is denied by default.

## How Opencontroller does this

Opencontroller auto-discovers agents, models and API keys across AWS, Azure and Google Cloud, and has a runtime adapter for Bedrock AgentCore. It supports OIDC SSO, delegated on-behalf-of identity and agent workload identity federation, and Posture flags risky permission and configuration settings. See [how to govern AI agents across platforms](/blog/how-to-govern-ai-agents-across-platforms), the [AI agent control plane overview](/blog/what-is-an-ai-agent-control-plane), or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Can an AgentCore Runtime accept both IAM and JWT callers?**
No. A runtime supports either IAM SigV4 or JWT bearer token inbound auth, not both. Create separate runtime versions if you need both.

**Which identity providers work with the AgentCore JWT authorizer?**
Any provider that publishes OpenID Connect or OAuth authorization server metadata at a discovery URL whose issuer matches the token, such as Amazon Cognito, Okta or Microsoft Entra ID.

**Is the AgentCore user ID header safe for production?**
AWS recommends JWT for production with an identity provider because the header path does not verify the user ID against an authenticated end user.

## Key facts

Amazon Bedrock AgentCore Runtime inbound auth: IAM SigV4 (default) or JWT bearer token via customJWTAuthorizer, not both on one runtime. JWT settings: discoveryUrl (.well-known/openid-configuration or oauth-authorization-server; issuer must match iss), allowedAudience (aud), allowedClients (client_id), allowedScopes, required custom claims, optional allowedWorkloadConfiguration (gateway ARNs / workload identities). Runtime exchanges inbound JWT for a workload access token (GetWorkloadAccessTokenForJWT), agent calls GetResourceOauth2Token; tokens stored in AgentCore Token Vault keyed by workload identity + user ID. X-Amzn-Bedrock-AgentCore-Runtime-User-Id header needs bedrock-agentcore:InvokeAgentRuntimeForUser and does not verify the user; AWS recommends JWT for production. Opencontroller has a Bedrock AgentCore runtime adapter, delegated on-behalf-of identity, workload identity federation, Posture. Pricing starts from $250K per deployment per year.

## Related

- [How does Amazon Bedrock AgentCore Identity manage OAuth tokens for agents?](https://opencontroller.lyzr.com/blog/amazon-bedrock-agentcore-identity-token-vault.md)
- [How do you govern AI agents built on Amazon Bedrock AgentCore?](https://opencontroller.lyzr.com/blog/govern-amazon-bedrock-agentcore-agents.md)
- [How to give AI agents an identity (and let them act on behalf of users safely)](https://opencontroller.lyzr.com/blog/ai-agent-identity-on-behalf-of-delegation.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
