spring-projects / spring-projects/spring-security
Oidc(ReactiveOAuth2)UserService uses userNameAttributeName when user info endpoint not invoked
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
The property UserInfoEndpoint.userNameAttributeName is used to resolve the username from the even when the user info endpoint is not invoked (imperative / reactive).
The attribute should either:
- Only be used when the user info endpoint is invoked (when not invoked it would always use
IdTokenClaimNames.SUB). This would be a breaking change or - Be relocated to a place that is not specific to the user info endpoint. In this case, we could address this at the same time as the deprecation in gh-16857
Note that this decision blocks gh-16857 since the usernameExpression might need moved off of the UserInfoEndpoint.
cc @jgrandja
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 with UserInfoEndpoint.userNameAttributeName in ClientRegistration.java and compare its use in OidcUserRequestUtils.java, OidcUserService.java, and OidcReactiveOAuth2UserService.java. Review the linked gh-16857 deprecation context and decide whether the attribute remains user-info-specific or moves elsewhere. Done means the chosen behavior is defined for both imperative and reactive paths and gh-16857 is unblocked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication, security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100