8000 Reach Keycloak's own providers instead of the default provider by ahus1 · Pull Request #55516 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Reach Keycloak's own providers instead of the default provider - #55516

Draft
ahus1 wants to merge 3 commits into
keycloak:mainfrom
ahus1:is-55515-cluster-listener-provider-id
Draft

ahus1 wants to merge 3 commits into
keycloak:mainfrom
ahus1:is-55515-cluster-listener-provider-id

Conversation

@ahus1
@ahus1 ahus1 commented Nov 25, 2026 •
Copy link
Copy Markdown
Member

Closes #55515

The pull request has one commit for each group in the issue.

Decisions and assumptions:

  • The cluster listener takes the provider ID from its factory, as the handler for a removed user and AbstractAuthSessionClusterListener already fetch their provider by ID.
  • The constructor of AbstractUserSessionClusterListener changes without a deprecated variant, as the class is internal and the change targets the next major release.
  • The changelog transaction gets its provider from the factory through a setter rather than a lookup by ID, as a lookup by ID would create a second user session provider with transactions of its own.
  • The event store, the realm provider and the expiration task are looked up by ID, as they hold no state of their own in the session.

…own provider

The listeners fetched the default provider and ignored the event when it
was not the built-in one, so a provider wrapping it silently disabled
signing out all sessions of a realm and removing login failures.

Closes keycloak#55515

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
ahus1 and others added 2 commits November 25, 2026 10:44
The changelog transaction cast the session's default user session provider
to PersistentUserSessionProvider to import a session. When the provider is
wrapped, the cast fails, and when the provider was looked up by its ID, as the
cluster listener does, the default one is a different instance with
transactions of its own. The factory now hands the transaction its provider.

Closes keycloak#55515

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
The JPA event store and realm provider factories, and the session expiration,
cast the default provider or factory to their own implementation, which fails
when an extension wraps the default. Looking them up by the factory's ID always
finds Keycloak's implementation. These providers hold no state of their own in
the session, so the extra instance a lookup by ID creates is harmless.

Closes keycloak#55515

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
@ahus1 ahus1 changed the title Deliver the cluster events of the Infinispan session stores to their own provider Reach Keycloak's own providers instead of the default provider Nov 25, 2026
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.

Reach Keycloak's own providers instead of the default provider, so an extension can wrap them

1 participant

0