spring-projects / spring-projects/spring-security

SEC-2775: API design misconception in UserDetailsManager#changePassword

Open
#2,911 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Christian Rudolph (Migrated from SEC-2775) said:

There is a misconception in the UserDetailsManager interface. The signature of changePassword is

void changePassword(String oldPassword, String newPassword)

This makes it impossible to clear the passwords from memory after someone has changed his password. The passwords should be given as char[] or at least CharSequence s, but a change is not possible without API break.

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 with the UserDetailsManager#changePassword entry point and review its String-based oldPassword and newPassword parameters. Determine an implementable API direction that addresses clearing passwords from memory while accounting for the stated API-break constraint; done means the design and compatibility impact are resolved.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.