DeepSeek V4 Pro · Heavy

fixing-re-authentication-with-passkeys-keycloak

Keycloak · Java · S · 30–99 lines · 6 files

The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Opus 5.5.

Gold bugs found
1 of 2
Comments published
3
Comments matching a bug
1
Comments not matching
2
Cost of this PR
$1.663

Published comments (3)

highbugservices/src/main/java/org/keycloak/authentication/authenticators/browser/UsernamePasswordForm.java:160-163

Passkey conditional UI shown for disabled users — Disabled users can reach the passkey conditional UI and then submit to webauthnAuth.action before the enabledUser gate. Add the isEnabled() check to isConditionalPasskeysEnabled, or skip filling passkey data in challenge() for disabled/brute-force error challenges.

highbugservices/src/main/java/org/keycloak/authentication/authenticators/browser/PasswordForm.java:52-54

Passkey conditional UI enabled for base/classic theme without template support — The classic and custom themes inherit themes/src/main/resources/theme/base/login/login-password.ftl, which lacks the passkeys import and conditional UI rendering, so this fix is invisible there. Update the base template to match the keycloak.v2 change or gate fillContextForm on template support.

mediumbugtestsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/webauthn/passwordless/PasskeysUsernamePasswordFormTest.java:278-323

Reauthentication test does not exercise per-user passkey branch — This currently passes because isConditionalPasskeysEnabled short-circuits on the disabled realm policy, so a broken per-user branch would go unnoticed. Set setWebAuthnPolicyPasskeysEnabled(Boolean.TRUE) and keep the user without passkey credentials to exercise credentialManager().isConfiguredFor(...).

Gold bugs found (1)

highPasswordForm now accepts passkey-only users, but only the keycloak.v2 login-password.ftl renders the passkeys conditional UI; the base template (used by the legacy keycloak theme) does not, so a passkey-only user is shown a password-only form they cannot complete.

Gold bugs missed (1)

mediumlogin-password.ftl now renders the passkeys macro, making reachable an error path where fillContextForm sets enableWebAuthnConditionalUI but returns before setting isUserIdentified/userVerification, so passkeys.ftl fails to render and a FreeMarker error replaces the login page.