You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AWS Bedrock AgentCore always uses Pushed Authorization Request (PAR, RFC 9126) when performing OAuth 2.0 flows via get_resource_oauth2_token(). This creates an incompatibility with OAuth providers that don't support PAR, including:
Potentially other OAuth 2.0 providers that predate or don't implement PAR
When attempting USER_FEDERATION flow with non-PAR providers, the authorization fails with a generic ValidationException: Invalid request error, with no indication that PAR is the root cause.
Technical Details
What is PAR?
Pushed Authorization Request (RFC 9126, published October 2021) is a security enhancement to OAuth 2.0 where:
Authorization parameters are first POSTed to a pushed_authorization_request_endpoint
The provider returns a request_uri (opaque reference)
The authorization URL includes request_uri instead of direct parameters
The Issue:
AgentCore always uses PAR for OAuth flows (backend implementation)
There's no way to disable PAR via SDK parameters
OAuth providers without PAR support reject the request_uri parameter
Workaround
Currently no workaround exists for integrating with non-PAR OAuth providers via AgentCore's OAuth system. Options are limited to:
Using provider's API tokens directly (bypasses OAuth, but loses USER_FEDERATION benefits)
Implementing custom OAuth flow outside AgentCore (defeats purpose of integrated identity system)
Requesting OAuth provider add PAR support (not always feasible for third-party services)
This issue prevents legitimate OAuth 2.0 integrations from working with AgentCore. Adding PAR configurability would significantly expand the ecosystem of compatible OAuth providers while maintaining the enhanced security for providers that support PAR.
Description
AWS Bedrock AgentCore always uses Pushed Authorization Request (PAR, RFC 9126) when performing OAuth 2.0 flows via get_resource_oauth2_token(). This creates an incompatibility with OAuth providers that don't support PAR, including:
When attempting USER_FEDERATION flow with non-PAR providers, the authorization fails with a generic ValidationException: Invalid request error, with no indication that PAR is the root cause.
Technical Details
What is PAR?
Pushed Authorization Request (RFC 9126, published October 2021) is a security enhancement to OAuth 2.0 where:
The Issue:
Evidence:
request_access_tokendecorator and forIdentity.get_token#109: customParameters only adds params, cannot override core OAuth flow behavior.To Reproduce
1. Set up a non-PAR OAuth provider (example: Atlassian MCP)
a) Discover OAuth metadata:
curl https://mcp.atlassian.com/.well-known/oauth-authorization-server | jqOutput shows:
b) Register OAuth client:
2. Create AgentCore OAuth Provider
3. Attempt USER_FEDERATION flow
4. Observe the failure
Authorization URL printed:
https://auth.atlassian.com/authorize?client_id=sPRYGHC1shLGrbQ0&request_uri=urn:ietf:params:oauth:request_uri:Atza|...Key observation: URL contains request_uri parameter (PAR usage)
Error result:
ValidationException: Invalid requestWhat's really happening: MCP OAuth server rejects the request_uri parameter as unsupported, but AgentCore shows generic error (per #81: "We don't propagate errors from credential provider")
Impact
This limitation blocks integration with:
Many widely-used OAuth providers don't require PAR, as it's an optional security enhancement, not a core OAuth 2.0 requirement.
Suggested Solution:
Add PAR Disable Flag
Related Issues:
request_access_tokendecorator and forIdentity.get_token#109 - customParameters support for Auth0 (proves customParameters can't override PAR, only add params)Workaround
Currently no workaround exists for integrating with non-PAR OAuth providers via AgentCore's OAuth system. Options are limited to:
Using provider's API tokens directly (bypasses OAuth, but loses USER_FEDERATION benefits)
Implementing custom OAuth flow outside AgentCore (defeats purpose of integrated identity system)
Requesting OAuth provider add PAR support (not always feasible for third-party services)
Additional Context
Environment:
SDK Version: bedrock-agentcore-sdk-python (latest from GitHub)
Python Version: 3.12
Region: us-west-2
Documentation Checked:
This issue prevents legitimate OAuth 2.0 integrations from working with AgentCore. Adding PAR configurability would significantly expand the ecosystem of compatible OAuth providers while maintaining the enhanced security for providers that support PAR.