spring-projects / spring-projects/spring-security
SEC-2814: ldapAuthentication always successful with false UserDetails attributes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
vialleton (Migrated from SEC-2814) said:
Implementing a ldapAuthentication into my Spring Security configuration makes the process ignoring the boolean field : "enabled" on Users (org.springframework.security.core.userdetails) so it's allowing disabled Users to connect..
The Security Config works well and it disallow disabled Users to connect with a simple authentication using userDetailsService but it fails with ldapAuthentication.
And implementing a custom userDetailsContextMapper doesn't work too.
Is this a normal behavior ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the ldapAuthentication entry point and the UserDetails, userDetailsService, and custom userDetailsContextMapper paths described in the report. Reproduce the case with a disabled user and compare it with simple userDetailsService authentication; done means ldapAuthentication rejects users whose enabled attribute is false.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- authentication, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100