spring-projects / spring-projects/spring-security

Add Support for User Specific Factors

Open
#18,962 1 comment 1 reaction 1 assignee View on GitHub

@rwinch is already working on this.

Since Mar 25, 2026.

status: waiting-for-triage type: enhancement
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Right now every authorization rule that checks for webauthn must check to determine if webauthn is registered using multiple database queries.

We should consider an alternative. Perhaps at authentication time the Authentication or it's principal could be updated to indicate if a passkey is registered. Then we could use that for the authorization.

Another alternative (which I think I prefer) is to at authentication time look up what factors the user has enabled. For webauthn, we would check if they have a passkey registered and then specify that factor.

We could allow developers to customize that lookup process to view if things like OTT should be enabled (do they have an email or phone number registered?).

We'd then provide an AuthorizationManager that conditionally returns the factors that the user has registered for them.

NOTE: This could be a (partial) rewrite of some of the conditional MFA that we have

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.