diff --git a/bom/application/pom.xml b/bom/application/pom.xml index e9ab40adbf5e1..cf05f451d27c0 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -177,7 +177,7 @@ 5.14.2 5.8.0 2.2.0 - 25.0.6 + 26.0.2 1.15.1 3.48.2 2.35.1 @@ -6103,41 +6103,25 @@ ${quarkus-spring-boot-api.version} - - org.keycloak - keycloak-core - ${keycloak.version} - - - org.keycloak - keycloak-common - ${keycloak.version} - org.keycloak keycloak-admin-client - ${keycloak.version} - - - org.checkerframework - checker-qual - - + ${keycloak-client.version} org.keycloak - keycloak-adapter-spi - ${keycloak.version} + keycloak-authz-client + ${keycloak-client.version} org.keycloak - keycloak-authz-client - ${keycloak.version} + keycloak-policy-enforcer + ${keycloak-client.version} org.keycloak - keycloak-policy-enforcer - ${keycloak.version} + keycloak-client-common-synced + ${keycloak-client.version} io.quarkus diff --git a/build-parent/pom.xml b/build-parent/pom.xml index bd780c85a57ff..539a2f8076b55 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -95,10 +95,9 @@ 4.13.2 - - 25.0.6 + 25.0.6 19.0.3 - quay.io/keycloak/keycloak:${keycloak.version} + quay.io/keycloak/keycloak:${keycloak.server.version} quay.io/keycloak/keycloak:${keycloak.wildfly.version}-legacy 7.0.1 diff --git a/extensions/devservices/keycloak/pom.xml b/extensions/devservices/keycloak/pom.xml index a12beb74331f8..14a45e3b38b00 100644 --- a/extensions/devservices/keycloak/pom.xml +++ b/extensions/devservices/keycloak/pom.xml @@ -34,13 +34,7 @@ org.keycloak - keycloak-core - - - com.sun.activation - jakarta.activation - - + keycloak-client-common-synced diff --git a/extensions/keycloak-admin-rest-client/runtime/pom.xml b/extensions/keycloak-admin-rest-client/runtime/pom.xml index 7daec9e854335..175cc28cbb2ac 100644 --- a/extensions/keycloak-admin-rest-client/runtime/pom.xml +++ b/extensions/keycloak-admin-rest-client/runtime/pom.xml @@ -22,16 +22,6 @@ io.quarkus quarkus-tls-registry - - org.keycloak - keycloak-core - - - com.sun.activation - jakarta.activation - - - org.eclipse.angus angus-activation diff --git a/extensions/keycloak-admin-rest-client/runtime/src/main/java/io/quarkus/keycloak/admin/client/reactive/runtime/ResteasyReactiveClientProvider.java b/extensions/keycloak-admin-rest-client/runtime/src/main/java/io/quarkus/keycloak/admin/client/reactive/runtime/ResteasyReactiveClientProvider.java index ad35c9f994dba..0690fbcdff3d7 100644 --- a/extensions/keycloak-admin-rest-client/runtime/src/main/java/io/quarkus/keycloak/admin/client/reactive/runtime/ResteasyReactiveClientProvider.java +++ b/extensions/keycloak-admin-rest-client/runtime/src/main/java/io/quarkus/keycloak/admin/client/reactive/runtime/ResteasyReactiveClientProvider.java @@ -20,6 +20,8 @@ import org.jboss.resteasy.reactive.server.jackson.JacksonBasicMessageBodyReader; import org.keycloak.admin.client.spi.ResteasyClientProvider; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import io.quarkus.arc.Arc; @@ -93,7 +95,7 @@ private ClientBuilderImpl registerJacksonProviders(ClientBuilderImpl clientBuild clientBuilder = clientBuilder.register(new ClientJacksonMessageBodyWriter(objectMapper)); } } else { - ObjectMapper newObjectMapper = new ObjectMapper(); + ObjectMapper newObjectMapper = newKeycloakAdminClientObjectMapper(); clientBuilder = clientBuilder .registerMessageBodyReader(new JacksonBasicMessageBodyReader(newObjectMapper), Object.class, HANDLED_MEDIA_TYPES, true, @@ -136,11 +138,21 @@ private boolean canReuseObjectMapper(InstanceHandle objectMapperIn private ObjectMapper getObjectMapper(ObjectMapper value, InstanceHandle objectMapperInstance) { if (value == null) { - return objectMapperInstance.isAvailable() ? objectMapperInstance.get() : new ObjectMapper(); + return objectMapperInstance.isAvailable() ? objectMapperInstance.get() : newKeycloakAdminClientObjectMapper(); } return value; } + // creates new ObjectMapper compatible with Keycloak Admin Client + private ObjectMapper newKeycloakAdminClientObjectMapper() { + ObjectMapper objectMapper = new ObjectMapper(); + // Same like JSONSerialization class. Makes it possible to use admin-client against older versions of Keycloak server where the properties on representations might be different + objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + // The client must work with the newer versions of Keycloak server, which might contain the JSON fields not yet known by the client. So unknown fields will be ignored. + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + return objectMapper; + } + @Override public R targetProxy(WebTarget target, Class targetClass) { return ((WebTargetImpl) target).proxy(targetClass); diff --git a/extensions/keycloak-admin-resteasy-client/runtime/pom.xml b/extensions/keycloak-admin-resteasy-client/runtime/pom.xml index dc3f73112bcf5..cb9eb007af6f6 100644 --- a/extensions/keycloak-admin-resteasy-client/runtime/pom.xml +++ b/extensions/keycloak-admin-resteasy-client/runtime/pom.xml @@ -30,16 +30,6 @@ io.quarkus quarkus-resteasy-client-jaxb - - org.keycloak - keycloak-core - - - com.sun.activation - jakarta.activation - - - org.eclipse.angus angus-activation diff --git a/extensions/keycloak-authorization/deployment/src/main/java/io/quarkus/keycloak/pep/deployment/KeycloakReflectionBuildStep.java b/extensions/keycloak-authorization/deployment/src/main/java/io/quarkus/keycloak/pep/deployment/KeycloakReflectionBuildStep.java index d450e440b913f..69130cacf970d 100644 --- a/extensions/keycloak-authorization/deployment/src/main/java/io/quarkus/keycloak/pep/deployment/KeycloakReflectionBuildStep.java +++ b/extensions/keycloak-authorization/deployment/src/main/java/io/quarkus/keycloak/pep/deployment/KeycloakReflectionBuildStep.java @@ -5,6 +5,8 @@ import org.keycloak.adapters.authorization.cip.spi.ClaimInformationPointProviderFactory; import org.keycloak.authorization.client.representation.ServerConfiguration; import org.keycloak.authorization.client.representation.TokenIntrospectionResponse; +import org.keycloak.authorization.client.util.crypto.AuthzClientCryptoProvider; +import org.keycloak.common.crypto.CryptoProvider; import org.keycloak.jose.jwk.JSONWebKeySet; import org.keycloak.jose.jwk.JWK; import org.keycloak.jose.jws.JWSHeader; @@ -78,6 +80,8 @@ public void registerServiceProviders(BuildProducer ser serviceProvider.produce(new ServiceProviderBuildItem(ClaimInformationPointProviderFactory.class.getName(), HttpClaimInformationPointProviderFactory.class.getName(), ClaimsInformationPointProviderFactory.class.getName())); + serviceProvider.produce(new ServiceProviderBuildItem(CryptoProvider.class.getName(), + AuthzClientCryptoProvider.class.getName())); } @BuildStep diff --git a/extensions/keycloak-authorization/runtime/pom.xml b/extensions/keycloak-authorization/runtime/pom.xml index a49332d94f3ad..64d92dd5df310 100644 --- a/extensions/keycloak-authorization/runtime/pom.xml +++ b/extensions/keycloak-authorization/runtime/pom.xml @@ -22,29 +22,14 @@ io.quarkus quarkus-tls-registry - - org.keycloak - keycloak-core - - - com.sun.activation - jakarta.activation - - - org.keycloak keycloak-policy-enforcer - ${keycloak.version} org.eclipse.angus angus-activation - - org.keycloak - keycloak-adapter-spi - org.keycloak keycloak-authz-client diff --git a/extensions/oidc-client-reactive-filter/deployment/pom.xml b/extensions/oidc-client-reactive-filter/deployment/pom.xml index f9af84357e3f6..1ee3b2fbe7d55 100644 --- a/extensions/oidc-client-reactive-filter/deployment/pom.xml +++ b/extensions/oidc-client-reactive-filter/deployment/pom.xml @@ -45,6 +45,10 @@ junit junit + + org.jboss.resteasy + * + diff --git a/extensions/oidc-client/deployment/pom.xml b/extensions/oidc-client/deployment/pom.xml index 4a9351f66e255..3a5ba97d0858c 100644 --- a/extensions/oidc-client/deployment/pom.xml +++ b/extensions/oidc-client/deployment/pom.xml @@ -50,14 +50,8 @@ org.keycloak - keycloak-core + keycloak-client-common-synced test - - - com.sun.activation - jakarta.activation - - org.eclipse.angus diff --git a/integration-tests/oidc-client-reactive/pom.xml b/integration-tests/oidc-client-reactive/pom.xml index 3ea6362e1a7f0..caab893e3c940 100644 --- a/integration-tests/oidc-client-reactive/pom.xml +++ b/integration-tests/oidc-client-reactive/pom.xml @@ -19,16 +19,6 @@ - - org.keycloak - keycloak-core - - - com.sun.activation - jakarta.activation - - - org.eclipse.angus angus-activation diff --git a/integration-tests/oidc-client/pom.xml b/integration-tests/oidc-client/pom.xml index 5cb7970336c4d..1fcd8c441d6d1 100644 --- a/integration-tests/oidc-client/pom.xml +++ b/integration-tests/oidc-client/pom.xml @@ -20,21 +20,16 @@ - - org.keycloak - keycloak-core - - - com.sun.activation - jakarta.activation - - - org.eclipse.angus angus-activation + + org.keycloak + keycloak-client-common-synced + test + io.quarkus quarkus-junit5 diff --git a/integration-tests/oidc-code-flow/pom.xml b/integration-tests/oidc-code-flow/pom.xml index 5edca73ef37c8..aba6c5e4957d2 100644 --- a/integration-tests/oidc-code-flow/pom.xml +++ b/integration-tests/oidc-code-flow/pom.xml @@ -53,13 +53,8 @@ org.keycloak - keycloak-core - - - com.sun.activation - jakarta.activation - - + keycloak-client-common-synced + test org.eclipse.angus diff --git a/integration-tests/oidc-tenancy/pom.xml b/integration-tests/oidc-tenancy/pom.xml index efc494393105d..dcdce9632edc1 100644 --- a/integration-tests/oidc-tenancy/pom.xml +++ b/integration-tests/oidc-tenancy/pom.xml @@ -30,22 +30,17 @@ io.quarkus quarkus-resteasy-jackson - - org.keycloak - keycloak-core - - - com.sun.activation - jakarta.activation - - - org.eclipse.angus angus-activation + + org.keycloak + keycloak-client-common-synced + test + io.quarkus quarkus-test-keycloak-server diff --git a/integration-tests/oidc-token-propagation/pom.xml b/integration-tests/oidc-token-propagation/pom.xml index 96757a10b9381..16b004cd972b5 100644 --- a/integration-tests/oidc-token-propagation/pom.xml +++ b/integration-tests/oidc-token-propagation/pom.xml @@ -18,21 +18,16 @@ org.jboss.logging commons-logging-jboss-logging - - org.keycloak - keycloak-core - - - com.sun.activation - jakarta.activation - - - org.eclipse.angus angus-activation + + org.keycloak + keycloak-client-common-synced + test + io.quarkus quarkus-test-keycloak-server diff --git a/integration-tests/oidc/pom.xml b/integration-tests/oidc/pom.xml index ff0b6fdd56069..0cc1bc7fa794c 100644 --- a/integration-tests/oidc/pom.xml +++ b/integration-tests/oidc/pom.xml @@ -31,6 +31,11 @@ quarkus-test-keycloak-server test + + org.keycloak + keycloak-client-common-synced + test + org.eclipse.angus angus-activation @@ -40,7 +45,7 @@ quarkus-test-security-oidc test - + io.quarkus quarkus-junit5 @@ -150,7 +155,7 @@ false - ${keycloak.version} + ${keycloak.server.version} @@ -159,7 +164,7 @@ false - ${keycloak.version} + ${keycloak.server.version} diff --git a/integration-tests/smallrye-jwt-oidc-webapp/pom.xml b/integration-tests/smallrye-jwt-oidc-webapp/pom.xml index 802c1498e549c..634885871c998 100644 --- a/integration-tests/smallrye-jwt-oidc-webapp/pom.xml +++ b/integration-tests/smallrye-jwt-oidc-webapp/pom.xml @@ -28,21 +28,16 @@ io.quarkus quarkus-oidc-db-token-state-manager - - org.keycloak - keycloak-core - - - com.sun.activation - jakarta.activation - - - org.eclipse.angus angus-activation + + org.keycloak + keycloak-client-common-synced + test + io.quarkus quarkus-junit5 diff --git a/integration-tests/smallrye-jwt-token-propagation/pom.xml b/integration-tests/smallrye-jwt-token-propagation/pom.xml index 40ec80ae74834..189f841943cfb 100644 --- a/integration-tests/smallrye-jwt-token-propagation/pom.xml +++ b/integration-tests/smallrye-jwt-token-propagation/pom.xml @@ -19,16 +19,6 @@ - - org.keycloak - keycloak-core - - - com.sun.activation - jakarta.activation - - - org.eclipse.angus angus-activation @@ -38,6 +28,11 @@ quarkus-grpc + + org.keycloak + keycloak-client-common-synced + test + io.quarkus quarkus-test-security-jwt diff --git a/test-framework/keycloak-server/pom.xml b/test-framework/keycloak-server/pom.xml index 704f2b9e24481..ed2869755b1f0 100644 --- a/test-framework/keycloak-server/pom.xml +++ b/test-framework/keycloak-server/pom.xml @@ -15,13 +15,7 @@ org.keycloak - keycloak-core - - - com.sun.activation - jakarta.activation - - + keycloak-client-common-synced org.testcontainers