spring-projects / spring-projects/spring-security

Explore configuring authentication mechs declared in EnableGlobalMultifactorAuthentication

Open
#17,961 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

for: team-attention in: config type: enhancement
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

NOTE: This is a ticket that the Spring Security team is reviewing for inclusion. It's not considered ready to implement yet. When it is, this disclaimer will be removed and the title may change


Since authentication factors are strongly implied by the factor names, there may be value (possibly in conjuction with https://github.com/spring-projects/spring-security/issues/17960) in configuring HttpSecurity with the mechanisms specified in the annotation.

For example,

@EnableGlobalMultifactorAuthentication(authorities = { FACTOR_X509_AUTHORITY, FACTOR_OTT_AUTHORITY })

Strongly implies that

.x509(Customizer.withDefaults())
.oneTimeTokenLogin(Customizer.withDefaults())

will be needed.

It's not clear how much this buys since many mechanisms require additional beans like UserDetailsService and TokenGenerationSuccessHandler to be fully configured. The nice thing is that it removes the need to add this customizer to HttpSecurity.

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.

Research direction

Start by reviewing EnableGlobalMultifactorAuthentication and the HttpSecurity configuration entry points mentioned in the issue, then compare the related discussion in issue 17960. Determine whether declared factors should configure matching mechanisms and how required beans such as UserDetailsService and TokenGenerationSuccessHandler affect the behavior. Done means the team has a clear, implementable scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
authentication, backend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.