Amazon Cognito now emits authentication assurance data in the acr (authentication context class reference) and amr (authentication methods reference) claims of its JWTs, and it allows callers to request a target assurance level at sign‑in. For teams that need to balance usability against security—such as AI engineers deploying model‑driven services, platform engineers building multi‑tenant APIs, or SREs automating credential rotation—this change provides a standard, token‑based way to decide whether a user’s current authentication strength is sufficient for a given operation.
What ACR and AMR Provide
The two claims are defined by the OpenID Connect Core specification, so any OIDC‑compatible verifier can read them without custom parsing. acr contains a URI that identifies the highest assurance level the user satisfied during sign‑in; amr is an array of method identifiers (e.g., pwd, sms, totp). Cognito defines four levels:
- Level 1 (
urn:cognito:loa:1) – password only. - Level 2 (
urn:cognito:loa:2) – one‑time password via SMS or email. - Level 3 (
urn:cognito:loa:3) – passkey alone, or password plus SMS/email OTP. - Level 4 (
urn:cognito:loa:4) – password plus time‑based OTP from an authenticator app.
Cognito always selects the highest level fully satisfied, so a sign‑in that includes a TOTP automatically yields level 4 while still meeting the criteria for lower levels.
Requesting Assurance Levels
Callers can ask for a specific assurance level using the standard OIDC parameters acr_values and max_age in a managed‑login flow, or by invoking the SDK/API USER_AUTH flow with TARGET_ACR_VALUES and MAX_AGE. The request is evaluated against the user’s configured factors; if the user cannot meet the target, Cognito returns the highest level they can achieve. Access to these parameters requires the Essentials or Plus feature plan.
Design and Operations Implications
From an architecture perspective, the presence of acr and amr in the token enables a clean separation between authentication and authorization. Services can inspect the claims at the API gateway or within microservice code to decide whether to prompt for step‑up, reject the request, or proceed. This reduces the need for ad‑hoc session‑state checks that rely on timestamps or external session stores.
Operationally, teams must ensure that the token‑validation layer is updated to read these claims and that any policy engine (e.g., custom authorizer, service mesh) is aware of the four level URIs. Because the level is encoded in the JWT, rotating signing keys does not affect the decision logic, but key‑rollout procedures should still verify that downstream services can still validate the token format.
Security considerations include the fact that a strong sign‑in performed hours earlier does not guarantee the current user at the keyboard is the same person. By checking max_age or re‑requesting a higher acr before a sensitive transaction, applications can mitigate credential‑theft scenarios where an attacker hijacks an existing session.
Related CloudNinjas coverage: AWS.
What This Means For Practitioners
Implementers should add claim extraction to their authentication middleware, map the four Cognito URIs to internal risk tiers, and enforce step‑up checks where the operation’s risk exceeds the current level. When designing new services, treat acr as the authoritative source of assurance rather than relying on session age alone. Finally, verify that the chosen Cognito feature plan includes step‑up support before rolling out any policy that depends on these claims.

