Amazon Bedrock AgentCore Identity now supports Private Key JWT client authentication, enabling agents to authenticate to a downstream identity provider’s token endpoint using a signed JSON Web Token (JWT) instead of a shared OAuth 2.0 client secret. This method allows the private key to remain securely stored in AWS Key Management Service (AWS KMS), while the public key is registered with the identity provider. The process involves signing the JWT assertion with AWS KMS and sending it to the identity provider for verification using the registered public key. This update provides a secure and scalable way to authenticate agents without exposing sensitive credentials. Source: awsml
The authentication workflow begins when an agent calls the GetResourceOauth2Token API to request a token for a protected downstream API. AgentCore Identity retrieves the client ID, KMS key ARN, and signing algorithm from the credential provider, then constructs a short-lived JWT client assertion with the required payload claims. The assertion is signed using the configured algorithm (RS256, PS256, or ES256) and sent to the identity provider’s token endpoint. The identity provider verifies the signature using the registered public key and returns an access token to the agent, which is then used to access the protected resource. Source: awsml
The supported grant flows include machine-to-machine (M2M), on-behalf-of (OBO), and user-delegated access. For M2M, the agent acts as itself and uses the client_credentials grant. For OBO, the agent acts on behalf of a user using an existing token, and for user-delegated access, the agent requires interactive consent from the user before accessing resources. These flows ensure secure and flexible authentication for different use cases. Source: awsml