AWS bedrock-agentcore high security documentation change
Summary
Added detailed steps for configuring Auth0 OAuth2 application with AgentCore Identity, including security note about unique callback URLs preventing replay/CSRF attacks
Security assessment
The change explicitly mentions session binding protection against cross-provider replay and CSRF-style attacks through unique callback URLs. It documents a security control mechanism for OAuth2 authorization flows.
Diff
diff --git a/bedrock-agentcore/latest/devguide/identity-idp-auth0.md b/bedrock-agentcore/latest/devguide/identity-idp-auth0.md index 8370b99d2..00e3d6c99 100644 --- a//bedrock-agentcore/latest/devguide/identity-idp-auth0.md +++ b//bedrock-agentcore/latest/devguide/identity-idp-auth0.md @@ -76,0 +77,33 @@ Where `your-domain` is your Auth0 tenant domain (e.g., "dev-example.us.auth0.com +###### 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 Auth0 application first, then return to the Auth0 dashboard to register the callback URL once AgentCore Identity has issued it. + +**Step 1: Create the Auth0 application** + +Use the following procedure to set up an Auth0 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. + +**To configure an Auth0 OAuth2 application** + + 1. Sign in to your Auth0 dashboard. + + 2. Open **Applications** and choose **Create Application**. + + 3. Enter a name for your application and select **Regular Web Application** as the application type. + + 4. Choose **Create**. + + 5. On the application’s **Settings** tab, leave **Allowed Callback URLs** empty for now — you will add the unique callback URL in Step 3. + + 6. Configure any connections, scopes, and permissions necessary for your application. + + 7. Record the **Client ID** and **Client Secret** from the application settings. You’ll need these values to configure the Auth0 provider in AgentCore Identity. + + 8. Note your Auth0 tenant domain (for example, `dev-example.us.auth0.com`). You’ll use this to construct the authorization, token, and issuer endpoints in Step 2. + + + + +For more details, refer to [Auth0’s documentation on creating applications](https://auth0.com/docs/get-started/auth0-overview/create-applications). + +**Step 2: Create the AgentCore Identity credential provider** + @@ -93,0 +127,15 @@ To configure Auth0 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 Auth0** + +Return to the Auth0 dashboard and add the unique callback URL to your application’s allowed callbacks. + + 1. Sign in to your Auth0 dashboard and open the application you created in Step 1. + + 2. On the **Settings** tab, paste the `callbackUrl` value returned by `CreateOauth2CredentialProvider` into **Allowed Callback URLs**. + + 3. Choose **Save Changes**. + + + +