AI Cloud Architect

Secure AI agents with Amazon Bedrock AgentCore Identity on Amazon ECS

AWSHow-to by Julian Grüber, Satveer Khurpa and Tobias NicklAWS Artificial Intelligence Blog

AI agents in production require secure access to external services. Amazon Bedrock AgentCore Identity, available as a standalone service, secures how your AI agents access external services whether they run on compute platforms like Amazon ECS, Amazon EKS, AWS Lambda, or on-premises. This post implements Authorization Code Grant (3-legged OAuth) on Amazon ECS with secure session binding and scoped tokens.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

Shows how to run AI agents on Amazon ECS with OAuth 2.0 Authorization Code Grant, a customer-hosted session binding endpoint, and per-user scoped tokens from AgentCore Identity.

Who it is for

Teams running self-hosted AI agents on ECS that need user-delegated access to third-party services like GitHub.

Key points

  • Uses Microsoft Entra ID as the OIDC identity provider; other OIDC providers are said to work.
  • ALB OIDC flow is incompatible with GetWorkloadAccessTokenForJWT, so the post uses GetWorkloadAccessTokenForUserId instead.
  • Session binding protects against CSRF and browser-swapping attacks by matching user IDs across both services.
  • AgentCore Identity refreshes tokens automatically when a refresh token is issued; otherwise the user must re-authorize.

The same at other vendors

Timeline

Posts about Amazon Bedrock AgentCore Identity, oldest first.

  1. Generally availableAmazon Bedrock AgentCore Identity now supports On-Behalf-Of (OBO) token exchange · AWS · Announcement
  2. This postSecure AI agents with Amazon Bedrock AgentCore Identity on Amazon ECS
  3. New featureAmazon Bedrock AgentCore Identity now allows you to bring your own secrets with AWS Secrets Manager · AWS · AnnouncementAlso published by AWS Artificial Intelligence Blog
  4. How-toAuthenticate with Private Key JWT using Amazon Bedrock AgentCore Identity · AWS · How-to
  5. New featureAmazon Bedrock AgentCore Identity now offers a managed consent portal · AWS · Announcement
  6. How-toManage end-user OAuth consent for AI agents with Amazon Bedrock AgentCore · AWS · How-to
  7. How-toGovern AI agent access with Okta Cross App Access and Amazon Bedrock AgentCore – Part 1 · AWS · How-to
  8. Update to an existing featureAmazon Bedrock AgentCore Identity now supports OAuth 2.0 discovery URLs · AWS · Announcement
  9. How-toPrivate certificate authority support in Amazon Bedrock AgentCore Identity · AWS · How-to
Show all 10 posts
  1. Generally availableAmazon Bedrock AgentCore Identity now supports On-Behalf-Of (OBO) token exchange · AWS · Announcement
  2. This postSecure AI agents with Amazon Bedrock AgentCore Identity on Amazon ECS
  3. New featureAmazon Bedrock AgentCore Identity now allows you to bring your own secrets with AWS Secrets Manager · AWS · AnnouncementAlso published by AWS Artificial Intelligence Blog
  4. How-toAuthenticate with Private Key JWT using Amazon Bedrock AgentCore Identity · AWS · How-to
  5. New featureAmazon Bedrock AgentCore Identity now offers a managed consent portal · AWS · Announcement
  6. How-toManage end-user OAuth consent for AI agents with Amazon Bedrock AgentCore · AWS · How-to
  7. How-toGovern AI agent access with Okta Cross App Access and Amazon Bedrock AgentCore – Part 1 · AWS · How-to
  8. Update to an existing featureAmazon Bedrock AgentCore Identity now supports OAuth 2.0 discovery URLs · AWS · Announcement
  9. How-toPrivate certificate authority support in Amazon Bedrock AgentCore Identity · AWS · How-to
  10. New featureAmazon Bedrock AgentCore Identity adds private certificate authority support · AWS · Announcement