Skip to content

Hidden cost of password upgrade #8498

Closed
@jmisur

Description

@jmisur

Context

So DelegatingPasswordEncoder decided to upgrade password encoding. This is arguably a reasonable decision, however it's not required every time and it has a hidden cost.

For example, if you have a simple http basic in-memory authentication for use between internal services, where password is stored in a secure cloud storage attached to the service, you might not need such upgrade behavior.

DelegatingPasswordEncoder however criples the performance of the service by upgrading the password to bcrypt after first successful call (in-memory in this case).
See the attached performance analysis breakdown, it's cost is overwhelming for a simple CRUD service.

Possible solution
Keep NoOpPasswordEncoder (it's deprecated) and/or add some property to prevent an encoding upgrade.
Also documenting this would help people debugging performance issues.

Screenshot 2020-05-06 at 23 55 10

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions