Keycloak Step-Up Authentication: ACR and LoA Flows, and the Cookie Bypass Gap
Step-up authentication lets users sign in with a lightweight method, such as a password or managed-device passkey, and requires a stronger factor only for sensitive actions like changing payout details or approving transfers. Keycloak implements this through Authentication Context Class Reference (ACR) values mapped to numeric Levels of Authentication (LoA), configured in the login flow instead of application code. The setup involves a realm-level ACR-to-LoA mapping, a browser flow with conditional subflows guarded by level conditions, and client requests that specify the required level. Keycloak's levels are hierarchical, which fits poorly when several unrelated authentication methods are considered equivalent. The guide also flags two places where step-up can quietly fail to protect an application.


