AWS bedrock-agentcore documentation change
Summary
Added security note about unique OAuth2 callback URLs and restructured steps to create credential provider before registering callback URL
Security assessment
The change explicitly documents how unique callback URLs prevent cross-provider replay and CSRF attacks during OAuth authorization, but doesn't indicate any specific security incident being fixed. It enhances documentation of existing security controls.
Diff
diff --git a/bedrock-agentcore/latest/devguide/identity-idp-facebook.md b/bedrock-agentcore/latest/devguide/identity-idp-facebook.md index 8a849e456..fab435cd7 100644 --- a//bedrock-agentcore/latest/devguide/identity-idp-facebook.md +++ b//bedrock-agentcore/latest/devguide/identity-idp-facebook.md @@ -15 +15,3 @@ Facebook can be configured as an AgentCore Identity credential provider for outb -**Step 1** +###### Note + +AgentCore Identity issues a unique OAuth2 callback URL for each credential provider you create. The unique callback URL enables session binding, which protects the OAuth2 authorization-code exchange against cross-provider replay and CSRF-style attacks by ensuring an authorization response can only be redeemed against the specific credential provider that initiated it. Because the URL is unique per provider, you won’t know it until **after** you call `CreateOauth2CredentialProvider`. Create your Facebook OAuth2 client first, then return to the Facebook developer console to register the callback URL once AgentCore Identity has issued it. @@ -17 +19,3 @@ Facebook can be configured as an AgentCore Identity credential provider for outb -Use the following procedure to set up a Facebook OAuth2 application and obtain the necessary client credentials for AgentCore Identity. +**Step 1: Create the Facebook OAuth2 client** + +Use the following procedure to set up a Facebook OAuth2 application and obtain the necessary client credentials for AgentCore Identity. You will register the redirect URI in Step 3, after AgentCore Identity issues the unique callback URL. @@ -53,3 +57 @@ If you don’t have an existing Facebook app, you will see a different option. C - 15. Enter the following redirect URL into **Valid OAuth Redirect URIs** : - - https://bedrock-agentcore.region.amazonaws.com/identities/oauth2/callback + 15. Leave the **Valid OAuth Redirect URIs** field empty for now — you will add the unique callback URL in Step 3. @@ -62 +64 @@ If you don’t have an existing Facebook app, you will see a different option. C -**Step 2** +**Step 2: Create the AgentCore Identity credential provider** @@ -77,0 +80,15 @@ To configure Facebook as an outbound resource provider, use the following: +The [CreateOauth2CredentialProvider](https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_CreateOauth2CredentialProvider.html) response includes a `callbackUrl` field. This URL is unique to this credential provider and looks like: `https://bedrock-agentcore.us-east-1.amazonaws.com/identities/oauth2/callback/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX`. Save this value for the next step. + +**Step 3: Register the unique callback URL with Facebook** + +Return to the Facebook developer console and add the unique callback URL to your OAuth2 application’s redirect URI list. + + 1. Sign in to the Facebook developer console and open the OAuth2 application you created in Step 1. + + 2. Add the `callbackUrl` value returned by `CreateOauth2CredentialProvider` to the application’s redirect URI configuration. + + 3. Save your changes. + + + +