spring-projects / spring-projects/spring-security

Think about changing how one tells BindAuthenticator which attributes to fetch

Open
#8,728 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

As requested, I am splitting the long and unclear #8560 into several issues. This issue is about (thinking about) changing how to tell BindAuthenticator which attributes to fetch.

I've described the behaviour in #8726. It's potentially confusing, and somewhat unergonomic.

Better behaviour

Have a single method the user can call to say "fetch these attributes" which works regardless of authentication strategy.

How to get better behaviour

Reverting 6b436ff409969 fixes this too, I think: it would mean that calling setUserAttributes always works. (Cf. #8727.)

You can also make setUserAttributes always work without reverting that commit, by having setUserAttributes modify the userSearch field which BindAuthenticator inherits from its parent class. If you do that, mention it in the javadoc for setUserAttributes.

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 reading the behavior described in #8726 and the related discussion in #8727, then inspect BindAuthenticator, its inherited userSearch field, and setUserAttributes. Compare the proposed approaches, including the effect of reverting 6b436ff409969. Done means there is one consistent way to request attributes for each authentication strategy and the setUserAttributes documentation reflects its behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.