Keycloak bug fix stops broken login options appearing on authentication screen
A bug in Keycloak's identity and access management server allowed custom authenticators that were not CredentialValidators to appear on the 'Try another way' login screen even when they were not usable for the current user, immediately triggering a CREDENTIAL_SETUP_REQUIRED error. The root cause was traced to two separate gaps in the services module: the AuthenticationSelectionResolver added non-CredentialValidator authenticators to the selection list without checking user configuration, while a guard in DefaultAuthenticationFlow failed to apply the same checks to non-CredentialValidator authenticators. The fix, addressed in pull request #51021, introduces an isSelectableForCurrentUser check in the resolver and removes the CredentialValidator restriction from the flow's own guard so both code paths apply consistent validation logic. Five new test cases were added to AuthenticationSelectionResolverTest to cover the full range of scenarios, including unconfigured users, self-setup permissions, and authenticators that do not require a user.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in