Skip to content

SEC-2566: Support password storage upgrades #2778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Apr 18, 2014 · 0 comments
Closed

SEC-2566: Support password storage upgrades #2778

spring-projects-issues opened this issue Apr 18, 2014 · 0 comments
Labels
in: core An issue in spring-security-core type: jira An issue that was migrated from JIRA
Milestone

Comments

@spring-projects-issues
Copy link

spring-projects-issues commented Apr 18, 2014

Rob Winch (Migrated from SEC-2566) said:

After verifying a user's password successfully check to see if the format the password was stored in is up to date. If not, upgrade the storage of the password.

A developer can ensure that passwords that need to be upgraded are now upgraded on authentication success by exposing a UserDetailsPasswordService as a Bean.

The changes for this ticket include:

  • PasswordEncoder.upgradeEncoding allows checking to see if a password should be upgraded
  • Passwords can be upgraded using UserDetailsPasswordService and ReactiveUserDetailsPasswordService. Both InMemoryUserDetailsManager and MapReactiveUserDetailsService now implement these interfaces.
  • DaoAuthenticationProvider and UserDetailsRepositoryReactiveAuthenticationManager can have a UserDetailsPasswordService or ReactiveUserDetailsPasswordService injected which on authentication success will trigger the password to be upgraded if the PasswordEncoder.upgradeEncoding returns true.

NOTE: JdbcUserDetailsManager and LdapUserDetailsManager do not implement UserDetailsPasswordService because they would then try to upgrade the passwords automatically which would potentially cause user's production code to break. For example, encoding the password is likely to cause the password to be too large to fit into the default schema. Another example is if the user has custom queries for the user and do not plan on using it for updates, they may not have set the update sql which means updating would break log in (which might try to log in).

@spring-projects-issues spring-projects-issues added in: core An issue in spring-security-core Open type: jira An issue that was migrated from JIRA labels Feb 5, 2016
@spring-projects-issues spring-projects-issues added this to the 4.0 Backlog milestone Feb 5, 2016
@rwinch rwinch modified the milestone: 4.0 Backlog Aug 15, 2016
@rwinch rwinch added this to the 5.1.0.M1 milestone Nov 16, 2017
@rwinch rwinch modified the milestones: 5.1.0.M1, 5.1.0.RC1 Dec 19, 2017
rwinch added a commit that referenced this issue Jul 16, 2018
rwinch added a commit that referenced this issue Jul 16, 2018
rwinch added a commit that referenced this issue Jul 16, 2018
rwinch added a commit that referenced this issue Jul 16, 2018
@rwinch rwinch closed this as completed Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core type: jira An issue that was migrated from JIRA
Projects
None yet
Development

No branches or pull requests

2 participants