Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The patch contains a non-compiling ObjectReader call and unconditional Jackson overrides that prevent explicit Quarkus configuration from taking effect.
1 open issue
What changed in this PR
This PR consolidates REST-layer JSON handling around Quarkus’s managed ObjectMapper, reducing duplicate mapper instances while retaining Keycloak-specific configuration.
Changes:
- Replaces the Quarkus mapper resolver with an
ObjectMapperCustomizer. - Adds a shared mapper accessor to session factories, with a fallback for non-Quarkus runtimes.
- Updates admin-v2 merge-patch handling and RESTEasy test setup to use the revised mapper APIs.
| File | Description |
|---|---|
services/src/test/java/org/keycloak/services/resteasy/ResteasyKeycloakApplication.java |
Supplies an explicit mapper to the test resolver. |
services/src/main/java/org/keycloak/services/util/ObjectMapperResolver.java |
Extracts reusable configuration and accepts an injected mapper. |
services/src/main/java/org/keycloak/services/DefaultKeycloakSessionFactory.java |
Adds lazy access to a shared fallback mapper. |
rest/admin-v2/services/src/main/java/org/keycloak/rest/admin/api/client/DefaultClientApi.java |
Uses the shared mapper for merge-patch processing. |
quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/integration/QuarkusKeycloakSessionFactory.java |
Retrieves the Quarkus-managed mapper. |
quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/integration/jaxrs/KeycloakObjectMapperCustomizer.java |
Applies Keycloak configuration through a Quarkus customizer. |
Review effort: Balanced
shawkins
force-pushed
the
iss44159
branch
2 times, most recently
from
November 10, 2026 19:23
f87d17b to
2a7d0f8
Compare
closes: keycloak#44159 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
shawkins
marked this pull request as ready for review
November 10, 2026 22:19
shawkins
requested review from
Pepo48 and
vmuzikar
and
a balanced review from Copilot
November 10, 2026 22:19
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Regression coverage is missing for how the mapper customizations interact with quarkus.jackson.* overrides, including default unknown-field rejection, an explicit override, and continued trailing-token rejection in PATCH requests.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Inverts our creation of the rest layer objectmapper, so that we are reusing the quarkus one. We could move our customizations to the application.properties.
This reduces our memory footprint a little and let's and users or support issues use quarkus properties to workaround serialization / deserialization issues if needed.
closes: #44159