8000 Replace a credential only if unchanged when re-hashing a password by ahus1 · Pull Request #55052 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Replace a credential only if unchanged when re-hashing a password - #55052

Merged
ahus1 merged 1 commit into
keycloak:release/26.8from
ahus1:is-55028-backport-26.8
Nov 12, 2026
Merged

ahus1 merged 1 commit into
keycloak:release/26.8from
ahus1:is-55028-backport-26.8

Conversation

@ahus1
@ahus1 ahus1 commented Nov 11, 2026
Copy link
Copy Markdown
Member

Add updateStoredCredential(oldCred, newCred) that replaces a stored credential only if it still has the content of the old version, using a pessimistic lock in the JPA stores. Use it in the deferred password re-hash, so that it no longer overwrites a credential that changed after it was validated.

Closes #55028

(cherry picked from commit e4bcd40)

Add updateStoredCredential(oldCred, newCred) that replaces a stored credential only if it still has the content of the old version, using a pessimistic lock in the JPA stores. Use it in the deferred password re-hash, so that it no longer overwrites a credential that changed after it was validated.

Closes keycloak#55028

(cherry picked from commit e4bcd40)

Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ahus1
ahus1 force-pushed the is-55028-backport-26.8 branch from 165a912 to 3df158a Compare November 12, 2026 08:57
@ahus1
ahus1 marked this pull request as ready for review November 12, 2026 09:58
@ahus1
ahus1 requested review from a team as code owners November 12, 2026 09:58
@ahus1
ahus1 enabled auto-merge (squash) November 12, 2026 09:58
@mabartos mabartos linked an issue Nov 12, 2026 that may be closed by this pull request
2 tasks done
@mabartos mabartos left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ahus1
ahus1 merged commit 3f05acb into keycloak:release/26.8 Nov 12, 2026
90 of 91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deferred password re-hash overwrites a credential that changed after it was validated

3 participants

0