8000 Remove the non-atomic default implementations of the credential update methods by ahus1 · Pull Request #55078 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Remove the non-atomic default implementations of the credential update methods - #55078

Merged
ahus1 merged 1 commit into
keycloak:mainfrom
ahus1:is-55034-remove-default-atomic-credential-update
Nov 12, 2026
Merged

ahus1 merged 1 commit into
keycloak:mainfrom
ahus1:is-55034-remove-default-atomic-credential-update

Conversation

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

Closes #55034

Follow-up of #55030, which introduced the default implementations for backwards compatibility.

Decisions and assumptions

  • The three methods become abstract, so a custom implementation that doesn't provide an atomic compare-and-swap no longer compiles, instead of silently losing concurrent changes.
  • All implementations in this repository already override the methods, so only the interfaces and their Javadoc change.
  • The upgrading guide documents this in the "End of Life features" section of 27.0.0.

Closes keycloak#55034

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
@ahus1
ahus1 force-pushed the is-55034-remove-default-atomic-credential-update branch from 61f54b7 to d01ae34 Compare November 12, 2026 09:20
@ahus1
ahus1 marked this pull request as ready for review November 12, 2026 10:08
@ahus1
ahus1 requested a review from a team as a code owner November 12, 2026 10:08
Copilot AI balanced review requested due to automatic review settings November 12, 2026 10:08
@ahus1
ahus1 enabled auto-merge (squash) November 12, 2026 10:08
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the change requiring atomic conditional credential updates.

No open issues 🎉

What changed in this PR

Removes the non-atomic credential-update defaults introduced in #55030, requiring custom implementations to provide atomic compare-and-swap behavior for Keycloak 27.0.

Changes:

  • Makes the three conditional credential-update methods abstract.
  • Updates their Javadoc to require atomic comparison and replacement.
  • Documents the breaking change and migration requirements in the 27.0 upgrading guide.
File Description
server-spi/​src/​main/​java/​org/​keycloak/​models/​SubjectCredentialManager.java Removes the default conditional update and requires atomic behavior.
server-spi/​src/​main/​java/​org/​keycloak/​credential/​UserCredentialStore.java Makes conditional credential updates mandatory for store implementations.
model/​storage/​src/​main/​java/​org/​keycloak/​storage/​federated/​UserFederatedUserCredentialStore.java Applies the same requirement to federated credential stores.
docs/​documentation/​upgrading/​topics/​changes/​changes-27_0_0.adoc Documents the removed defaults and requirements for custom implementations.

Review effort: Balanced

@ahus1
ahus1 requested a review from mabartos November 12, 2026 10:19
@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.

@ahus1 Agree with that approach. LGTM, thanks!

@ahus1
ahus1 merged commit 5bd155f into keycloak:main Nov 12, 2026
96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the non-atomic default implementations of the credential update methods

4 participants

0