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
Remove MFA factor-merging workaround once SpringUserFramework#313 is fixed #71
PR #60 works around a framework bug — SpringUserFramework#313 — where a second-factor login replaces the session authentication instead of merging factor authorities, so the MFA flow could never complete. The demo compensates with MfaSecurityConfig, which applies @EnableMultiFactorAuthentication(authorities = {}) to enable Spring Security 7's filter-level factor merging.
Once the framework ships the fix, this workaround becomes redundant boilerplate. Since this is a reference app, leaving it in would teach consumers they need wiring they no longer need.
Verify the MFA flow still completes without the workaround:
./gradlew test (includes MfaChallengeFlowIntegrationTest)
APP_PROFILES=local,playwright-test,mfa npx playwright test --project=chromium-mfa — this E2E exercises the exact factor-merging behavior (enroll passkey → password login → challenge page → verify → both factors satisfied), so green means the framework fix fully covers it
Conditional (only if the "related observation" in #313 is also fixed)
If the framework starts auto-adding the configured MFA entry-point URIs (passwordEntryPointUri / webauthnEntryPointUri) to the unprotected URIs list:
Remove the manual /user/mfa/webauthn-challenge.html entries from user.security.unprotectedURIs in application.yml, application-mfa.yml, and application-test.properties
Relax or remove MfaConfigConsistencyTest, which currently enforces that manual sync (it would otherwise fail the build when the entries are removed)
If only the factor merging is fixed upstream, leave the unprotectedURIs entries and the consistency test as they are — the redirect-loop guard is still needed.
Done in #72 (merged), as part of the upgrade to ds-spring-user-framework 4.4.0 — which contains the fix for devondragon/SpringUserFramework#313 (factor merging) and its related observation (auto-unprotecting the configured MFA factor entry-point URIs, framework commit f3ca56c).
./gradlew test green (incl. MfaChallengeFlowIntegrationTest)
--project=chromium-mfa (profile playwright-test,mfa) green in CI and locally — enroll passkey → password login → challenge → verify → both factors satisfied
Conditional cleanup (the auto-unprotect observation in #313 was also fixed), completed:
Removed the manual /user/mfa/webauthn-challenge.html entry from user.security.unprotectedURIs in application.yml, application-mfa.yml, and application-test.properties (the webauthnEntryPointUri setting itself remains, as it must)
Relaxed MfaConfigConsistencyTest so it no longer enforces the manual unprotected-URI sync; it now only asserts MFA is opt-in and the passkey enrollment endpoints stay reachable
Activity
devondragon commentedon Jun 15, 2026
Done in #72 (merged), as part of the upgrade to ds-spring-user-framework 4.4.0 — which contains the fix for devondragon/SpringUserFramework#313 (factor merging) and its related observation (auto-unprotecting the configured MFA factor entry-point URIs, framework commit
f3ca56c).All tasks completed and verified on
main:ds-spring-user-frameworkto4.4.0src/main/java/com/digitalsanctuary/spring/demo/config/MfaSecurityConfig.java./gradlew testgreen (incl.MfaChallengeFlowIntegrationTest)--project=chromium-mfa(profileplaywright-test,mfa) green in CI and locally — enroll passkey → password login → challenge → verify → both factors satisfiedConditional cleanup (the auto-unprotect observation in #313 was also fixed), completed:
/user/mfa/webauthn-challenge.htmlentry fromuser.security.unprotectedURIsinapplication.yml,application-mfa.yml, andapplication-test.properties(thewebauthnEntryPointUrisetting itself remains, as it must)MfaConfigConsistencyTestso it no longer enforces the manual unprotected-URI sync; it now only asserts MFA is opt-in and the passkey enrollment endpoints stay reachable