OpenA2A AIM (Agent Identity Management) and Amazon Cognito
Amazon Cognito is an AWS identity service for web and mobile apps: a user directory, an authentication server and an authorization service for OAuth 2.0 access tokens and AWS credentials. It signs people in, and it issues access tokens to machine identities, app clients that authenticate with a client secret. Its developer guide does not mention AI agents; AWS documents agent identity in a separate service, Amazon Bedrock AgentCore Identity, which can use a Cognito user pool as its identity provider. OpenA2A AIM (Agent Identity Management) is an open source platform for AI agent identity. It keeps a registry of agents: each agent has an Ed25519 key, a trust score and a list of capabilities checked through an SDK, and MCP servers are attested by the agents that use them.
The two cover different layers. The open source build of AIM has no built-in integration with Cognito or any other identity provider, and it does not replace one. The hosted AIM Cloud adds Google sign-in.
Checked on against the Amazon Cognito Developer Guide, the Amazon Bedrock AgentCore Developer Guide and AIM at commit 3ab8285e, opens in a new tab. Amazon Cognito is a cloud service and its guide carries no version. On the day of the check the guide's document history listed its latest addition on 2026-10-08, and a capability that was looked for and not found is stated as of the day of the check. To report a line that is wrong, use the contact page.
Capability by capability
Signing people in
Amazon Cognito
Documented. A user pool is a user directory that authenticates users and issues JSON web tokens to an app or API. "Users can sign in directly, through social providers like Google and Apple, or through enterprise SAML and OIDC providers." An identity pool exchanges a user's token for temporary AWS credentials, so that the app can call AWS services on the user's behalf.
Source: What is Amazon Cognito?, opens in a new tab, Identity pools console overview, opens in a new tab
AIM
The dashboard has local email and password sign-in. No single sign-on, OpenID Connect or SAML login is wired in the open source build: the repository contains Google, Microsoft and Okta provider code, but no login route calls it.
Agent identities
Amazon Cognito
Not found in the Amazon Cognito Developer Guide as of 2026-10-16: it does not mention AI agents. Nearest documented capability: machine identities. "Machine identities in user pools are confidential clients that run on application servers and connect to remote APIs." AWS documents agent identity in a separate service, Amazon Bedrock AgentCore Identity, for managing agent identities and their credentials. "Amazon Cognito can be configured as an identity provider for accessing AgentCore Gateway and Runtime, or an AgentCore Identity credential provider for outbound resource access."
Source: Scopes, M2M, and resource servers, opens in a new tab, Overview of Amazon Bedrock AgentCore Identity, opens in a new tab, AgentCore Identity: Amazon Cognito, opens in a new tab
AIM
Each agent is registered with its own Ed25519 public key. The token endpoint accepts one grant: a JWT-bearer assertion signed with that key, in exchange for a bearer token for AIM's own agent API. AIM does not implement the client credentials grant: the token endpoint refuses it.
Source: agent_service.go, opens in a new tab, oauth_token_handler.go, opens in a new tab
Credentials
Amazon Cognito
Documented for machine identities: "In M2M authorization, a shared secret replaces user credentials in access control." "The token endpoint supports client_secret_basic and client_secret_post authentication." "Each app client can have up to two secrets at a time, enabling secret rotation without downtime." Client authentication with a signed JWT or a client certificate is not found in the Amazon Cognito Developer Guide as of 2026-10-16: it has no match for private_key_jwt, client_assertion or mutual TLS.
Source: Scopes, M2M, and resource servers, opens in a new tab, The token issuer endpoint, opens in a new tab, Application-specific settings with app clients, opens in a new tab
AIM
An agent can sign each request with its Ed25519 key. On routes behind the request-signature check, the server verifies the signature over the method, path, timestamp and body, and rejects a timestamp more than 30 seconds from its own clock. The action-check request is signed over the action's fields (agent, capability, resource, context and timestamp) and verified against the agent's registered key. Agent routes also accept an API key or a bearer token in place of a signature.
OAuth flows and delegation
Amazon Cognito
Documented grants: at the token endpoint, grant_type "Must be authorization_code or refresh_token or client_credentials." Since 2026-07-29, according to the document history, the GetClientToken API operation also issues a machine-to-machine access token, with no user pool domain. An identity pool exchanges a user's token for temporary AWS credentials. OAuth token exchange (RFC 8693) and a token that names an agent acting for a user are not found in the Amazon Cognito Developer Guide as of 2026-10-16.
Source: The token issuer endpoint, opens in a new tab, Scopes, M2M, and resource servers, opens in a new tab, Document history, opens in a new tab, What is Amazon Cognito?, opens in a new tab
AIM
OAuth token exchange (RFC 8693) is not implemented: the agent token endpoint accepts the JWT-bearer grant only. Delegation exists outside OAuth, in the TypeScript SDK, which creates and verifies Ed25519-signed delegation chains between keys. The AIM server does not issue or check them.
Source: oauth_token_handler.go, opens in a new tab, delegation.ts, opens in a new tab
Proof of possession
Amazon Cognito
Not found in the Amazon Cognito Developer Guide as of 2026-10-16: it does not mention DPoP or mutual TLS. Nearest documented capability: resource binding (RFC 8707), which sets the access token's aud claim to the one API a user's sign-in requested, so that other APIs can decline the token. "You can only bind access tokens to resources for users. You can't request a resource binding with client-credentials M2M grants."
Source: Scopes, M2M, and resource servers, opens in a new tab
AIM
DPoP is not found in the AIM repository at this commit. Tokens from the token endpoint are plain bearer tokens. Requests authenticated by signature are signed per call, as in the row on client authentication.
Permissions
Amazon Cognito
Documented. A resource server checks the scopes in an access token before it serves a request. For a machine identity, the client credentials grant and GetClientToken "issue an access token that authorizes only custom scopes from resource servers." In the Essentials and Plus plans, a pre token generation Lambda trigger can add, remove and modify some claims in access tokens, machine-to-machine tokens included in its version three event. Amazon Verified Permissions takes user pool tokens and returns an allow or deny decision from policies written in Cedar.
Source: Scopes, M2M, and resource servers, opens in a new tab, Pre token generation Lambda trigger, opens in a new tab, Authorization with Amazon Verified Permissions, opens in a new tab
AIM
Each agent has a list of granted capabilities. The SDK, running inside the agent process, sends each wrapped action to the server, which compares the capability name with that list. In the default mode (monitoring) a capability outside the list is allowed and, under the default policy, raises an alert. The Python SDK's decorator also registers a capability on first use, and in this mode the server grants it automatically. In strict mode a capability outside the list is denied under the default policy, and the SDK blocks the call.
Source: agent_service.go, opens in a new tab, enforcement.py, opens in a new tab
Risk signals and access policy
Amazon Cognito
Threat protection, in the Plus plan, reviews location and device information from users' sign-in requests: "When you activate threat protection, Amazon Cognito assigns a risk score to user activity." It can then require MFA, block the sign-in or log it, and it checks users' passwords against lists of leaked credentials. A risk or trust score for a machine identity or an AI agent is not found in the Amazon Cognito Developer Guide as of 2026-10-16.
Source: Advanced security with threat protection, opens in a new tab
AIM
Each agent has a trust score calculated from nine weighted factors; a factor with no data is left out of the weighted sum. It is recalculated on events such as registration, verification by an administrator, capability changes and capability reports from the SDK. A capability violation also lowers the stored score directly. Each action check reads the stored score.
MCP servers
Amazon Cognito
Not found in the Amazon Cognito Developer Guide as of 2026-10-16: it does not mention MCP, the Model Context Protocol or dynamic client registration. AWS documents MCP in Amazon Bedrock AgentCore Gateway, which converts APIs, Lambda functions and existing services into MCP tools. "If you use the AWS Management Console or AgentCore CLI to create your gateway, you can create a default inbound authorization configuration using Amazon Cognito during gateway creation." The gateway's inbound authorizer "is Identity Provider (IdP) agnostic and works with any OAuth 2.0 compatible identity provider."
Source: Amazon Bedrock AgentCore Gateway, opens in a new tab, Set up inbound authorization, opens in a new tab, Configure inbound JWT authorizer, opens in a new tab
AIM
AIM is not an OAuth authorization server for MCP. Agents submit signed attestations of the MCP servers they connect to, and the server checks each signature against the agent's registered key. A drift alert is raised when a capability detection run finds that a server's manifest has changed since the last run.
Source: mcp_attestation_service.go, opens in a new tab, mcp_manifest_service.go, opens in a new tab
Workload identity
Amazon Cognito
Not found in the Amazon Cognito Developer Guide as of 2026-10-16: it does not mention SPIFFE or workload identity, and a machine identity in a user pool authenticates with its client secret. Nearest documented capability: an identity pool exchanges a token from a user pool, a social provider, or a SAML or OIDC provider for temporary, limited-privilege AWS credentials.
Source: Scopes, M2M, and resource servers, opens in a new tab, What is Amazon Cognito?, opens in a new tab
AIM
Not implemented for agents at this commit: AIM accepts no SPIFFE identity, Kubernetes service account token or external OpenID Connect issuer as an agent credential.
Source: oauth_token_handler.go, opens in a new tab, pqc_agent_auth.go, opens in a new tab
Audit
Amazon Cognito
Documented. "CloudTrail captures a subset of API calls for Amazon Cognito as events, including calls from the Amazon Cognito console and from code calls to the Amazon Cognito API operations." Requests to managed login are recorded as CloudTrail events too, among them the request that submits an authorization code to the token endpoint. A user pool can also send logs of user sign-in activity from threat protection to a CloudWatch log group, an Amazon Data Firehose stream or an Amazon S3 bucket.
Source: Amazon Cognito logging in AWS CloudTrail, opens in a new tab, Exporting logs from Amazon Cognito user pools, opens in a new tab
AIM
An action check that passes its signature check is written to the audit log as a row with the agent, the capability, the resource, the stored trust score and whether it was allowed. The write is best effort: if it fails, the check still returns its decision. The log is not append-only at the database layer and is not signed.
Source: verification_handler.go, opens in a new tab, audit_log_repository.go, opens in a new tab, SECURITY.md, opens in a new tab
License and hosting
Amazon Cognito
A managed AWS service. User pools have three feature plans, Lite, Essentials and Plus, each with a monthly cost per active user, and machine-to-machine authorization is in all three. "Where user authentication carries a cost per active user, M2M billing reflects active M2M app clients, whether they use client credentials grants or the GetClientToken API operation, and total token-request volume." The pricing page adds: "There is no free tier for token requests when Cognito is used for the machine-to-machine use case."
Source: User pool feature plans, opens in a new tab, Scopes, M2M, and resource servers, opens in a new tab, Amazon Cognito pricing, opens in a new tab
AIM
The repository is Apache-2.0. Self-hosted with Docker Compose. Also offered as a hosted service, AIM Cloud, which is built from a private mirror of the repository with cloud-only additions.
Source: LICENSE, opens in a new tab, docs/DEPLOYMENT.md, opens in a new tab, docker-compose.quickstart.yml, opens in a new tab
Which layer each one covers
Amazon Cognito
- Signing people in to web and mobile apps, directly or through social, SAML and OpenID Connect providers.
- Issuing OAuth access tokens to apps and to machine identities, with custom scopes from resource servers.
- Exchanging a user's token for temporary AWS credentials through an identity pool.
- Acting as the identity provider in front of Amazon Bedrock AgentCore Gateway and Runtime.
AIM
- Keeping a registry of agents, each with its own key.
- Scoring each agent and recording the action checks it submits.
- Checking each action an agent submits against its granted capabilities.
- Recording which MCP servers agents attest to, and alerting when a detection run finds a server's manifest changed.
A team can run both: Cognito for signing people in and issuing the OAuth access tokens that apps, machine identities and AgentCore gateways present, AIM for its registry of agents and their action checks. AIM has no integration with Cognito at this commit. Agents authenticate to AIM with their own keys or an AIM API key, and in the open source build people sign in to the AIM dashboard with a local account.
Registering an agent with AIM
In the Python SDK, secure() registers an agent and perform_action wraps the actions to be checked. secure() needs credentials first, from aim-sdk login or an SDK downloaded from the dashboard. For a self-hosted server, AIM's README at this commit says to create the agent in the dashboard first. The capability name on the decorator is what the server compares with the agent's grants. The resource is recorded with the check and is not compared.
from aim_sdk import secure
agent = secure("my-agent")
@agent.perform_action("db:read", resource="users_table")
def get_user_data(user_id):
...