You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Validate AuthnContextClassRef in SAML Response when brokering #55261
Validate the AuthnContextClassRef returned in the SAML Response from a brokered SAML identity provider against the authnContextClassRefs configured on the identity provider, honoring the configured comparison type. Today Keycloak sends the configured authnContextClassRefs in the outbound AuthnRequest, but the broker endpoint accepts any class reference in the response.
Value Proposition
An identity provider that returns a weaker authentication context than requested (for example unspecified instead of an MFA class) is currently accepted without notice. Validating the response allows administrators to rely on the requested authentication level when brokering.
Goals
Reject a SAML Response whose AuthnContextClassRef does not satisfy the configured authnContextClassRefs and comparison type.
Leave identity providers without configured authnContextClassRefs unaffected.
Integration of brokering with step-up authentication for OIDC.
Discussion
No response
Notes
Related to #55108, which documents that brokering is not integrated with LoA and announces a follow-up enhancement. A first proposal exists in #50044, which changes SAMLEndpoint. Open points: behavior for comparison types other than exact (minimum, maximum, better), and whether this needs a backwards-compatibility switch as it can reject logins that work today.
Thanks for opening this, @ahus1. As offered on #50044, I’m happy to help with a replacement PR alongside @danSayag and the original team. Is anyone already taking this forward, and what scope would you prefer for the first PR given the comparison and compatibility questions?
Activity
mjatin2007 commentedon Nov 17, 2026
Thanks for opening this, @ahus1. As offered on #50044, I’m happy to help with a replacement PR alongside @danSayag and the original team. Is anyone already taking this forward, and what scope would you prefer for the first PR given the comparison and compatibility questions?