From 969b09f530b3fe6b6a8c3f0d25ad52c1d8b6c970 Mon Sep 17 00:00:00 2001 From: Jan Lieskovsky Date: Wed, 10 Jun 2020 14:50:45 +0200 Subject: [PATCH] [KEYCLOAK-13692] Upgrade to Wildfly "20.0.1.Final" and Infinispan "10.1.8.Final" Co-authored-by: Jan Lieskovsky Co-authored-by: Marek Posolda --- .gitignore | 4 + adapters/oidc/wildfly/wildfly-adapter/pom.xml | 12 + ...InfinispanSessionCacheIdMapperUpdater.java | 36 +- adapters/saml/wildfly/wildfly-adapter/pom.xml | 12 + adapters/spi/jboss-adapter-core/pom.xml | 12 + ...ns,2.10.4,Apache Software License 2.0.txt} | 0 ...re,2.10.4,Apache Software License 2.0.txt} | 0 ...nd,2.10.4,Apache Software License 2.0.txt} | 0 ...se,2.10.4,Apache Software License 2.0.txt} | 0 ...er,2.10.4,Apache Software License 2.0.txt} | 0 ...ns,2.10.4,Apache Software License 2.0.txt} | 0 .../resources/licenses/keycloak/licenses.xml | 34 +- ...astle,bcpkix-jdk15on,1.65,MIT License.txt} | 0 ...astle,bcprov-jdk15on,1.65,MIT License.txt} | 0 ...hat-00001,Apache Software License 2.0.txt} | 0 ...hat-00001,Apache Software License 2.0.txt} | 0 ...hat-00001,Apache Software License 2.0.txt} | 0 ...hat-00001,Apache Software License 2.0.txt} | 0 ...hat-00001,Apache Software License 2.0.txt} | 0 ...hat-00001,Apache Software License 2.0.txt} | 0 .../resources/licenses/rh-sso/licenses.xml | 34 +- ...k15on,1.65.0.redhat-00001,MIT License.txt} | 0 ...k15on,1.65.0.redhat-00001,MIT License.txt} | 0 ...ns,2.10.4,Apache Software License 2.0.txt} | 0 ...re,2.10.4,Apache Software License 2.0.txt} | 0 ...nd,2.10.4,Apache Software License 2.0.txt} | 0 ...se,2.10.4,Apache Software License 2.0.txt} | 0 ...er,2.10.4,Apache Software License 2.0.txt} | 0 ...ns,2.10.4,Apache Software License 2.0.txt} | 0 .../resources/licenses/keycloak/licenses.xml | 38 +- ...nt,4.5.12,Apache Software License 2.0.txt} | 0 ...astle,bcpkix-jdk15on,1.65,MIT License.txt} | 0 ...astle,bcprov-jdk15on,1.65,MIT License.txt} | 0 ...hat-00001,Apache Software License 2.0.txt} | 0 ...hat-00001,Apache Software License 2.0.txt} | 0 ...hat-00001,Apache Software License 2.0.txt} | 0 ...hat-00001,Apache Software License 2.0.txt} | 0 ...hat-00001,Apache Software License 2.0.txt} | 0 ...hat-00001,Apache Software License 2.0.txt} | 0 .../resources/licenses/rh-sso/licenses.xml | 38 +- ...hat-00001,Apache Software License 2.0.txt} | 0 ...k15on,1.65.0.redhat-00001,MIT License.txt} | 0 ...k15on,1.65.0.redhat-00001,MIT License.txt} | 0 .../resources/licenses/keycloak/licenses.xml | 2 +- .../resources/licenses/rh-sso/licenses.xml | 2 +- .../resources/licenses/keycloak/licenses.xml | 2 +- .../resources/licenses/rh-sso/licenses.xml | 2 +- .../feature-packs/server-feature-pack/pom.xml | 10 + .../content/bin/migrate-domain-clustered.cli | 8 + .../content/bin/migrate-domain-standalone.cli | 8 + .../content/bin/migrate-standalone-ha.cli | 8 + .../content/bin/migrate-standalone.cli | 8 + .../resources/licenses/keycloak/licenses.xml | 15 +- ...ils,3.1.1,Apache Software License 2.0.txt} | 0 ....1.8.Final,Apache Software License 2.0.txt | 202 ++++ .../resources/licenses/rh-sso/licenses.xml | 13 +- ....1.8.Final,Apache Software License 2.0.txt | 202 ++++ .../jboss-marshalling/main/module.xml | 37 + .../keycloak-model-infinispan/main/module.xml | 2 + .../resources/licenses/keycloak/licenses.xml | 10 +- ...astle,bcpkix-jdk15on,1.65,MIT License.txt} | 0 ...astle,bcprov-jdk15on,1.65,MIT License.txt} | 0 .../resources/licenses/rh-sso/licenses.xml | 10 +- ...k15on,1.65.0.redhat-00001,MIT License.txt} | 0 ...k15on,1.65.0.redhat-00001,MIT License.txt} | 0 .../resources/licenses/keycloak/licenses.xml | 2 +- .../resources/licenses/rh-sso/licenses.xml | 2 +- .../upgrade-keycloak-to-wildfly-tag.py | 68 ++ .../wildfly/upgrade/__init__.py | 997 ++++++++++++++++++ model/infinispan/pom.xml | 19 + .../InfinispanClusterProviderFactory.java | 68 +- .../KeycloakHotRodMarshallerFactory.java | 2 +- .../cluster/infinispan/LockEntry.java | 38 + .../infinispan/LockEntryPredicate.java | 85 ++ ...ltInfinispanConnectionProviderFactory.java | 32 +- .../infinispan/RemoteCacheProvider.java | 4 + .../ActionTokenReducedKeyWFExternalizer.java | 28 + .../ActionTokenValueEntityWFExternalizer.java | 28 + ...atedClientSessionEntityWFExternalizer.java | 28 + ...dClientSessionPredicateWFExternalizer.java | 28 + ...catedClientSessionStoreWFExternalizer.java | 28 + ...sionAuthNoteUpdateEventWFExternalizer.java | 28 + ...enticationSessionEntityWFExternalizer.java | 28 + .../ClientAddedEventWFExternalizer.java | 28 + .../ClientRemovedEventWFExternalizer.java | 28 + ...ientRemovedSessionEventWFExternalizer.java | 28 + .../ClientTemplateEventWFExternalizer.java | 28 + .../ClientUpdatedEventWFExternalizer.java | 28 + .../GroupAddedEventWFExternalizer.java | 28 + .../GroupListPredicateWFExternalizer.java | 28 + .../GroupMovedEventWFExternalizer.java | 28 + .../GroupRemovedEventWFExternalizer.java | 28 + .../GroupUpdatedEventWFExternalizer.java | 28 + .../HasRolePredicateWFExternalizer.java | 28 + .../InClientPredicateWFExternalizer.java | 28 + ...entityProviderPredicateWFExternalizer.java | 28 + .../InRealmPredicateWFExternalizer.java | 28 + .../InResourcePredicateWFExternalizer.java | 28 + ...ResourceServerPredicateWFExternalizer.java | 28 + .../InScopePredicateWFExternalizer.java | 28 + .../InfinispanExternalizerAdapter.java | 61 ++ .../InitializerStateWFExternalizer.java | 28 + ...LastSessionRefreshEventWFExternalizer.java | 28 + .../LockEntryPredicateWFExternalizer.java | 31 + .../wildfly/LockEntryWFExternalizer.java | 31 + .../LoginFailureEntityWFExternalizer.java | 28 + .../LoginFailureKeyWFExternalizer.java | 28 + .../PolicyRemovedEventWFExternalizer.java | 28 + .../PolicyUpdatedEventWFExternalizer.java | 28 + ...torageInvalidationEventWFExternalizer.java | 28 + .../RealmRemovedEventWFExternalizer.java | 28 + ...ealmRemovedSessionEventWFExternalizer.java | 28 + .../RealmUpdatedEventWFExternalizer.java | 28 + ...lUserLoginFailuresEventWFExternalizer.java | 28 + ...RemoveUserSessionsEventWFExternalizer.java | 28 + .../ResourceRemovedEventWFExternalizer.java | 28 + ...ourceServerRemovedEventWFExternalizer.java | 28 + ...ourceServerUpdatedEventWFExternalizer.java | 28 + .../ResourceUpdatedEventWFExternalizer.java | 28 + .../wildfly/RoleAddedEventWFExternalizer.java | 28 + .../RoleRemovedEventWFExternalizer.java | 28 + .../RoleUpdatedEventWFExternalizer.java | 28 + ...enticationSessionEntityWFExternalizer.java | 28 + ...icationSessionPredicateWFExternalizer.java | 28 + .../ScopeRemovedEventWFExternalizer.java | 28 + .../ScopeUpdatedEventWFExternalizer.java | 28 + .../wildfly/SessionDataWFExternalizer.java | 28 + .../SessionEntityWrapperWFExternalizer.java | 28 + .../SessionPredicateWFExternalizer.java | 28 + ...eRealmInvalidationEventWFExternalizer.java | 28 + ...serConsentsUpdatedEventWFExternalizer.java | 28 + ...erationLinkRemovedEventWFExternalizer.java | 28 + ...erationLinkUpdatedEventWFExternalizer.java | 28 + ...erFullInvalidationEventWFExternalizer.java | 28 + ...erLoginFailurePredicateWFExternalizer.java | 28 + .../UserSessionEntityWFExternalizer.java | 28 + .../UserSessionPredicateWFExternalizer.java | 28 + .../UserUpdatedEventWFExternalizer.java | 28 + .../WrapperClusterEventWFExternalizer.java | 28 + .../InfinispanCacheInitializer.java | 88 +- .../initializer/SessionInitializerWorker.java | 23 +- ...ildfly.clustering.marshalling.Externalizer | 80 ++ .../cluster/infinispan/JDGPutTest.java | 173 +++ .../RemoteCacheSessionsLoaderTest.java | 7 +- .../infinispan/TestCacheManagerFactory.java | 27 +- .../ConcurrencyVersioningTest.java | 7 +- .../DistributedCacheWriteSkewTest.java | 19 +- pom.xml | 78 +- prod-arguments.json | 2 +- .../quarkus/QuarkusCacheManagerProvider.java | 15 +- .../device/DeviceActivityManager.java | 5 + .../integration-arquillian/HOW-TO-RUN.md | 6 +- testsuite/integration-arquillian/pom.xml | 4 +- .../common/cli/configure-crossdc-config.cli | 13 +- .../rest/resource/TestCacheResource.java | 5 +- .../cache-server/jboss/infinispan/pom.xml | 4 +- .../CacheStatisticsControllerEnricher.java | 51 +- .../arquillian/h2/H2TestEnricher.java | 22 + .../crossdc/ActionTokenCrossDCTest.java | 22 + .../integration-arquillian/tests/pom.xml | 12 +- .../keycloak-infinispan.xml | 6 +- 161 files changed, 4275 insertions(+), 275 deletions(-) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/{com.fasterxml.jackson.core,jackson-annotations,2.10.1,Apache Software License 2.0.txt => com.fasterxml.jackson.core,jackson-annotations,2.10.4,Apache Software License 2.0.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/{com.fasterxml.jackson.core,jackson-core,2.10.1,Apache Software License 2.0.txt => com.fasterxml.jackson.core,jackson-core,2.10.4,Apache Software License 2.0.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/{com.fasterxml.jackson.core,jackson-databind,2.10.1,Apache Software License 2.0.txt => com.fasterxml.jackson.core,jackson-databind,2.10.4,Apache Software License 2.0.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/{com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.1,Apache Software License 2.0.txt => com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.4,Apache Software License 2.0.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/{com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.1,Apache Software License 2.0.txt => com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.4,Apache Software License 2.0.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/{com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.1,Apache Software License 2.0.txt => com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.4,Apache Software License 2.0.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/{org.bouncycastle,bcpkix-jdk15on,1.62,MIT License.txt => org.bouncycastle,bcpkix-jdk15on,1.65,MIT License.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/{org.bouncycastle,bcprov-jdk15on,1.62,MIT License.txt => org.bouncycastle,bcprov-jdk15on,1.65,MIT License.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/{com.fasterxml.jackson.core,jackson-annotations,2.10.1.redhat-00001,Apache Software License 2.0.txt => com.fasterxml.jackson.core,jackson-annotations,2.10.4.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/{com.fasterxml.jackson.core,jackson-core,2.10.1.redhat-00001,Apache Software License 2.0.txt => com.fasterxml.jackson.core,jackson-core,2.10.4.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/{com.fasterxml.jackson.core,jackson-databind,2.10.1.redhat-00001,Apache Software License 2.0.txt => com.fasterxml.jackson.core,jackson-databind,2.10.4.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/{com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.1.redhat-00001,Apache Software License 2.0.txt => com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.4.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/{com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.1.redhat-00001,Apache Software License 2.0.txt => com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.4.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/{com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.1.redhat-00001,Apache Software License 2.0.txt => com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.4.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/{org.bouncycastle,bcpkix-jdk15on,1.62.0.redhat-00001,MIT License.txt => org.bouncycastle,bcpkix-jdk15on,1.65.0.redhat-00001,MIT License.txt} (100%) rename distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/{org.bouncycastle,bcprov-jdk15on,1.62.0.redhat-00001,MIT License.txt => org.bouncycastle,bcprov-jdk15on,1.65.0.redhat-00001,MIT License.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/{com.fasterxml.jackson.core,jackson-annotations,2.10.1,Apache Software License 2.0.txt => com.fasterxml.jackson.core,jackson-annotations,2.10.4,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/{com.fasterxml.jackson.core,jackson-core,2.10.1,Apache Software License 2.0.txt => com.fasterxml.jackson.core,jackson-core,2.10.4,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/{com.fasterxml.jackson.core,jackson-databind,2.10.1,Apache Software License 2.0.txt => com.fasterxml.jackson.core,jackson-databind,2.10.4,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/{com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.1,Apache Software License 2.0.txt => com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.4,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/{com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.1,Apache Software License 2.0.txt => com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.4,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/{com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.1,Apache Software License 2.0.txt => com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.4,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/{org.apache.httpcomponents,httpclient,4.5.11,Apache Software License 2.0.txt => org.apache.httpcomponents,httpclient,4.5.12,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/{org.bouncycastle,bcpkix-jdk15on,1.62,MIT License.txt => org.bouncycastle,bcpkix-jdk15on,1.65,MIT License.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/{org.bouncycastle,bcprov-jdk15on,1.62,MIT License.txt => org.bouncycastle,bcprov-jdk15on,1.65,MIT License.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/{com.fasterxml.jackson.core,jackson-annotations,2.10.1.redhat-00001,Apache Software License 2.0.txt => com.fasterxml.jackson.core,jackson-annotations,2.10.4.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/{com.fasterxml.jackson.core,jackson-core,2.10.1.redhat-00001,Apache Software License 2.0.txt => com.fasterxml.jackson.core,jackson-core,2.10.4.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/{com.fasterxml.jackson.core,jackson-databind,2.10.1.redhat-00001,Apache Software License 2.0.txt => com.fasterxml.jackson.core,jackson-databind,2.10.4.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/{com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.1.redhat-00001,Apache Software License 2.0.txt => com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.4.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/{com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.1.redhat-00001,Apache Software License 2.0.txt => com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.4.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/{com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.1.redhat-00001,Apache Software License 2.0.txt => com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.4.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/{org.apache.httpcomponents,httpclient,4.5.11.redhat-00001,Apache Software License 2.0.txt => org.apache.httpcomponents,httpclient,4.5.12.redhat-00001,Apache Software License 2.0.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/{org.bouncycastle,bcpkix-jdk15on,1.62.0.redhat-00001,MIT License.txt => org.bouncycastle,bcpkix-jdk15on,1.65.0.redhat-00001,MIT License.txt} (100%) rename distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/{org.bouncycastle,bcprov-jdk15on,1.62.0.redhat-00001,MIT License.txt => org.bouncycastle,bcprov-jdk15on,1.65.0.redhat-00001,MIT License.txt} (100%) rename distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/{org.codehaus.plexus,plexus-utils,3.0.22,Apache Software License 2.0.txt => org.codehaus.plexus,plexus-utils,3.1.1,Apache Software License 2.0.txt} (100%) create mode 100644 distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/org.infinispan.infinispan-jboss-marshalling,10.1.8.Final,Apache Software License 2.0.txt create mode 100644 distribution/feature-packs/server-feature-pack/src/main/resources/licenses/rh-sso/org.infinispan.infinispan-jboss-marshalling,10.1.8.Final,Apache Software License 2.0.txt create mode 100644 distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/keycloak/org/infinispan/jboss-marshalling/main/module.xml rename distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/{org.bouncycastle,bcpkix-jdk15on,1.62,MIT License.txt => org.bouncycastle,bcpkix-jdk15on,1.65,MIT License.txt} (100%) rename distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/{org.bouncycastle,bcprov-jdk15on,1.62,MIT License.txt => org.bouncycastle,bcprov-jdk15on,1.65,MIT License.txt} (100%) rename distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/{org.bouncycastle,bcpkix-jdk15on,1.60.0.redhat-00001,MIT License.txt => org.bouncycastle,bcpkix-jdk15on,1.65.0.redhat-00001,MIT License.txt} (100%) rename distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/{org.bouncycastle,bcprov-jdk15on,1.60.0.redhat-00001,MIT License.txt => org.bouncycastle,bcprov-jdk15on,1.65.0.redhat-00001,MIT License.txt} (100%) create mode 100755 misc/scripts/upgrade-wildfly/upgrade-keycloak-to-wildfly-tag.py create mode 100644 misc/scripts/upgrade-wildfly/wildfly/upgrade/__init__.py create mode 100644 model/infinispan/src/main/java/org/keycloak/cluster/infinispan/LockEntryPredicate.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ActionTokenReducedKeyWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ActionTokenValueEntityWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticatedClientSessionEntityWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticatedClientSessionPredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticatedClientSessionStoreWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticationSessionAuthNoteUpdateEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticationSessionEntityWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientAddedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientRemovedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientRemovedSessionEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientTemplateEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientUpdatedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupAddedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupListPredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupMovedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupRemovedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupUpdatedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/HasRolePredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InClientPredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InIdentityProviderPredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InRealmPredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InResourcePredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InResourceServerPredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InScopePredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InfinispanExternalizerAdapter.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InitializerStateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LastSessionRefreshEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LockEntryPredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LockEntryWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LoginFailureEntityWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LoginFailureKeyWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/PolicyRemovedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/PolicyUpdatedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/PublicKeyStorageInvalidationEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RealmRemovedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RealmRemovedSessionEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RealmUpdatedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RemoveAllUserLoginFailuresEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RemoveUserSessionsEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceRemovedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceServerRemovedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceServerUpdatedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceUpdatedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RoleAddedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RoleRemovedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RoleUpdatedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RootAuthenticationSessionEntityWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RootAuthenticationSessionPredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ScopeRemovedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ScopeUpdatedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/SessionDataWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/SessionEntityWrapperWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/SessionPredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserCacheRealmInvalidationEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserConsentsUpdatedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserFederationLinkRemovedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserFederationLinkUpdatedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserFullInvalidationEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserLoginFailurePredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserSessionEntityWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserSessionPredicateWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserUpdatedEventWFExternalizer.java create mode 100644 model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/WrapperClusterEventWFExternalizer.java create mode 100644 model/infinispan/src/main/resources/META-INF/services/org.wildfly.clustering.marshalling.Externalizer create mode 100644 model/infinispan/src/test/java/org/keycloak/cluster/infinispan/JDGPutTest.java diff --git a/.gitignore b/.gitignore index b5e00374d83c..67bae0d58d18 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,10 @@ nbproject *.tar *.zip +# Python byte-compiled files # +############################## +*.pyc + # Logs and databases # ###################### *.log diff --git a/adapters/oidc/wildfly/wildfly-adapter/pom.xml b/adapters/oidc/wildfly/wildfly-adapter/pom.xml index 8efaea09681b..a75694bb85bd 100644 --- a/adapters/oidc/wildfly/wildfly-adapter/pom.xml +++ b/adapters/oidc/wildfly/wildfly-adapter/pom.xml @@ -30,6 +30,18 @@ Keycloak Wildfly Integration + + + + jboss-enterprise-maven-repository + JBoss Enterprise Maven Repository + https://maven.repository.redhat.com/ga/ + + false + + + + org.jboss.logging diff --git a/adapters/saml/wildfly-elytron/src/main/java/org/keycloak/adapters/saml/elytron/infinispan/InfinispanSessionCacheIdMapperUpdater.java b/adapters/saml/wildfly-elytron/src/main/java/org/keycloak/adapters/saml/elytron/infinispan/InfinispanSessionCacheIdMapperUpdater.java index ba9f7b231df3..093a85d38dcb 100644 --- a/adapters/saml/wildfly-elytron/src/main/java/org/keycloak/adapters/saml/elytron/infinispan/InfinispanSessionCacheIdMapperUpdater.java +++ b/adapters/saml/wildfly-elytron/src/main/java/org/keycloak/adapters/saml/elytron/infinispan/InfinispanSessionCacheIdMapperUpdater.java @@ -66,14 +66,21 @@ public static SessionIdMapperUpdater addTokenStoreUpdaters(ServletContext servle Configuration ssoCacheConfiguration = cacheManager.getCacheConfiguration(cacheName); if (ssoCacheConfiguration == null) { - Configuration cacheConfiguration = cacheManager.getCacheConfiguration(deploymentSessionCacheName); - if (cacheConfiguration == null) { + // Fallback to use cache "/my-app-deployment-context" as template + ssoCacheConfiguration = tryDefineCacheConfigurationFromTemplate(cacheManager, containerName, cacheName, deploymentSessionCacheName); + + if (ssoCacheConfiguration == null) { + // Fallback to use cache "my-app-deployment-context.war" as template + if (cacheName.lastIndexOf('.') != -1) { + String templateName = cacheName.substring(0, cacheName.lastIndexOf('.')); + ssoCacheConfiguration = tryDefineCacheConfigurationFromTemplate(cacheManager, containerName, cacheName, templateName); + } + } + + if (ssoCacheConfiguration == null) { + // Finally fallback to the cache container default configuration LOG.debugv("Using default configuration for SSO cache {0}.{1}.", containerName, cacheName); ssoCacheConfiguration = cacheManager.getDefaultCacheConfiguration(); - } else { - LOG.debugv("Using distributed HTTP session cache configuration for SSO cache {0}.{1}, configuration taken from cache {2}", - containerName, cacheName, deploymentSessionCacheName); - ssoCacheConfiguration = cacheConfiguration; cacheManager.defineConfiguration(cacheName, ssoCacheConfiguration); } } else { @@ -107,6 +114,23 @@ public void close() throws Exception { } } + /** + * Try to define new cache configuration "newCacheName" from the existing configuration "templateCacheName" . + * + * @return Newly defined configuration or null in case that definition of new configuration was not successful + */ + private static Configuration tryDefineCacheConfigurationFromTemplate(EmbeddedCacheManager cacheManager, String containerName, String newCacheName, String templateCacheName) { + Configuration cacheConfiguration = cacheManager.getCacheConfiguration(templateCacheName); + if (cacheConfiguration != null) { + LOG.debugv("Using distributed HTTP session cache configuration for SSO cache {0}.{1}, configuration taken from cache {2}", + containerName, newCacheName, templateCacheName); + return cacheManager.defineConfiguration(newCacheName, cacheConfiguration); + } else { + // templateCacheName configuration did not exists, so returning null + return null; + } + } + private static void addSsoCacheCrossDcListener(Cache ssoCache, SsoSessionCacheListener listener) { if (ssoCache.getCacheConfiguration().persistence() == null) { return; diff --git a/adapters/saml/wildfly/wildfly-adapter/pom.xml b/adapters/saml/wildfly/wildfly-adapter/pom.xml index 39c189762ec6..d5a64670d491 100755 --- a/adapters/saml/wildfly/wildfly-adapter/pom.xml +++ b/adapters/saml/wildfly/wildfly-adapter/pom.xml @@ -30,6 +30,18 @@ Keycloak Wildfly SAML Adapter + + + + jboss-enterprise-maven-repository + JBoss Enterprise Maven Repository + https://maven.repository.redhat.com/ga/ + + false + + + + org.jboss.logging diff --git a/adapters/spi/jboss-adapter-core/pom.xml b/adapters/spi/jboss-adapter-core/pom.xml index da2aeb17872d..58669a9c46c4 100755 --- a/adapters/spi/jboss-adapter-core/pom.xml +++ b/adapters/spi/jboss-adapter-core/pom.xml @@ -35,6 +35,18 @@ 1.7 + + + + jboss-enterprise-maven-repository + JBoss Enterprise Maven Repository + https://maven.repository.redhat.com/ga/ + + false + + + + org.jboss.logging diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-annotations,2.10.1,Apache Software License 2.0.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-annotations,2.10.4,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-annotations,2.10.1,Apache Software License 2.0.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-annotations,2.10.4,Apache Software License 2.0.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-core,2.10.1,Apache Software License 2.0.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-core,2.10.4,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-core,2.10.1,Apache Software License 2.0.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-core,2.10.4,Apache Software License 2.0.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-databind,2.10.1,Apache Software License 2.0.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-databind,2.10.4,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-databind,2.10.1,Apache Software License 2.0.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-databind,2.10.4,Apache Software License 2.0.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.1,Apache Software License 2.0.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.4,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.1,Apache Software License 2.0.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.4,Apache Software License 2.0.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.1,Apache Software License 2.0.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.4,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.1,Apache Software License 2.0.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.4,Apache Software License 2.0.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.1,Apache Software License 2.0.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.4,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.1,Apache Software License 2.0.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.4,Apache Software License 2.0.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/licenses.xml b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/licenses.xml index 64cf2a95e3f7..057065edeb72 100644 --- a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/licenses.xml +++ b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/licenses.xml @@ -1,91 +1,91 @@ - + org.bouncycastle bcpkix-jdk15on - 1.62 + 1.65 MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html + https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html org.bouncycastle bcprov-jdk15on - 1.62 + 1.65 MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html + https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html com.fasterxml.jackson.core jackson-annotations - 2.10.1 + 2.10.4 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.1/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.4/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.core jackson-core - 2.10.1 + 2.10.4 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.1/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.4/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.core jackson-databind - 2.10.1 + 2.10.4 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.1/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.4/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.jaxrs jackson-jaxrs-base - 2.10.1 + 2.10.4 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider - 2.10.1 + 2.10.4 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.module jackson-module-jaxb-annotations - 2.10.1 + 2.10.4 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.62,MIT License.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.65,MIT License.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.62,MIT License.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.65,MIT License.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.62,MIT License.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.65,MIT License.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.62,MIT License.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.65,MIT License.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-annotations,2.10.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-annotations,2.10.4.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-annotations,2.10.1.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-annotations,2.10.4.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-core,2.10.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-core,2.10.4.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-core,2.10.1.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-core,2.10.4.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-databind,2.10.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-databind,2.10.4.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-databind,2.10.1.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-databind,2.10.4.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.4.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.1.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.4.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.4.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.1.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.4.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.4.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.1.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.4.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/licenses.xml b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/licenses.xml index 18a5e1295fbc..28267c43059a 100644 --- a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/licenses.xml +++ b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/licenses.xml @@ -1,91 +1,91 @@ - + org.bouncycastle bcpkix-jdk15on - 1.62.0.redhat-00001 + 1.65.0.redhat-00001 MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html + https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html org.bouncycastle bcprov-jdk15on - 1.62.0.redhat-00001 + 1.65.0.redhat-00001 MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html + https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html com.fasterxml.jackson.core jackson-annotations - 2.10.1.redhat-00001 + 2.10.4.redhat-00001 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.1/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.4/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.core jackson-core - 2.10.1.redhat-00001 + 2.10.4.redhat-00001 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.1/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.4/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.core jackson-databind - 2.10.1.redhat-00001 + 2.10.4.redhat-00001 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.1/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.4/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.jaxrs jackson-jaxrs-base - 2.10.1.redhat-00001 + 2.10.4.redhat-00001 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider - 2.10.1.redhat-00001 + 2.10.4.redhat-00001 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.module jackson-module-jaxb-annotations - 2.10.1.redhat-00001 + 2.10.4.redhat-00001 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.62.0.redhat-00001,MIT License.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.65.0.redhat-00001,MIT License.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.62.0.redhat-00001,MIT License.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.65.0.redhat-00001,MIT License.txt diff --git a/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.62.0.redhat-00001,MIT License.txt b/distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.65.0.redhat-00001,MIT License.txt similarity index 100% rename from distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.62.0.redhat-00001,MIT License.txt rename to distribution/adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.65.0.redhat-00001,MIT License.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-annotations,2.10.1,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-annotations,2.10.4,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-annotations,2.10.1,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-annotations,2.10.4,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-core,2.10.1,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-core,2.10.4,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-core,2.10.1,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-core,2.10.4,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-databind,2.10.1,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-databind,2.10.4,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-databind,2.10.1,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-databind,2.10.4,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.1,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.4,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.1,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.4,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.1,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.4,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.1,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.4,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.1,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.4,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.1,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.4,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/licenses.xml b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/licenses.xml index 73b702cba914..9d89b3e94254 100644 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/licenses.xml +++ b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/licenses.xml @@ -1,102 +1,102 @@ - + org.bouncycastle bcpkix-jdk15on - 1.62 + 1.65 MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html + https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html org.bouncycastle bcprov-jdk15on - 1.62 + 1.65 MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html + https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html com.fasterxml.jackson.core jackson-annotations - 2.10.1 + 2.10.4 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.1/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.4/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.core jackson-core - 2.10.1 + 2.10.4 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.1/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.4/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.core jackson-databind - 2.10.1 + 2.10.4 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.1/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.4/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.jaxrs jackson-jaxrs-base - 2.10.1 + 2.10.4 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider - 2.10.1 + 2.10.4 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.module jackson-module-jaxb-annotations - 2.10.1 + 2.10.4 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE org.apache.httpcomponents httpclient - 4.5.11 + 4.5.12 Apache Software License 2.0 - https://git-wip-us.apache.org/repos/asf?p=httpcomponents-client.git;a=blob_plain;f=LICENSE.txt;hb=refs/tags/rel/v4.5.11 + https://git-wip-us.apache.org/repos/asf?p=httpcomponents-client.git;a=blob_plain;f=LICENSE.txt;hb=refs/tags/rel/v4.5.12 diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.apache.httpcomponents,httpclient,4.5.11,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.apache.httpcomponents,httpclient,4.5.12,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.apache.httpcomponents,httpclient,4.5.11,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.apache.httpcomponents,httpclient,4.5.12,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.62,MIT License.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.65,MIT License.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.62,MIT License.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.65,MIT License.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.62,MIT License.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.65,MIT License.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.62,MIT License.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.65,MIT License.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-annotations,2.10.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-annotations,2.10.4.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-annotations,2.10.1.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-annotations,2.10.4.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-core,2.10.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-core,2.10.4.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-core,2.10.1.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-core,2.10.4.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-databind,2.10.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-databind,2.10.4.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-databind,2.10.1.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-databind,2.10.4.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.4.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.1.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.10.4.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.4.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.1.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.10.4.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.4.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.1.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.10.4.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/licenses.xml b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/licenses.xml index 8e231db484f2..d8597455f8c4 100644 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/licenses.xml +++ b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/licenses.xml @@ -1,102 +1,102 @@ - + org.bouncycastle bcpkix-jdk15on - 1.62.0.redhat-00001 + 1.65.0.redhat-00001 MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html + https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html org.bouncycastle bcprov-jdk15on - 1.62.0.redhat-00001 + 1.65.0.redhat-00001 MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html + https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html com.fasterxml.jackson.core jackson-annotations - 2.10.1.redhat-00001 + 2.10.4.redhat-00001 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.1/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.4/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.core jackson-core - 2.10.1.redhat-00001 + 2.10.4.redhat-00001 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.1/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.4/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.core jackson-databind - 2.10.1.redhat-00001 + 2.10.4.redhat-00001 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.1/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.4/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.jaxrs jackson-jaxrs-base - 2.10.1.redhat-00001 + 2.10.4.redhat-00001 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider - 2.10.1.redhat-00001 + 2.10.4.redhat-00001 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE com.fasterxml.jackson.module jackson-module-jaxb-annotations - 2.10.1.redhat-00001 + 2.10.4.redhat-00001 Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE + https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE org.apache.httpcomponents httpclient - 4.5.11.redhat-00001 + 4.5.12.redhat-00001 Apache Software License 2.0 - https://git-wip-us.apache.org/repos/asf?p=httpcomponents-client.git;a=blob_plain;f=LICENSE.txt;hb=refs/tags/rel/v4.5.11 + https://git-wip-us.apache.org/repos/asf?p=httpcomponents-client.git;a=blob_plain;f=LICENSE.txt;hb=refs/tags/rel/v4.5.12 diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.apache.httpcomponents,httpclient,4.5.11.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.apache.httpcomponents,httpclient,4.5.12.redhat-00001,Apache Software License 2.0.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.apache.httpcomponents,httpclient,4.5.11.redhat-00001,Apache Software License 2.0.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.apache.httpcomponents,httpclient,4.5.12.redhat-00001,Apache Software License 2.0.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.62.0.redhat-00001,MIT License.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.65.0.redhat-00001,MIT License.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.62.0.redhat-00001,MIT License.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.65.0.redhat-00001,MIT License.txt diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.62.0.redhat-00001,MIT License.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.65.0.redhat-00001,MIT License.txt similarity index 100% rename from distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.62.0.redhat-00001,MIT License.txt rename to distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.65.0.redhat-00001,MIT License.txt diff --git a/distribution/adapters/js-adapter-zip/src/main/resources/licenses/keycloak/licenses.xml b/distribution/adapters/js-adapter-zip/src/main/resources/licenses/keycloak/licenses.xml index bac7cdfbcc59..c1cc60181613 100644 --- a/distribution/adapters/js-adapter-zip/src/main/resources/licenses/keycloak/licenses.xml +++ b/distribution/adapters/js-adapter-zip/src/main/resources/licenses/keycloak/licenses.xml @@ -1,4 +1,4 @@ - + diff --git a/distribution/adapters/js-adapter-zip/src/main/resources/licenses/rh-sso/licenses.xml b/distribution/adapters/js-adapter-zip/src/main/resources/licenses/rh-sso/licenses.xml index bac7cdfbcc59..c1cc60181613 100644 --- a/distribution/adapters/js-adapter-zip/src/main/resources/licenses/rh-sso/licenses.xml +++ b/distribution/adapters/js-adapter-zip/src/main/resources/licenses/rh-sso/licenses.xml @@ -1,4 +1,4 @@ - + diff --git a/distribution/feature-packs/adapter-feature-pack/src/main/resources/licenses/keycloak/licenses.xml b/distribution/feature-packs/adapter-feature-pack/src/main/resources/licenses/keycloak/licenses.xml index bac7cdfbcc59..c1cc60181613 100644 --- a/distribution/feature-packs/adapter-feature-pack/src/main/resources/licenses/keycloak/licenses.xml +++ b/distribution/feature-packs/adapter-feature-pack/src/main/resources/licenses/keycloak/licenses.xml @@ -1,4 +1,4 @@ - + diff --git a/distribution/feature-packs/adapter-feature-pack/src/main/resources/licenses/rh-sso/licenses.xml b/distribution/feature-packs/adapter-feature-pack/src/main/resources/licenses/rh-sso/licenses.xml index bac7cdfbcc59..c1cc60181613 100644 --- a/distribution/feature-packs/adapter-feature-pack/src/main/resources/licenses/rh-sso/licenses.xml +++ b/distribution/feature-packs/adapter-feature-pack/src/main/resources/licenses/rh-sso/licenses.xml @@ -1,4 +1,4 @@ - + diff --git a/distribution/feature-packs/server-feature-pack/pom.xml b/distribution/feature-packs/server-feature-pack/pom.xml index 6b6b67472938..fec2d22cd369 100644 --- a/distribution/feature-packs/server-feature-pack/pom.xml +++ b/distribution/feature-packs/server-feature-pack/pom.xml @@ -80,6 +80,16 @@ + + org.infinispan + infinispan-jboss-marshalling + + + * + * + + + org.keycloak keycloak-authz-policy-common diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli index b0596dfa8b6a..e5c4f2b8df48 100644 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli @@ -695,4 +695,12 @@ if (result != fixed) of /profile=$clusteredProfile/subsystem=keycloak-server/spi end-try end-if +# Migrate from 10.0.2 to 11.0.0 (migration changes for infinispan update from 9.4.18.Final to 10.1.8.Final) + +if (result != org.keycloak.keycloak-model-infinispan) of /profile=$clusteredProfile/subsystem=infinispan/cache-container=keycloak:read-attribute(name=module) + echo Setting class loader for keycloak cache-container in auth-server-clustered profile so JBoss Marshalling works properly with Infinispan 10.x + /profile=$clusteredProfile/subsystem=infinispan/cache-container=keycloak:write-attribute(name=module,value=org.keycloak.keycloak-model-infinispan) + echo +end-if + echo *** End Migration of /profile=$clusteredProfile *** diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli index adc2f8e0f48e..652bbb81804c 100644 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli @@ -596,4 +596,12 @@ if (result != fixed) of /profile=$standaloneProfile/subsystem=keycloak-server/sp end-try end-if +# Migrate from 10.0.2 to 11.0.0 (migration changes for infinispan update from 9.4.18.Final to 10.1.8.Final) + +if (result != org.keycloak.keycloak-model-infinispan) of /profile=$standaloneProfile/subsystem=infinispan/cache-container=keycloak:read-attribute(name=module) + echo Setting class loader for keycloak cache-container so JBoss Marshalling works properly with Infinispan 10.x + /profile=$standaloneProfile/subsystem=infinispan/cache-container=keycloak:write-attribute(name=module,value=org.keycloak.keycloak-model-infinispan) + echo +end-if + echo *** End Migration of /profile=$standaloneProfile *** diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli index d2e52bee17fa..92bcdb612d8a 100644 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli @@ -774,4 +774,12 @@ if (result != fixed) of /subsystem=keycloak-server/spi=hostname/:read-attribute( end-try end-if +# Migrate from 10.0.2 to 11.0.0 (migration changes for infinispan update from 9.4.18.Final to 10.1.8.Final) + +if (result != org.keycloak.keycloak-model-infinispan) of /subsystem=infinispan/cache-container=keycloak:read-attribute(name=module) + echo Setting class loader for keycloak cache-container so JBoss Marshalling works properly with Infinispan 10.x + /subsystem=infinispan/cache-container=keycloak:write-attribute(name=module,value=org.keycloak.keycloak-model-infinispan) + echo +end-if + echo *** End Migration *** diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli index 75e7750dc22d..e82e198c4536 100644 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli @@ -639,4 +639,12 @@ if (result != fixed) of /subsystem=keycloak-server/spi=hostname/:read-attribute( end-try end-if +# Migrate from 10.0.2 to 11.0.0 (migration changes for infinispan update from 9.4.18.Final to 10.1.8.Final) + +if (result != org.keycloak.keycloak-model-infinispan) of /subsystem=infinispan/cache-container=keycloak:read-attribute(name=module) + echo Setting class loader for keycloak cache-container so JBoss Marshalling works properly with Infinispan 10.x + /subsystem=infinispan/cache-container=keycloak:write-attribute(name=module,value=org.keycloak.keycloak-model-infinispan) + echo +end-if + echo *** End Migration *** diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/licenses.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/licenses.xml index acd2e51cafc0..b765857d6b2b 100644 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/licenses.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/licenses.xml @@ -1,4 +1,4 @@ - + @@ -103,7 +103,7 @@ org.codehaus.plexus plexus-utils - 3.0.22 + 3.1.1 Apache Software License 2.0 @@ -551,6 +551,17 @@ + + org.infinispan + infinispan-jboss-marshalling + 10.1.8.Final + + + Apache Software License 2.0 + https://raw.githubusercontent.com/infinispan/infinispan/master/LICENSE.md + + + com.fasterxml.jackson.dataformat jackson-dataformat-cbor diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/org.codehaus.plexus,plexus-utils,3.0.22,Apache Software License 2.0.txt b/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/org.codehaus.plexus,plexus-utils,3.1.1,Apache Software License 2.0.txt similarity index 100% rename from distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/org.codehaus.plexus,plexus-utils,3.0.22,Apache Software License 2.0.txt rename to distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/org.codehaus.plexus,plexus-utils,3.1.1,Apache Software License 2.0.txt diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/org.infinispan.infinispan-jboss-marshalling,10.1.8.Final,Apache Software License 2.0.txt b/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/org.infinispan.infinispan-jboss-marshalling,10.1.8.Final,Apache Software License 2.0.txt new file mode 100644 index 000000000000..e06d2081865a --- /dev/null +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/keycloak/org.infinispan.infinispan-jboss-marshalling,10.1.8.Final,Apache Software License 2.0.txt @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/rh-sso/licenses.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/rh-sso/licenses.xml index 2f27948fd427..e504e7c83e42 100644 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/rh-sso/licenses.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/rh-sso/licenses.xml @@ -1,4 +1,4 @@ - + @@ -551,6 +551,17 @@ + + org.infinispan + infinispan-jboss-marshalling + 10.1.8.Final + + + Apache Software License 2.0 + https://raw.githubusercontent.com/infinispan/infinispan/master/LICENSE.md + + + com.fasterxml.jackson.dataformat jackson-dataformat-cbor diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/rh-sso/org.infinispan.infinispan-jboss-marshalling,10.1.8.Final,Apache Software License 2.0.txt b/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/rh-sso/org.infinispan.infinispan-jboss-marshalling,10.1.8.Final,Apache Software License 2.0.txt new file mode 100644 index 000000000000..e06d2081865a --- /dev/null +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/licenses/rh-sso/org.infinispan.infinispan-jboss-marshalling,10.1.8.Final,Apache Software License 2.0.txt @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/keycloak/org/infinispan/jboss-marshalling/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/keycloak/org/infinispan/jboss-marshalling/main/module.xml new file mode 100644 index 000000000000..ed453387275e --- /dev/null +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/keycloak/org/infinispan/jboss-marshalling/main/module.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/keycloak/org/keycloak/keycloak-model-infinispan/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/keycloak/org/keycloak/keycloak-model-infinispan/main/module.xml index 500e1a48ff2f..8216a0c265c9 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/keycloak/org/keycloak/keycloak-model-infinispan/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/keycloak/org/keycloak/keycloak-model-infinispan/main/module.xml @@ -34,8 +34,10 @@ + + diff --git a/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/licenses.xml b/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/licenses.xml index a512c43b4883..14a346ccea7b 100644 --- a/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/licenses.xml +++ b/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/licenses.xml @@ -1,25 +1,25 @@ - + org.bouncycastle bcpkix-jdk15on - 1.62 + 1.65 MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html + https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html org.bouncycastle bcprov-jdk15on - 1.62 + 1.65 MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html + https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html diff --git a/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.62,MIT License.txt b/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.65,MIT License.txt similarity index 100% rename from distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.62,MIT License.txt rename to distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.65,MIT License.txt diff --git a/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.62,MIT License.txt b/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.65,MIT License.txt similarity index 100% rename from distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.62,MIT License.txt rename to distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.65,MIT License.txt diff --git a/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/licenses.xml b/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/licenses.xml index 3358ff5f5d20..b07cd6dba8dc 100644 --- a/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/licenses.xml +++ b/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/licenses.xml @@ -1,25 +1,25 @@ - + org.bouncycastle bcpkix-jdk15on - 1.60.0.redhat-00001 + 1.65.0.redhat-00001 MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv60/LICENSE.html + https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html org.bouncycastle bcprov-jdk15on - 1.60.0.redhat-00001 + 1.65.0.redhat-00001 MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv60/LICENSE.html + https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html diff --git a/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.60.0.redhat-00001,MIT License.txt b/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.65.0.redhat-00001,MIT License.txt similarity index 100% rename from distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.60.0.redhat-00001,MIT License.txt rename to distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.65.0.redhat-00001,MIT License.txt diff --git a/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.60.0.redhat-00001,MIT License.txt b/distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.65.0.redhat-00001,MIT License.txt similarity index 100% rename from distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.60.0.redhat-00001,MIT License.txt rename to distribution/saml-adapters/as7-eap6-adapter/as7-modules/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.65.0.redhat-00001,MIT License.txt diff --git a/distribution/saml-adapters/wildfly-adapter/wildfly-modules/src/main/resources/licenses/keycloak/licenses.xml b/distribution/saml-adapters/wildfly-adapter/wildfly-modules/src/main/resources/licenses/keycloak/licenses.xml index bac7cdfbcc59..c1cc60181613 100644 --- a/distribution/saml-adapters/wildfly-adapter/wildfly-modules/src/main/resources/licenses/keycloak/licenses.xml +++ b/distribution/saml-adapters/wildfly-adapter/wildfly-modules/src/main/resources/licenses/keycloak/licenses.xml @@ -1,4 +1,4 @@ - + diff --git a/distribution/saml-adapters/wildfly-adapter/wildfly-modules/src/main/resources/licenses/rh-sso/licenses.xml b/distribution/saml-adapters/wildfly-adapter/wildfly-modules/src/main/resources/licenses/rh-sso/licenses.xml index bac7cdfbcc59..c1cc60181613 100644 --- a/distribution/saml-adapters/wildfly-adapter/wildfly-modules/src/main/resources/licenses/rh-sso/licenses.xml +++ b/distribution/saml-adapters/wildfly-adapter/wildfly-modules/src/main/resources/licenses/rh-sso/licenses.xml @@ -1,4 +1,4 @@ - + diff --git a/misc/scripts/upgrade-wildfly/upgrade-keycloak-to-wildfly-tag.py b/misc/scripts/upgrade-wildfly/upgrade-keycloak-to-wildfly-tag.py new file mode 100755 index 000000000000..94fcfaed9513 --- /dev/null +++ b/misc/scripts/upgrade-wildfly/upgrade-keycloak-to-wildfly-tag.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python + +# * +# * Copyright 2020 Red Hat, Inc. and/or its affiliates +# * and other contributors as indicated by the @author tags. +# * +# * Licensed under the Apache License, Version 2.0 (the "License"); +# * you may not use this file except in compliance with the License. +# * You may obtain a copy of the License at +# * +# * http://www.apache.org/licenses/LICENSE-2.0 +# * +# * Unless required by applicable law or agreed to in writing, software +# * distributed under the License is distributed on an "AS IS" BASIS, +# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# * See the License for the specific language governing permissions and +# * limitations under the License. +# * +# * +# +# Purpose: Update various necessary bits of Keycloak to align with the specified Wildfly tag. Perform this by: +# +# * Incrementing the jboss-parent element version if necessary, +# * Updating versions of artifacts shared with Wildfly and Wildfly Core in main Keycloak pom.xml file, +# * Updating versions of artifacts shared with Wildfly and Wildfly Core utilized by Keycloak adapters +# +# Usage: Run as, e.g.: +# ./upgrade-keycloak-to-wildfly-tag.py 20.0.0.Final +# +# Or call the script without arguments to get the further help + +import os, sys + +import wildfly.upgrade as wu + +def usage(): + print("Run as: \n\t%s Wildfly.Tag.To.Upgrade.To \ne.g.:\n\t%s 20.0.0.Final\n" % (sys.argv[0], sys.argv[0])) + +if __name__ == '__main__': + + if len(sys.argv) != 2: + usage() + sys.exit(1) + + wildflyTag = wu.isWellFormedWildflyTag(sys.argv[1]) + wildflyPomBaseUrl = "https://github.com/wildfly/wildfly/raw/%s/pom.xml" % wildflyTag + + wu.getModuleLogger().info("Retrieving Wildfly's pom.xml for tag: %s" % wildflyTag) + wildflyPomFile = wu.saveUrlToNamedTemporaryFile(wildflyPomBaseUrl) + + wildflyPomXmlRoot = wu.getXmlRoot(wildflyPomFile) + wildflyCoreTag = wu.isWellFormedWildflyTag( wu.getPomProperty(wildflyPomXmlRoot, "version.org.wildfly.core")[0].text ) + wildflyCorePomBaseUrl = "https://github.com/wildfly/wildfly-core/raw/%s/pom.xml" % wildflyCoreTag + + wu.getModuleLogger().info("Retrieving Wildfly-Core pom.xml for tag: %s" % wildflyCoreTag) + wildflyCorePomFile = wu.saveUrlToNamedTemporaryFile(wildflyCorePomBaseUrl) + + if wildflyPomFile != None and wildflyCorePomFile != None: + + # Subtask - Update main Keycloak pom.xml file + wu.updateMainKeycloakPomFile(wildflyPomFile, wildflyCorePomFile) + # Subtask - Update Keycloak adapters + wu.performKeycloakAdapterLicenseFilesUpdateTask(wildflyPomFile, wildflyCorePomFile) + # Subtask - Update RH-SSO adapters + wu.performRhssoAdapterLicenseFilesUpdateTask(wildflyPomFile, wildflyCorePomFile) + + for filename in [wildflyPomFile, wildflyCorePomFile]: + os.remove(filename) diff --git a/misc/scripts/upgrade-wildfly/wildfly/upgrade/__init__.py b/misc/scripts/upgrade-wildfly/wildfly/upgrade/__init__.py new file mode 100644 index 000000000000..1e169d64de89 --- /dev/null +++ b/misc/scripts/upgrade-wildfly/wildfly/upgrade/__init__.py @@ -0,0 +1,997 @@ +# +# Copyright 2020 Red Hat, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +""" +Keycloak package for Python to assists with upgrading of Keycloak to +particular Wildfly tag / release. + +Copyright 2020 Red Hat, Inc. and/or its affiliates +and other contributors as indicated by the @author tags. + +To use, simply 'import wildfly.upgrade' and call the necessary routines. +""" + +import colorlog, copy, itertools, logging, lxml.etree, os, os.path, re, sys + +from packaging.version import parse as parseVersion +from shutil import copyfileobj +from subprocess import check_call, check_output +from tempfile import NamedTemporaryFile +from urllib.request import HTTPError, urlopen + +__all__ = [ + 'getElementsByXPath', + 'getKeycloakGitRepositoryRoot', + 'getModuleLogger', + 'getStepLogger', + 'getTaskLogger', + 'getPomDependencyByArtifactId', + 'getPomProperty', + 'getVersionOfPomDependency', + 'getXmlRoot', + 'isWellFormedWildflyTag', + 'loadGavDictionaryFromGavFile', + 'loadGavDictionaryFromXmlFile', + 'saveUrlToNamedTemporaryFile' + 'updateAdapterLicenseFile', + 'updateMainKeycloakPomFile' +] + +__author__ = "Jan Lieskovsky " +__status__ = "Alpha" +__version__ = "0.0.1" + +# +# Various data structures for the module +# +# Module loggers +_moduleLoggers = {} +# 'pom' namespace prefix definition for lxml +_pom_ns = "http://maven.apache.org/POM/4.0.0" +# Maven GAV (groupId:artifactId:version) related stuff +_gav_elements = ['groupId', 'artifactId', 'version'] +_gav_delimiter = ':' + +# +# Various base helper routines +# + +def getKeycloakGitRepositoryRoot(): + """ + Return the absolute path to the Keycloak git repository clone. + """ + return check_output(['git', 'rev-parse', '--show-toplevel']).decode('utf-8').rstrip() + +def isWellFormedWildflyTag(tag): + """ + Well formed Wildfly & Wildfly Core tag seems to follow the patterns: + 1) First a digit followed by a dot both of them exactly three times. + 2) Followed: + a) Either by a "Final" suffix, e.g.: "20.0.0.Final", + b) Or by one of "Alpha", "Beta", "CR" suffices, followed by one digit + + Verifies the tag provided as routine argument follows this schema. + + Exits with error if not. + """ + if tag and not re.search(r'(\d\.){3}((Alpha|Beta|CR)\d|Final)', tag): + getModuleLogger().error("Invalid Wildfly tag '%s', exiting!" % tag) + sys.exit(1) + else: + return tag + +def saveUrlToNamedTemporaryFile(baseUrl): + """ + Fetch URL specified as routine argument to named temporary file and + return the name of that file. + + Otherwise, log an error and exit with failure if HTTP error occurred. + """ + try: + with urlopen(baseUrl) as response: + with NamedTemporaryFile(delete=False) as outfile: + copyfileobj(response, outfile) + return outfile.name + except HTTPError: + getModuleLogger().error("Failed to download the file from '%s'!. Double-check the URL and retry!" % baseUrl) + sys.exit(1) + + return None + +def _emptyNewLine(): + """ + Print additional new line. + """ + print() + +def _logErrorAndExitIf(errorMessage, condition): + """ + Log particular error message and exit with error if specified condition was + met. + """ + if condition: + _emptyNewLine() + getModuleLogger().error(errorMessage) + _emptyNewLine() + sys.exit(1) + +# +# Logging facility for the module +# + +def setupLogger(loggerName = 'upgrade-wildfly', loggerFormatter = '%(log_color)s[%(levelname)s] %(name)s: %(message)s'): + """ + Initialize logger with custom 'loggerName' and custom 'loggerFormatter'. + """ + stdOutLogHandler = logging.StreamHandler(sys.stdout) + loggerFormatter = colorlog.ColoredFormatter(loggerFormatter) + stdOutLogHandler.setFormatter(loggerFormatter) + logger = logging.getLogger(loggerName) + logger.addHandler(stdOutLogHandler) + logger.setLevel(logging.INFO) + + return logger + +def getLogger(loggerName = 'Upgrade Wildfly for Keycloak', loggerFormatter = '%(log_color)s[%(levelname)s] [%(name)s]: %(message)s'): + """ + Return instance of a logger with custom 'loggerName' and custom + 'loggerFormatter' or setup such a logger if it doesn't exist yet. + """ + global _moduleLoggers + if not loggerName in _moduleLoggers: + _moduleLoggers[loggerName] = setupLogger(loggerName, loggerFormatter) + + return _moduleLoggers[loggerName] + +def getModuleLogger(): + """ + Return global logger for the module. + """ + return getLogger() + +def getTaskLogger(taskLoggerName): + """ + Return custom logger handling (sub)tasks. + """ + taskLogFormatter = '\n%(log_color)s[%(levelname)s] [%(name)s] Performing Task:\n\n\t%(message)s\n' + return getLogger(loggerName = taskLoggerName, loggerFormatter = taskLogFormatter) + +def getStepLogger(): + """ + Return custom logger handling steps within tasks. + """ + stepLoggerName = 'step' + stepLoggerFormatter = '\t%(log_color)s[%(levelname)s]: %(message)s' + + return getLogger(stepLoggerName, stepLoggerFormatter) + +# +# Various XML search related helper routines +# + +def getElementsByXPath(xmlTree, xPath, nameSpace = { "pom" : "%s" % _pom_ns }): + """ + Given the XML tree return the list of elements matching the 'xPath' from + the XML 'nameSpace'. 'nameSpace' is optional argument. If not specified + defaults to the POM XML namespace. + + Returns empty list if no such element specified by 'xPath' is found. + """ + return xmlTree.xpath(xPath, namespaces = nameSpace) + +def getPomDependencyByArtifactId(xmlTree, artifactIdText): + """ + Given the XML tree return list of POM dependency elements matching + 'artifactIdText' in the text of the element. + + Returns empty list if no such element with 'artifactIdText' is found. + """ + return xmlTree.xpath('/pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency/pom:artifactId[text()="%s"]' % artifactIdText, namespaces = { "pom" : "%s" % _pom_ns }) + +def getPomProperty(xmlTree, propertyText): + """ + Given the XML tree return list of POM property elements matching + 'propertyText' in the text of the element. + + Returns empty list if no such element with 'propertyText' is found. + """ + return xmlTree.xpath('/pom:project/pom:properties/pom:%s' % propertyText, namespaces = { "pom" : "%s" % _pom_ns }) + +def getVersionOfPomDependency(xmlElem, groupIdText, artifactIdText): + """ + Given the list of XML POM dependency elements, return the value of + '' subelement if 'groupIdText' and 'artifactIdText' match the + value of groupId and artifactId subelements in the dependency. + + Otherwise, return None. + """ + version = None + for entry in xmlElem: + dependencyElem = entry.getparent() + for subelem in list(dependencyElem): + if subelem.tag == '{%s}groupId' % _pom_ns and subelem.text != groupIdText: + break + if subelem.tag == '{%s}artifactId' % _pom_ns and subelem.text != artifactIdText: + break + if subelem.tag == '{%s}version' % _pom_ns: + version = subelem.text + break + + return version + +def getXmlRoot(filename): + """ + Return root element of the XML tree by parsing the content of 'filename'. + + Exit with error in the case of a failure. + """ + try: + xmlRoot = lxml.etree.parse(filename).getroot() + return xmlRoot + except lxml.etree.XMLSyntaxError: + getXmlRootFailureMessage = ( + "Failed to get the root element of the XML tree from '%s' file! " + "Ensure the file is not opened in another process, and retry!" % + filename + ) + getModuleLogger().error(getXmlRootFailureMessage) + sys.exit(1) + +# +# Common helper routines utilized by various tasks +# performed within a Wildfly upgrade +# + +def getProductNamesForKeycloakPomProfile(profile = 'community'): + """ + Return values of and elements + of the specified Keycloak main pom.xml 'profile' + """ + (productName, productNameFull) = (None, None) + + _logErrorAndExitIf( + "Invalid profile name '%s'! It can be only one of 'community' or 'product'!" % profile, + profile not in ['community', 'product'] + ) + + # Absolute path to main Keycloak pom.xml within the repo + mainKeycloakPomPath = getKeycloakGitRepositoryRoot() + "/pom.xml" + keycloakPomXmlTreeRoot = getXmlRoot(mainKeycloakPomPath) + pomProfileIdElem = getElementsByXPath(keycloakPomXmlTreeRoot, '/pom:project/pom:profiles/pom:profile/pom:id[text()="%s"]' % profile) + _logErrorAndExitIf( + "Can't locate the '%s' profile in main Keycloak pom.xml file!" % profile, + len(pomProfileIdElem) != 1 + ) + + pomProfileElem = pomProfileIdElem[0].getparent() + pomProductNameElem = getElementsByXPath(pomProfileElem, './pom:properties/pom:product.name') + _logErrorAndExitIf( + "Can't determine product name from '%s' profile of main Keycloak pom.xml file!" % profile, + len(pomProductNameElem) != 1 + ) + productName = pomProductNameElem[0].text + pomProductNameFullElem = getElementsByXPath(pomProfileElem, './pom:properties/pom:product.name') + _logErrorAndExitIf( + "Can't determine the full product name from '%s' profile of main Keycloak pom.xml file!" % profile, + len(pomProductNameFullElem) != 1 + ) + productNameFull = pomProductNameFullElem[0].text + + return (productName, productNameFull) + +def getNumericArtifactVersion(gavDictionary, gavDictionaryKey): + """ + Extract the numeric version of the 'gavDictionaryKey' GA artifact + from 'gavDictionary'. + + 1) Return dictionary value of 'gavDictionaryKey' directly + if it's type is not a dictionary again. + + 2) If the 'gavDictionaryKey' value is a child dictionary + containing exactly one key, namely the name of the POM + to which the numeric version corresponds + to, return the numeric artifact version from the + subdictionary value. + """ + gavDictionaryValue = gavDictionary[gavDictionaryKey] + if not isinstance(gavDictionaryValue, dict): + # First check if obtained artifact version is really numeric + _logErrorAndExitIf( + "Extracted '%s' artifact version isn't numeric: '%s'!" % (gavDictionaryKey, gavDictionaryValue), + not re.match(r'\d.*', gavDictionaryValue) + ) + return gavDictionaryValue + + else: + subKey = gavDictionaryValue.keys() + # Python starting from 3.3.1 returns dict_keys instead of a list when + # calling dictionary items(). Convert dict_keys back to list if needed + if not isinstance(subKey, list): + subKey = list(subKey) + # Sanity check if there's just one candidate numeric version for + # the artifact. This shouldn't ever happen, but better to check + _logErrorAndExitIf( + "Artifact '%s' can't have more than just one versions!" % gavDictionaryKey, + len(subKey) != 1 + ) + # Fetch the numeric artifact version from the subdictionary value + gavDictionaryValue = gavDictionary[gavDictionaryKey][subKey[0]] + # Finally check if obtained artifact version is really numeric + _logErrorAndExitIf( + "Extracted '%s' artifact version isn't numeric: '%s'!" % (gavDictionaryKey, gavDictionaryValue), + not re.match(r'\d.*', gavDictionaryValue) + ) + return gavDictionaryValue + +def loadGavDictionaryFromGavFile(gavFile): + """ + Load the content of 'gavFile' into Maven GAV Python dictionary, where + dictionary key is reppresented by 'groupId:artifactId' part of the GAV + entry, and value is represented by the 'version' field of the GAV entry. + """ + gavDictionary = {} + with open(gavFile) as inputFile: + for line in inputFile: + try: + groupId, artifactId, version = line.rstrip().split(_gav_delimiter, 3) + gavDictionaryKey = groupId + _gav_delimiter + artifactId + gavDictionaryValue = version + # Exit with error if obtained artifact version doesn't start + # with a number + _logErrorAndExitIf( + "Extracted '%s' artifact version isn't numeric: '%s'!" % (gavDictionaryKey, gavDictionaryValue), + not re.match(r'\d.*', gavDictionaryValue) + ) + gavDictionary[gavDictionaryKey] = gavDictionaryValue + except ValueError: + # Ignore malformed GAV entries containing more than three + # fields separated by the ':' character + continue + + return gavDictionary + +def loadGavDictionaryFromXmlFile(xmlFile, xPathPrefix = '/pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency/pom:', nameSpace = { "pom" : "%s" % _pom_ns }): + """ + Convert XML dependencies from 'xmlFile' into Maven GAV + (groupId:artifactId:version) Python dictionary, where + dictionary key is represented by 'groupId:artifactId' + part of the GAV entry, and value is: + + * Either 'version' field of the GAV entry directly, + if the version is numeric, + + * Or another child dictionary in the case the 'version' field + of the GAV entry represents a property within the + XML file. In this case, the key of the child dictionary + item is the name of such a XML element. + The value of the child dictionary item is the + value of the itself. + + Returns GAV dictionary corresponding to 'xmlFile' + or exits with error in case of a failure + """ + xmlRoot = getXmlRoot(xmlFile) + # Construct the final union xPath query returning all three + # (GAV) subelements of a particular dependency element + gavXPathQuery = '|'.join(map(lambda x: xPathPrefix + x, _gav_elements)) + xmlDependencyElements = getElementsByXPath(xmlRoot, gavXPathQuery, nameSpace) + _logErrorAndExitIf( + "Failed to load dependencies from XML file '%s'!" % xmlFile, + len(xmlDependencyElements) == 0 + ) + gavDictionary = {} + # Divide original list into sublists by three elements -- one sublist per GAV entry + for gavEntry in [xmlDependencyElements[i:i + 3] for i in range(0, len(xmlDependencyElements), 3)]: + (groupIdElem, artifactIdElem, versionElem) = (gavEntry[0], gavEntry[1], gavEntry[2]) + _logErrorAndExitIf( + "Failed to load '%s' dependency from XML file!" % gavEntry, + groupIdElem is None or artifactIdElem is None or versionElem is None + ) + gavDictKey = groupIdElem.text + _gav_delimiter + artifactIdElem.text + gavDictValue = versionElem.text + if re.match(r'\d.*', gavDictValue): + # Store the numeric artifact version into GAV dictionary + gavDictionary[gavDictKey] = gavDictValue + else: + childDictKey = gavDictValue + while not re.match(r'\d.*', gavDictValue): + gavDictValue = re.sub(r'^\${', '', gavDictValue) + gavDictValue = re.sub(r'}$', '', gavDictValue) + propertyElem = getPomProperty(xmlRoot, gavDictValue) + # Handle corner case when artifact version isn't value of some POM element, + # but rather value of some xPath within the XML file. Like for example the case of + # 'project.version' value. Create a custom XPath query to fetch the actual numeric value + if not propertyElem: + # Build xpath from version value, turn e.g. 'project.version' to '/pom:project/pom:version' + customXPath = ''.join(list(map(lambda x: '/pom:' + x, gavDictValue.split('.')))) + # Fetch the numeric version + propertyElem = getElementsByXPath(xmlRoot, customXPath) + # Exit with error if it wasn't possible to determine the artifact version even this way + _logErrorAndExitIf( + "Unable to determine the version of the '%s' GA artifact, exiting!" % gavDictKey, + len(propertyElem) != 1 + ) + # Assign the value of POM or result of custom XPath + # back to 'gavDictValue' field and check again + gavDictValue = propertyElem[0].text + + # Store the numeric artifact version into GAV dictionary, keeping + # the original POM name as the key of the child dictionary + gavDictionary[gavDictKey] = { '%s' % childDictKey : '%s' % gavDictValue } + + return gavDictionary + +def mergeTwoGavDictionaries(firstGavDictionary, secondGavDictionary): + """ + Return a single output GAV dictionary containing the united content of + 'firstGavDictionary' and 'secondGavDictionary' input GAV dictionaries. + + The process of merge is performed as follows: + + 1) Distinct keys from both GAV dictionaries are copied into the output + dictionary. + + 2) If the key is present in both input GAV dictionaries (IOW it's shared), + the value of the higher version from both input dictionaries is used + as the final value for the united dictionary entry. + """ + unitedGavDictionary = copy.deepcopy(firstGavDictionary) + for secondDictKey in secondGavDictionary.keys(): + try: + # Subcase when dictionary key from second GAV dictionary is + # already present in the resulting GAV dictionary + + # Value of the key from resulting GAV dictionary might be a child + # dictionary again. Get the numeric version of the artifact first + currentValue = getNumericArtifactVersion(unitedGavDictionary, secondDictKey) + # Vaue of the key from second GAV dictionary might be a child + # dictionary again. Get the numeric version of the artifact first + secondDictValue = getNumericArtifactVersion(secondGavDictionary, secondDictKey) + + # Update the artifact version in resulting GAV dictionary only if + # the value from the second dictionary is higher than the current + # one + if parseVersion(secondDictValue) > parseVersion(currentValue): + unitedGavDictionary[secondDictKey] = secondDictValue + + except KeyError: + # Subcase when dictionary key from the second GAV dictionary is + # not present in the resulting GAV dictionary. Insert it + unitedGavDictionary[secondDictKey] = secondGavDictionary[secondDictKey] + + return unitedGavDictionary + +# +# Data structures and routines to assist with the updates of +# the main Keycloak pom.xml necessary for Wildfly upgrade +# + +# List of artifacts from main Keycloak pom.xml excluded from upgrade even though they would +# be usually applicable for the update. This allows to handle special / corner case like for +# example the ones below: +# +# * The version / release tag of specific artifact, as used by upstream of that artifact is +# actually higher than the version, currently used in Wildfly / Wildfly Core. But the Python +# version comparing algorithm used by this script, treats it as a lower one +# (the cache of ApacheDS artifact below), +# * Explicitly avoid the update of certain artifact due whatever reason +# +# Add new entries to this list by moving them out of the _keycloakToWildflyProperties +# dictionary as necessary +_excludedProperties = [ + # Intentionally avoid Apache DS downgrade from "2.0.0.AM26" to Wildfly's current + # "2.0.0-M24" version due to recent KEYCLOAK-14162 + "apacheds.version" +] + +# List of Keycloak specific properties listed in main Keycloak pom.xml file. These entries: +# +# * Either don't represent an artifact version (e.g. "product.rhsso.version" below), +# * Or represent an artifact version, but aren't used listed in Wildfly's or +# Wildfly-Core's POMs (the artifact is either not referenced in those POM files at all +# or explicitly excluded in some of them) +_keycloakSpecificProperties = [ + "product.rhsso.version", + "product.build-time", + "eap.version", + "jboss.as.version", + "jboss.as.subsystem.test.version", + "jboss.aesh.version", + "jackson.databind.version", + "jackson.annotations.version", + "resteasy.undertow.version", + "owasp.html.sanitizer.version", + "sun.xml.ws.version", + "jetty92.version", + "jetty93.version", + "jetty94.version", + "ua-parser.version", + "version.com.openshift.openshift-restclient-java", + "apacheds.codec.version", + "google.zxing.version", + "freemarker.version", + "jetty9.version", + "liquibase.version", + "mysql.version", + "osgi.version", + "pax.web.version", + "postgresql.version", + "mariadb.version", + "mssql.version", + "twitter4j.version", + "jna.version", + "greenmail.version", + "jmeter.version", + "selenium.version", + "xml-apis.version", + "subethasmtp.version", + "replacer.plugin.version", + "jboss.as.plugin.version", + "jmeter.plugin.version", + "jmeter.analysis.plugin.version", + "minify.plugin.version", + "osgi.bundle.plugin.version", + "nexus.staging.plugin.version", + "frontend.plugin.version", + "docker.maven.plugin.version", + "surefire.memory.Xms", + "surefire.memory.Xmx", + "surefire.memory.metaspace", + "surefire.memory.metaspace.max", + "surefire.memory.settings", + "tomcat7.version", + "tomcat8.version", + "tomcat9.version", + "spring-boot15.version", + "spring-boot21.version", + "spring-boot22.version", + "webauthn4j.version", + "org.apache.kerby.kerby-asn1.version", +] + +# Mapping of artifact name as used in the main Keycloak pom.xml file to the name +# of the same artifact listed in Wildfly's or Wildfly-Core's pom.xml file +_keycloakToWildflyProperties = { + "wildfly.version" : "version", + "wildfly.build-tools.version" : "version.org.wildfly.build-tools", + # Skip "eap.version" since Keycloak specific + "wildfly.core.version" : "version.org.wildfly.core", + # Skip "jboss.as.version" since Keycloak specific + # Skip "jboss.as.subsystem.test.version" since Keycloak specific + # Skip "jboss.aesh.version" since Keycloak specific + "aesh.version" : "version.org.aesh", + "apache.httpcomponents.version" : "version.org.apache.httpcomponents.httpclient", + "apache.httpcomponents.httpcore.version" : "version.org.apache.httpcomponents.httpcore", + "apache.mime4j.version" : "version.org.apache.james.apache-mime4j", + "jboss.dmr.version" : "version.org.jboss.jboss-dmr", + "bouncycastle.version" : "version.org.bouncycastle", + "cxf.version" : "version.org.apache.cxf", + "cxf.jetty.version" : "version.org.apache.cxf", + "cxf.jaxrs.version" : "version.org.apache.cxf", + "cxf.undertow.version" : "version.org.apache.cxf", + "dom4j.version" : "version.dom4j", + "h2.version" : "version.com.h2database", + "jakarta.persistence.version" : "version.jakarta.persistence", + "hibernate.core.version" : "version.org.hibernate", + "hibernate.c3p0.version" : "version.org.hibernate", + "infinispan.version" : "version.org.infinispan", + "jackson.version" : "version.com.fasterxml.jackson", + # Skip "jackson.databind.version" and "jackson.annotations.version" since they are derived from ${jackson.version}" above + "jakarta.mail.version" : "version.jakarta.mail", + "jboss.logging.version" : "version.org.jboss.logging.jboss-logging", + "jboss.logging.tools.version" : "version.org.jboss.logging.jboss-logging-tools", + "jboss-jaxrs-api_2.1_spec" : "version.org.jboss.spec.javax.ws.jboss-jaxrs-api_2.1_spec", + "jboss-transaction-api_1.3_spec" : "version.org.jboss.spec.javax.transaction.jboss-transaction-api_1.3_spec", + "jboss.spec.javax.xml.bind.jboss-jaxb-api_2.3_spec.version" : "version.org.jboss.spec.javax.xml.bind.jboss-jaxb-api_2.3_spec", + "jboss.spec.javax.servlet.jsp.jboss-jsp-api_2.3_spec.version" : "version.org.jboss.spec.javax.servlet.jsp.jboss-jsp-api_2.3_spec", + "log4j.version" : "version.log4j", + "resteasy.version" : "version.org.jboss.resteasy", + # Skip "resteasy.undertow.version" since it's derived from ${resteasy.version} above + # Skip "owasp.html.sanitizer.version" since Keycloak specific + "slf4j-api.version" : "version.org.slf4j", + "slf4j.version" : "version.org.slf4j", + "sun.istack.version" : "version.com.sun.istack", + "sun.xml.bind.version" : "version.sun.jaxb", + "javax.xml.bind.jaxb.version" : "version.javax.xml.bind.jaxb-api", + # Skip "sun.xml.ws.version" since Keycloak specific + "sun.activation.version" : "version.com.sun.activation.jakarta.activation", + "sun.xml.bind.version" : "version.sun.jaxb", + "org.glassfish.jaxb.xsom.version" : "version.sun.jaxb", + "undertow.version" : "version.io.undertow", + "elytron.version" : "version.org.wildfly.security.elytron", + "elytron.undertow-server.version" : "version.org.wildfly.security.elytron-web", + # Skip "jetty92.version", "jetty93.version", and "jetty94.version" since Keycloak specific + "woodstox.version" : "version.org.codehaus.woodstox.woodstox-core", + "xmlsec.version" : "version.org.apache.santuario", + "glassfish.json.version" : "version.org.glassfish.jakarta.json", + "wildfly.common.version" : "version.org.wildfly.common", + # Skip "ua-parser.version" since Keycloak specific + "picketbox.version" : "version.org.picketbox", + "google.guava.version" : "version.com.google.guava", + # Skip "version.com.openshift.openshift-restclient-java" since Keycloak specific + "commons-lang.version" : "version.commons-lang", + "commons-lang3.version" : "version.commons-lang3", + "commons-io.version" : "version.commons-io", + "apacheds.version" : "version.org.apache.ds", + # Skip "apacheds.codec.version" since Keycloak specific + # Skip "google.zxing.version" since Keycloak specific + # Skip "freemarker.version" since Keycloak specific + # Skip "jetty9.version" since Keycloak specific + # Skip "liquibase.version" since Keycloak specific + # Skip "mysql.version" since Keycloak specific + # Skip "osgi.version" since Keycloak specific + # Skip "pax.web.version" since Keycloak specific + # Skip "postgresql.version" since Keycloak specific + # Skip "mariadb.version" since Keycloak specific + # Skip "mssql.version" since Keycloak specific + "servlet.api.30.version" : "version.org.jboss.spec.javax.xml.soap.jboss-saaj-api_1.4_spec", + "servlet.api.40.version" : "version.org.jboss.spec.javax.servlet.jboss-servlet-api_4.0_spec", + # Skip "twitter4j.version" since Keycloak specific + # Skip "jna.version" since Keycloak specific + # Skip "greenmail.version" since Keycloak specific + "hamcrest.version" : "version.org.hamcrest", + # Skip "jmeter.version" since Keycloak specific + "junit.version" : "version.junit", + "picketlink.version" : "version.org.picketlink", + # Skip "selenium.version" since Keycloak specific + # Skip "xml-apis.version" since intentionally excluded in Wildfly + # Skip "subethasmtp.version" since Keycloak specific + "microprofile-metrics-api.version" : "version.org.eclipse.microprofile.metrics.api", + # Skip "replacer.plugin.version" since Keycloak specific + # Skip "jboss.as.plugin.version" since Keycloak specific + # Skip "jmeter.plugin.version" since Keycloak specific + # Skip "jmeter.analysis.plugin.version" since Keycloak specific + # Skip "minify.plugin.version" since Keycloak specific + # Skip "osgi.bundle.plugin.version" since Keycloak specific + "wildfly.plugin.version" : "version.org.wildfly.maven.plugins", + # Skip "nexus.staging.plugin.version" since Keycloak specific + # Skip "frontend.plugin.version" since Keycloak specific + # Skip "docker.maven.plugin.version" since Keycloak specific + # Skip "tomcat7.version", "tomcat8.version", and "tomcat9.version" since Keycloak specific + # Skip "spring-boot15.version", "spring-boot21.version", and "spring-boot22.version" since Keycloak specific + # Skip "webauthn4j.version" since Keycloak specific + # Skip "org.apache.kerby.kerby-asn1.version" since Keycloak specific +} + +def _scanMainKeycloakPomFileForUnknownArtifacts(): + """ + Verify each artifact listed as property in the main Keycloak pom.xml file is present one of the: + + * _excludedProperties list -- explicitly requesting the update to be skipped due some reason, + * _keycloakSpecificProperties list -- artifact is Keycloak specific, + * _keycloakToWildflyProperties dictionary -- there's a clear mapping of Keycloak + artifact property name to corresponding artifact property name as used in Wildfly / + Wildfly Core + + Logs error message and exits with error if action for a particular artifact is unknown. + """ + # Absolute path to main Keycloak pom.xml within the repo + mainKeycloakPomPath = getKeycloakGitRepositoryRoot() + "/pom.xml" + + unknownArtifactMessage = ( + "Found so far unknown '%s' artifact in the main Keycloak pom.xml file!\n" + "There's no clearly defined action on how to process this artifact yet!\n" + "It's not an excluded one, not listed as Keycloak specific one, and not\n" + "present in the set of those to be processed. Add it to one of:\n\n" + " * _excludedProperties,\n" + " * _keycloakSpecificProperties,\n" + " * or _keycloakToWildflyProperties \n\n" + "data structures in \"wildfly/upgrade/__init__.py\" to dismiss this error!\n" + "Rerun the script once done." + ) + for xmlTag in getElementsByXPath(getXmlRoot(mainKeycloakPomPath), '//pom:project/pom:properties/pom:*'): + artifactName = xmlTag.tag.replace("{%s}" % _pom_ns, "") + _logErrorAndExitIf ( + unknownArtifactMessage % artifactName, + artifactName not in itertools.chain(_excludedProperties, _keycloakSpecificProperties, _keycloakToWildflyProperties.keys()) + ) + +# Empirical list of artifacts to retrieve from Wildfly-Core's pom.xml rather than from Wildfly's pom.xml +_wildflyCoreProperties = [ + "wildfly.build-tools.version", + "aesh.version", + "apache.httpcomponents.version", + "apache.httpcomponents.httpcore.version", + "jboss.dmr.version", + "jboss.logging.version", + "jboss.logging.tools.version", + "log4j.version", + "slf4j-api.version", + "slf4j.version", + "javax.xml.bind.jaxb.version", + "undertow.version", + "elytron.version", + "elytron.undertow-server.version", + "woodstox.version", + "glassfish.json.version", + "picketbox.version", + "commons-lang.version", + "commons-io.version", + "junit.version", +] + +def updateMainKeycloakPomFile(wildflyPomFile, wildflyCorePomFile): + """ + Synchronize the versions of artifacts listed as properties in the main + Keycloak pom.xml file with their counterparts taken from 'wildflyPomFile' + and 'wildflyCorePomFile'. + """ + wildflyXmlTreeRoot = getXmlRoot(wildflyPomFile) + wildflyCoreXmlTreeRoot = getXmlRoot(wildflyCorePomFile) + + # Absolute path to main Keycloak pom.xml within the repo + mainKeycloakPomPath = getKeycloakGitRepositoryRoot() + "/pom.xml" + keycloakXmlTreeRoot = getXmlRoot(mainKeycloakPomPath) + + taskLogger = getTaskLogger('Update main Keycloak pom.xml') + taskLogger.info('Synchronizing Wildfly (Core) artifact versions to the main Keycloak pom.xml file...') + + stepLogger = getStepLogger() + + _scanMainKeycloakPomFileForUnknownArtifacts() + + for keycloakElemName, wildflyElemName in _keycloakToWildflyProperties.items(): + + if keycloakElemName == "wildfly.version": + wildflyElem = getElementsByXPath(wildflyXmlTreeRoot, '/pom:project/pom:version') + # Artifact is one of those listed above to be fetched from Wildfly Core's pom.xml + elif keycloakElemName in _wildflyCoreProperties: + wildflyElem = getPomProperty(wildflyCoreXmlTreeRoot, wildflyElemName) + # Otherwise fetch artifact version from Wildfly's pom.xml + else: + wildflyElem = getPomProperty(wildflyXmlTreeRoot, wildflyElemName) + + if wildflyElem: + keycloakElem = getPomProperty(keycloakXmlTreeRoot, keycloakElemName) + if keycloakElem: + if keycloakElemName in _excludedProperties: + stepLogger.debug( + "Not updating version of '%s' from '%s' to '%s' since the artifact is excluded!" % + (keycloakElemName, keycloakElem[0].text, wildflyElem[0].text) + ) + elif parseVersion(wildflyElem[0].text) > parseVersion(keycloakElem[0].text): + stepLogger.debug( + "Updating version of '%s' artifact to '%s'. Current '%s' version is less than that." % + (keycloakElemName, wildflyElem[0].text, keycloakElem[0].text) + ) + keycloakElem[0].text = wildflyElem[0].text + else: + stepLogger.debug( + "Not updating version of '%s' artifact to '%s'. Current '%s' version is already up2date." % + (keycloakElemName, wildflyElem[0].text, keycloakElem[0].text) + ) + else: + stepLogger.error( + "Unable to locate element with name: '%s' in '%s' or '%s'" % + (wildflyElemName, wildflyPomFile, wildflyCorePomFile) + ) + + lxml.etree.ElementTree(keycloakXmlTreeRoot).write(mainKeycloakPomPath, encoding = "UTF-8", pretty_print = True, xml_declaration = True) + stepLogger.info("Done syncing artifact version changes to: '%s'" % mainKeycloakPomPath.replace(getKeycloakGitRepositoryRoot(), '.')) + stepLogger.debug("Wrote updated main Keycloak pom.xml file to: '%s'" % mainKeycloakPomPath) + +# +# Routing handling necessary updates of various +# adapter license files related with a Wildfly upgrade +# + +def updateAdapterLicenseFile(gavDictionary, xPathPrefix, nameSpace, licenseFile): + """ + Save GAV dictionary 'gavDictionary' back to XML 'licenseFile'. + """ + licenseFileXmlTreeRoot = getXmlRoot(licenseFile) + LICENSE_FILE_PARENT_DIR = os.path.dirname(licenseFile) + stepLogger = getStepLogger() + + if not nameSpace: + nsPrefix = '' + dependencyElemXPath = '|'.join(map(lambda e: xPathPrefix + '/%s' % e, _gav_elements)) + else: + nsPrefix = nameSpace.keys() + dependencyElemXPath = '|'.join(map(lambda e: xPathPrefix + '/%s:%s' % (nsPrefix, e), _gav_elements)) + + xmlDependencyElements = getElementsByXPath(licenseFileXmlTreeRoot, dependencyElemXPath, nameSpace) + # Divide original list into sublists by three elements -- one sublist per GAV entry + for gavEntry in [xmlDependencyElements[i:i + 3] for i in range(0, len(xmlDependencyElements), 3)]: + currentArtifactVersion = expectedArtifactVersion = None + groupIdElem, artifactIdElem, versionElem = gavEntry[0], gavEntry[1], gavEntry[2] + _logErrorAndExitIf( + "Failed to update '%s' XML dependency!" % gavEntry, + groupIdElem is None or artifactIdElem is None or versionElem is None + ) + currentArtifactVersion = versionElem.text + gavDictKey = groupIdElem.text + _gav_delimiter + artifactIdElem.text + try: + # Value of the artifact version might be a child dictionary again. + # Get numeric artifact version first + expectedArtifactVersion = getNumericArtifactVersion(gavDictionary, gavDictKey) + # Update the version of artifact if version from GAV dictionary is higher + if expectedArtifactVersion and parseVersion(expectedArtifactVersion) > parseVersion(versionElem.text): + updatingArtifactVersionMessage = ( + "Updating the version of '%s, %s' artifact in license file from: '%s' to: '%s'" % + (groupIdElem.text, artifactIdElem.text, currentArtifactVersion, expectedArtifactVersion) + ) + stepLogger.debug(updatingArtifactVersionMessage) + versionElem.text = expectedArtifactVersion + # Subtask: Rename existing license text files tracked in this repository to the filename with the updated artifact version + repositoryRoot = getKeycloakGitRepositoryRoot() + for root, dirs, files in os.walk(LICENSE_FILE_PARENT_DIR): + for filename in files: + if re.search(re.escape(artifactIdElem.text) + r',' + re.escape(currentArtifactVersion), filename): + currentFilename = filename + currentFileName = currentFilename.replace(repositoryRoot, '').rstrip() + newFilename = currentFilename.replace(currentArtifactVersion, expectedArtifactVersion) + check_call(['git', 'mv', "%s" % os.path.join(root, currentFilename), "%s" % os.path.join(root, newFilename)], cwd = repositoryRoot) + # Subtask: Update artifact version in license URL to the expected one + dependencyElem = groupIdElem.getparent() + urlElements = getElementsByXPath(dependencyElem, './licenses/license/url', nameSpace) + _logErrorAndExitIf( + "Failed to retrieve element of the '%s' artifact!" % gavDictKey, + len(urlElements) != 1 + ) + urlElem = urlElements[0] + # Strip the '.redhat-\d+' suffix from artifact versions when processing RH-SSO adapters + # since upstream URLs don't contain those + if 'rh-sso' in licenseFile: + expectedArtifactVersion = re.sub(r'.redhat-\d+$', '', expectedArtifactVersion) + # First handle special form of version numbers in release URLs used by org.bouncycastle artifacts + if artifactIdElem.text.endswith('jdk15on'): + bouncyCastleMajorVersion = re.match(r'^(\d)\.', expectedArtifactVersion).group(1) + bouncyCastleMinorVersion = re.match(r'^\d+\.(\d+)', expectedArtifactVersion).group(1) + if bouncyCastleMajorVersion and bouncyCastleMinorVersion: + urlNotationOfExpectedBouncyCastleVersion = 'r' + bouncyCastleMajorVersion + 'rv' + bouncyCastleMinorVersion + try: + # Extract older (even archaic) 'major.minor.micro' artifact version substring from the URL + oldMajorMinorMicroVersion = re.search(r'(r\d+rv\d{2,})', urlElem.text).group(1) + if oldMajorMinorMicroVersion: + stepLogger.debug( + "Replacing former '%s' of '%s' artifact version in the URL with the new '%s' version" % + (oldMajorMinorMicroVersion, gavDictKey, expectedArtifactVersion) + ) + urlElem.text = re.sub(r'r\d+rv\d{2,}', urlNotationOfExpectedBouncyCastleVersion, urlElem.text) + except AttributeError: + # Ignore generic URLs not containing 'major.minor.micro' information of this specific artifact + pass + else: + _logErrorAndExitIf( + "Unable to locate previous '%s' artifact version in the URL!" % gavDictKey, + True + ) + else: + try: + # Extract older (even archaic) 'major.minor.micro' artifact version substring from the URL + oldMajorMinorMicroVersion = re.search(r'(\d+\.\d+\.\d+)', urlElem.text).group(1) + if oldMajorMinorMicroVersion: + stepLogger.debug( + "Replacing former '%s' version of the '%s' artifact in the URL with the new '%s' version" % + (oldMajorMinorMicroVersion, gavDictKey, expectedArtifactVersion) + ) + urlElem.text = re.sub(oldMajorMinorMicroVersion, expectedArtifactVersion, urlElem.text) + else: + _logErrorAndExitIf( + "Unable to locate previous '%s' artifact version in the URL!" % gavDictKey, + True + ) + except AttributeError: + # Ignore generic URLs not containing 'major.minor.micro' information of this specific artifact + pass + else: + artifactVersionAlreadyHigherMessage = ( + "Not updating version of '%s, %s' artifact to '%s'. Current '%s' version is already up2date." % + (groupIdElem.text, artifactIdElem.text, expectedArtifactVersion, currentArtifactVersion) + ) + stepLogger.debug(artifactVersionAlreadyHigherMessage) + + except KeyError: + # Ignore artifacts not found in the Gav dictionary + stepLogger.debug("Skipping '%s' artifact not present in GAV dictionary." % gavDictKey) + pass + + lxml.etree.ElementTree(licenseFileXmlTreeRoot).write(licenseFile, encoding = "UTF-8", pretty_print = True, xml_declaration = True) + relativeLicenseFilePath = licenseFile.replace(getKeycloakGitRepositoryRoot(), '.') + stepLogger.info("Done syncing artifact version changes to: '%s'" % relativeLicenseFilePath) + stepLogger.debug("Wrote updated license file to: '%s'" % licenseFile) + +# +# Routines performing particular tasks within a Wildfly upgrade +# + +def performKeycloakAdapterLicenseFilesUpdateTask(wildflyPomFile, wildflyCorePomFile): + """ + Update artifacts versions of selected dependencies utilized by various + Keycloak adapter license XML files. Also update the location of the + corresponding license text files within the repository so their names + reflect the updated artifacts versions. + """ + # Operate on Keycloak adapters + PROFILE = 'community' + + # Load XML dependencies from Wildfly (Core) POM files into GAV dictionary + wildflyCoreXmlDependenciesGav = loadGavDictionaryFromXmlFile(wildflyCorePomFile) + wildflyXmlDependenciesGav = loadGavDictionaryFromXmlFile(wildflyPomFile) + # Merge both Wildfly and Wildfly Core GAV dictionaries into a united one, + # containing all Wildfly (Core) artifacts and their versions + unitedGavDictionary = mergeTwoGavDictionaries( + wildflyCoreXmlDependenciesGav, + wildflyXmlDependenciesGav + ) + + isTaskLogged = False + (productName, productNameFull) = getProductNamesForKeycloakPomProfile(profile = PROFILE) + taskLogger = getTaskLogger('Update %s Adapters' % productNameFull) + gitRepositoryRoot = getKeycloakGitRepositoryRoot() + for root, dirs, files in os.walk(gitRepositoryRoot): + if not isTaskLogged: + taskLabel = ( + "Updating artifacts versions in license XML files and locations of the license TXT files" + + "\n\tfor the %s adapters in the '%s' directory..." % (productName, root) + ) + taskLogger.info(taskLabel) + isTaskLogged = True + for filename in files: + if re.search(r'distribution.*%s.*licenses.xml' % productName.lower(), os.path.join(root, filename)): + updateAdapterLicenseFile( + unitedGavDictionary, + xPathPrefix = '/licenseSummary/dependencies/dependency', + nameSpace = {}, + licenseFile = os.path.join(root, filename) + ) + +def performRhssoAdapterLicenseFilesUpdateTask(wildflyPomFile, wildflyCorePomFile): + """ + Update artifacts versions of selected dependencies utilized by various + RH-SSO adapter license XML files. Also update the location of the + corresponding license text files within the repository so their names + reflect the updated artifacts versions. + """ + # Operate on RH-SSO adapters + PROFILE = 'product' + + isTaskLogged = False + (productName, productNameFull) = getProductNamesForKeycloakPomProfile(profile = PROFILE) + taskLogger = getTaskLogger('Update %s Adapters' % productNameFull) + + gavFileUrl = None + print("\nPlease specify the URL of the GAV file to use for %s adapter updates:" % productNameFull.upper()) + gavFileUrl = sys.stdin.readline().rstrip() + + _logErrorAndExitIf( + "Invalid URL '%s'! Please provide valid URL to the GAV file and retry!" % gavFileUrl, + not gavFileUrl or not gavFileUrl.startswith('http://') and not gavFileUrl.startswith('https://') + ) + gavFile = saveUrlToNamedTemporaryFile(gavFileUrl) + taskLogger.debug("Downloaded content of provided GAV file to '%s'" % gavFile) + gavDictionary = loadGavDictionaryFromGavFile(gavFile) + + gitRepositoryRoot = getKeycloakGitRepositoryRoot() + for root, dirs, files in os.walk(gitRepositoryRoot): + if not isTaskLogged: + taskLabel = ( + "Updating artifacts versions in license XML files and locations of the license TXT files" + + "\n\tfor the %s adapters in the '%s' directory..." % (productName.upper(), root) + ) + taskLogger.info(taskLabel) + isTaskLogged = True + for filename in files: + if re.search(r'distribution.*%s.*licenses.xml' % productName.lower(), os.path.join(root, filename)): + updateAdapterLicenseFile( + gavDictionary, + xPathPrefix = '/licenseSummary/dependencies/dependency', + nameSpace = {}, + licenseFile = os.path.join(root, filename) + ) diff --git a/model/infinispan/pom.xml b/model/infinispan/pom.xml index cc70cfe18c7e..ed58f20047ef 100755 --- a/model/infinispan/pom.xml +++ b/model/infinispan/pom.xml @@ -51,10 +51,29 @@ org.infinispan infinispan-cachestore-remote + + org.infinispan + infinispan-jboss-marshalling + + + + + org.wildfly + wildfly-clustering-infinispan-marshalling + + junit junit test + + + + org.eclipse.microprofile.metrics + microprofile-metrics-api + test + diff --git a/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/InfinispanClusterProviderFactory.java b/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/InfinispanClusterProviderFactory.java index 73fbb5a9cee0..a6f8b89b25af 100644 --- a/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/InfinispanClusterProviderFactory.java +++ b/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/InfinispanClusterProviderFactory.java @@ -19,6 +19,10 @@ import org.infinispan.Cache; import org.infinispan.client.hotrod.exceptions.HotRodClientException; +import org.infinispan.commons.marshall.Externalizer; +import org.infinispan.commons.marshall.MarshallUtil; +import org.infinispan.commons.marshall.SerializeWith; +import org.infinispan.commons.util.concurrent.ConcurrentHashSet; import org.infinispan.manager.EmbeddedCacheManager; import org.infinispan.notifications.Listener; import org.infinispan.notifications.cachemanagerlistener.annotation.ViewChanged; @@ -36,13 +40,20 @@ import org.keycloak.connections.infinispan.TopologyInfo; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; +import org.keycloak.models.sessions.infinispan.stream.RootAuthenticationSessionPredicate; import org.keycloak.models.sessions.infinispan.util.InfinispanUtil; +import org.keycloak.models.sessions.infinispan.util.KeycloakMarshallUtil; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; import java.io.Serializable; import java.util.Collection; import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; @@ -184,57 +195,28 @@ public class ViewChangeListener { @ViewChanged public void viewChanged(ViewChangedEvent event) { - EmbeddedCacheManager cacheManager = event.getCacheManager(); - Transport transport = cacheManager.getTransport(); + final Set removedNodesAddresses = convertAddresses(event.getOldMembers()); + final Set newAddresses = convertAddresses(event.getNewMembers()); - // Coordinator makes sure that entries for outdated nodes are cleaned up - if (transport != null && transport.isCoordinator()) { + // Use separate thread to avoid potential deadlock + localExecutor.execute(() -> { + EmbeddedCacheManager cacheManager = workCache.getCacheManager(); + Transport transport = cacheManager.getTransport(); - Set newAddresses = convertAddresses(event.getNewMembers()); - Set removedNodesAddresses = convertAddresses(event.getOldMembers()); - removedNodesAddresses.removeAll(newAddresses); + // Coordinator makes sure that entries for outdated nodes are cleaned up + if (transport != null && transport.isCoordinator()) { - if (removedNodesAddresses.isEmpty()) { - return; - } - - logger.debugf("Nodes %s removed from cluster. Removing tasks locked by this nodes", removedNodesAddresses.toString()); - - Cache cache = cacheManager.getCache(InfinispanConnectionProvider.WORK_CACHE_NAME); - - Iterator toRemove = cache.entrySet().stream().filter(new Predicate>() { - - @Override - public boolean test(Map.Entry entry) { - if (!(entry.getValue() instanceof LockEntry)) { - return false; - } - - LockEntry lock = (LockEntry) entry.getValue(); - return removedNodesAddresses.contains(lock.getNode()); - } - - }).map(new Function, String>() { - - @Override - public String apply(Map.Entry entry) { - return entry.getKey(); - } - - }).iterator(); + removedNodesAddresses.removeAll(newAddresses); - while (toRemove.hasNext()) { - String rem = toRemove.next(); - if (logger.isTraceEnabled()) { - logger.tracef("Removing task %s due it's node left cluster", rem); + if (removedNodesAddresses.isEmpty()) { + return; } - // If we have task in progress, it needs to be notified - notificationsManager.taskFinished(rem, false); + logger.debugf("Nodes %s removed from cluster. Removing tasks locked by this nodes", removedNodesAddresses.toString()); - cache.remove(rem); + workCache.entrySet().removeIf(new LockEntryPredicate(removedNodesAddresses)); } - } + }); } private Set convertAddresses(Collection
addresses) { diff --git a/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/KeycloakHotRodMarshallerFactory.java b/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/KeycloakHotRodMarshallerFactory.java index 4a73bf3fdfe8..deaa0626a309 100644 --- a/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/KeycloakHotRodMarshallerFactory.java +++ b/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/KeycloakHotRodMarshallerFactory.java @@ -17,7 +17,7 @@ package org.keycloak.cluster.infinispan; -import org.infinispan.commons.marshall.jboss.GenericJBossMarshaller; +import org.infinispan.jboss.marshalling.commons.GenericJBossMarshaller; /** * Needed on Wildfly, so that remoteStore (hotRod client) can find our classes diff --git a/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/LockEntry.java b/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/LockEntry.java index f6a795a6eb52..bbc2127a343d 100644 --- a/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/LockEntry.java +++ b/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/LockEntry.java @@ -17,11 +17,20 @@ package org.keycloak.cluster.infinispan; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; import java.io.Serializable; +import org.infinispan.commons.marshall.Externalizer; +import org.infinispan.commons.marshall.MarshallUtil; +import org.infinispan.commons.marshall.SerializeWith; +import org.keycloak.models.sessions.infinispan.util.KeycloakMarshallUtil; + /** * @author Marek Posolda */ +@SerializeWith(LockEntry.ExternalizerImpl.class) public class LockEntry implements Serializable { private String node; @@ -42,4 +51,33 @@ public int getTimestamp() { public void setTimestamp(int timestamp) { this.timestamp = timestamp; } + + public static class ExternalizerImpl implements Externalizer { + + private static final int VERSION_1 = 1; + + @Override + public void writeObject(ObjectOutput output, LockEntry obj) throws IOException { + output.writeByte(VERSION_1); + MarshallUtil.marshallString(obj.node, output); + KeycloakMarshallUtil.marshall(obj.timestamp, output); + } + + @Override + public LockEntry readObject(ObjectInput input) throws IOException, ClassNotFoundException { + switch (input.readByte()) { + case VERSION_1: + return readObjectVersion1(input); + default: + throw new IOException("Unknown version"); + } + } + + public LockEntry readObjectVersion1(ObjectInput input) throws IOException, ClassNotFoundException { + LockEntry entry = new LockEntry(); + entry.setNode(MarshallUtil.unmarshallString(input)); + entry.setTimestamp(KeycloakMarshallUtil.unmarshallInteger(input)); + return entry; + } + } } diff --git a/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/LockEntryPredicate.java b/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/LockEntryPredicate.java new file mode 100644 index 000000000000..f5893a2d2524 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/cluster/infinispan/LockEntryPredicate.java @@ -0,0 +1,85 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.cluster.infinispan; + +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; +import java.io.Serializable; +import java.util.Map; +import java.util.Set; +import java.util.function.Predicate; + +import org.infinispan.commons.marshall.Externalizer; +import org.infinispan.commons.marshall.MarshallUtil; +import org.infinispan.commons.marshall.SerializeWith; +import org.infinispan.commons.util.concurrent.ConcurrentHashSet; +import org.keycloak.models.sessions.infinispan.util.KeycloakMarshallUtil; + +/** + * @author Marek Posolda + */ +@SerializeWith(LockEntryPredicate.ExternalizerImpl.class) +public class LockEntryPredicate implements Predicate> { + + private final Set removedNodesAddresses; + + public LockEntryPredicate(Set removedNodesAddresses) { + this.removedNodesAddresses = removedNodesAddresses; + } + + @Override + public boolean test(Map.Entry entry) { + if (!(entry.getValue() instanceof LockEntry)) { + return false; + } + + LockEntry lock = (LockEntry) entry.getValue(); + + return removedNodesAddresses.contains(lock.getNode()); + } + + public static class ExternalizerImpl implements Externalizer { + + private static final int VERSION_1 = 1; + + @Override + public void writeObject(ObjectOutput output, LockEntryPredicate obj) throws IOException { + output.writeByte(VERSION_1); + MarshallUtil.marshallCollection(obj.removedNodesAddresses, output); + } + + @Override + public LockEntryPredicate readObject(ObjectInput input) throws IOException, ClassNotFoundException { + switch (input.readByte()) { + case VERSION_1: + return readObjectVersion1(input); + default: + throw new IOException("Unknown version"); + } + } + + public LockEntryPredicate readObjectVersion1(ObjectInput input) throws IOException, ClassNotFoundException { + return new LockEntryPredicate( + KeycloakMarshallUtil.readCollection(input, KeycloakMarshallUtil.STRING_EXT, size -> new ConcurrentHashSet<>()) + ); + } + } + +} diff --git a/model/infinispan/src/main/java/org/keycloak/connections/infinispan/DefaultInfinispanConnectionProviderFactory.java b/model/infinispan/src/main/java/org/keycloak/connections/infinispan/DefaultInfinispanConnectionProviderFactory.java index 09d5f61984d0..76fae5989b8f 100755 --- a/model/infinispan/src/main/java/org/keycloak/connections/infinispan/DefaultInfinispanConnectionProviderFactory.java +++ b/model/infinispan/src/main/java/org/keycloak/connections/infinispan/DefaultInfinispanConnectionProviderFactory.java @@ -21,15 +21,20 @@ import java.util.ServiceLoader; import java.util.concurrent.TimeUnit; +import org.infinispan.Cache; import org.infinispan.client.hotrod.ProtocolVersion; +import org.infinispan.client.hotrod.RemoteCache; +import org.infinispan.commons.configuration.Builder; import org.infinispan.commons.util.FileLookup; import org.infinispan.commons.util.FileLookupFactory; import org.infinispan.configuration.cache.CacheMode; import org.infinispan.configuration.cache.Configuration; import org.infinispan.configuration.cache.ConfigurationBuilder; import org.infinispan.configuration.global.GlobalConfigurationBuilder; +import org.infinispan.configuration.global.TransportConfigurationBuilder; import org.infinispan.eviction.EvictionStrategy; import org.infinispan.eviction.EvictionType; +import org.infinispan.jboss.marshalling.core.JBossUserMarshaller; import org.infinispan.manager.DefaultCacheManager; import org.infinispan.manager.EmbeddedCacheManager; import org.infinispan.remoting.transport.jgroups.JGroupsTransport; @@ -169,9 +174,6 @@ protected void initContainerManaged(EmbeddedCacheManager cacheManager) { } protected void initEmbedded() { - - - GlobalConfigurationBuilder gcb = new GlobalConfigurationBuilder(); boolean clustered = config.getBoolean("clustered", false); @@ -191,6 +193,11 @@ protected void initEmbedded() { .allowDuplicateDomains(allowDuplicateJMXDomains) .enable(); + // For Infinispan 10, we go with the JBoss marshalling. + // TODO: This should be replaced later with the marshalling recommended by infinispan. Probably protostream. + // See https://infinispan.org/docs/stable/titles/developing/developing.html#marshalling for the details + gcb.serialization().marshaller(new JBossUserMarshaller()); + cacheManager = new DefaultCacheManager(gcb.build()); containerManaged = false; @@ -427,6 +434,7 @@ protected Configuration getKeysCacheConfig() { .size(InfinispanConnectionProvider.KEYS_CACHE_DEFAULT_MAX); cb.expiration().maxIdle(InfinispanConnectionProvider.KEYS_CACHE_MAX_IDLE_SECONDS, TimeUnit.SECONDS); + return cb.build(); } @@ -461,18 +469,24 @@ protected void configureTransport(GlobalConfigurationBuilder gcb, String nodeNam } try { // Compatibility with Wildfly - JChannel channel = new JChannel(fileLookup.lookupFileLocation("default-configs/default-jgroups-udp.xml", this.getClass().getClassLoader())); + JChannel channel = new JChannel(fileLookup.lookupFileLocation("default-configs/default-jgroups-udp.xml", this.getClass().getClassLoader()).openStream()); channel.setName(nodeName); JGroupsTransport transport = new JGroupsTransport(channel); - gcb.transport() + TransportConfigurationBuilder transportBuilder = gcb.transport() .nodeName(nodeName) .siteId(siteName) - .transport(transport) - .globalJmxStatistics() + .transport(transport); + + // Use the cluster corresponding to current site. This is needed as the nodes in different DCs should not share same cluster + if (siteName != null) { + transportBuilder.clusterName(siteName); + } + + + transportBuilder.globalJmxStatistics() .jmxDomain(InfinispanConnectionProvider.JMX_DOMAIN + "-" + nodeName) - .enable() - ; + .enable(); logger.infof("Configured jgroups transport with the channel name: %s", nodeName); } catch (Exception e) { diff --git a/model/infinispan/src/main/java/org/keycloak/connections/infinispan/RemoteCacheProvider.java b/model/infinispan/src/main/java/org/keycloak/connections/infinispan/RemoteCacheProvider.java index 055e89beec33..ed6e52f867f2 100644 --- a/model/infinispan/src/main/java/org/keycloak/connections/infinispan/RemoteCacheProvider.java +++ b/model/infinispan/src/main/java/org/keycloak/connections/infinispan/RemoteCacheProvider.java @@ -95,6 +95,10 @@ public void stop() { protected synchronized RemoteCache loadRemoteCache(String cacheName) { RemoteCache remoteCache = InfinispanUtil.getRemoteCache(cacheManager.getCache(cacheName)); + if (remoteCache != null) { + logger.infof("Hotrod version for remoteCache %s: %s", remoteCache.getName(), remoteCache.getRemoteCacheManager().getConfiguration().version()); + } + Boolean remoteStoreSecurity = config.getBoolean("remoteStoreSecurityEnabled"); if (remoteStoreSecurity == null) { try { diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ActionTokenReducedKeyWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ActionTokenReducedKeyWFExternalizer.java new file mode 100644 index 000000000000..30b79f6e739c --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ActionTokenReducedKeyWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.entities.ActionTokenReducedKey; + +public class ActionTokenReducedKeyWFExternalizer extends InfinispanExternalizerAdapter { + + public ActionTokenReducedKeyWFExternalizer() { + super(ActionTokenReducedKey.class, new ActionTokenReducedKey.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ActionTokenValueEntityWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ActionTokenValueEntityWFExternalizer.java new file mode 100644 index 000000000000..e1ccd7a8a8d8 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ActionTokenValueEntityWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.entities.ActionTokenValueEntity; + +public class ActionTokenValueEntityWFExternalizer extends InfinispanExternalizerAdapter { + + public ActionTokenValueEntityWFExternalizer() { + super(ActionTokenValueEntity.class, new ActionTokenValueEntity.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticatedClientSessionEntityWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticatedClientSessionEntityWFExternalizer.java new file mode 100644 index 000000000000..92150aa003bf --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticatedClientSessionEntityWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.entities.AuthenticatedClientSessionEntity; + +public class AuthenticatedClientSessionEntityWFExternalizer extends InfinispanExternalizerAdapter { + + public AuthenticatedClientSessionEntityWFExternalizer() { + super(AuthenticatedClientSessionEntity.class, new AuthenticatedClientSessionEntity.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticatedClientSessionPredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticatedClientSessionPredicateWFExternalizer.java new file mode 100644 index 000000000000..8be6fab02d89 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticatedClientSessionPredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.stream.AuthenticatedClientSessionPredicate; + +public class AuthenticatedClientSessionPredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public AuthenticatedClientSessionPredicateWFExternalizer() { + super(AuthenticatedClientSessionPredicate.class, new AuthenticatedClientSessionPredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticatedClientSessionStoreWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticatedClientSessionStoreWFExternalizer.java new file mode 100644 index 000000000000..515c0be35239 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticatedClientSessionStoreWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.entities.AuthenticatedClientSessionStore; + +public class AuthenticatedClientSessionStoreWFExternalizer extends InfinispanExternalizerAdapter { + + public AuthenticatedClientSessionStoreWFExternalizer() { + super(AuthenticatedClientSessionStore.class, new AuthenticatedClientSessionStore.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticationSessionAuthNoteUpdateEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticationSessionAuthNoteUpdateEventWFExternalizer.java new file mode 100644 index 000000000000..48b54659f1ec --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticationSessionAuthNoteUpdateEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.AuthenticationSessionAuthNoteUpdateEvent; + +public class AuthenticationSessionAuthNoteUpdateEventWFExternalizer extends InfinispanExternalizerAdapter { + + public AuthenticationSessionAuthNoteUpdateEventWFExternalizer() { + super(AuthenticationSessionAuthNoteUpdateEvent.class, new AuthenticationSessionAuthNoteUpdateEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticationSessionEntityWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticationSessionEntityWFExternalizer.java new file mode 100644 index 000000000000..efd615ff8a41 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/AuthenticationSessionEntityWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.entities.AuthenticationSessionEntity; + +public class AuthenticationSessionEntityWFExternalizer extends InfinispanExternalizerAdapter { + + public AuthenticationSessionEntityWFExternalizer() { + super(AuthenticationSessionEntity.class, new AuthenticationSessionEntity.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientAddedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientAddedEventWFExternalizer.java new file mode 100644 index 000000000000..dfb604e5c3ae --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientAddedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.ClientAddedEvent; + +public class ClientAddedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public ClientAddedEventWFExternalizer() { + super(ClientAddedEvent.class, new ClientAddedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientRemovedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientRemovedEventWFExternalizer.java new file mode 100644 index 000000000000..2cf8c089a39e --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientRemovedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.ClientRemovedEvent; + +public class ClientRemovedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public ClientRemovedEventWFExternalizer() { + super(ClientRemovedEvent.class, new ClientRemovedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientRemovedSessionEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientRemovedSessionEventWFExternalizer.java new file mode 100644 index 000000000000..a98c4ca0b19d --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientRemovedSessionEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.events.ClientRemovedSessionEvent; + +public class ClientRemovedSessionEventWFExternalizer extends InfinispanExternalizerAdapter { + + public ClientRemovedSessionEventWFExternalizer() { + super(ClientRemovedSessionEvent.class, new ClientRemovedSessionEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientTemplateEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientTemplateEventWFExternalizer.java new file mode 100644 index 000000000000..952d9050ee79 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientTemplateEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.ClientTemplateEvent; + +public class ClientTemplateEventWFExternalizer extends InfinispanExternalizerAdapter { + + public ClientTemplateEventWFExternalizer() { + super(ClientTemplateEvent.class, new ClientTemplateEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientUpdatedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientUpdatedEventWFExternalizer.java new file mode 100644 index 000000000000..d1d3209e1325 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ClientUpdatedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.ClientUpdatedEvent; + +public class ClientUpdatedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public ClientUpdatedEventWFExternalizer() { + super(ClientUpdatedEvent.class, new ClientUpdatedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupAddedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupAddedEventWFExternalizer.java new file mode 100644 index 000000000000..ecf55570e2bf --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupAddedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.GroupAddedEvent; + +public class GroupAddedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public GroupAddedEventWFExternalizer() { + super(GroupAddedEvent.class, new GroupAddedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupListPredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupListPredicateWFExternalizer.java new file mode 100644 index 000000000000..4f014b76aa20 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupListPredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.stream.GroupListPredicate; + +public class GroupListPredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public GroupListPredicateWFExternalizer() { + super(GroupListPredicate.class, new GroupListPredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupMovedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupMovedEventWFExternalizer.java new file mode 100644 index 000000000000..3059ccd4c011 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupMovedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.GroupMovedEvent; + +public class GroupMovedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public GroupMovedEventWFExternalizer() { + super(GroupMovedEvent.class, new GroupMovedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupRemovedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupRemovedEventWFExternalizer.java new file mode 100644 index 000000000000..33749f8525f0 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupRemovedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.GroupRemovedEvent; + +public class GroupRemovedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public GroupRemovedEventWFExternalizer() { + super(GroupRemovedEvent.class, new GroupRemovedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupUpdatedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupUpdatedEventWFExternalizer.java new file mode 100644 index 000000000000..c88e8160e5c0 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/GroupUpdatedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.GroupUpdatedEvent; + +public class GroupUpdatedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public GroupUpdatedEventWFExternalizer() { + super(GroupUpdatedEvent.class, new GroupUpdatedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/HasRolePredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/HasRolePredicateWFExternalizer.java new file mode 100644 index 000000000000..40a1ebc788e3 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/HasRolePredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.stream.HasRolePredicate; + +public class HasRolePredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public HasRolePredicateWFExternalizer() { + super(HasRolePredicate.class, new HasRolePredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InClientPredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InClientPredicateWFExternalizer.java new file mode 100644 index 000000000000..b642a62de201 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InClientPredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.stream.InClientPredicate; + +public class InClientPredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public InClientPredicateWFExternalizer() { + super(InClientPredicate.class, new InClientPredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InIdentityProviderPredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InIdentityProviderPredicateWFExternalizer.java new file mode 100644 index 000000000000..f3c78f5bc7e0 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InIdentityProviderPredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.stream.InIdentityProviderPredicate; + +public class InIdentityProviderPredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public InIdentityProviderPredicateWFExternalizer() { + super(InIdentityProviderPredicate.class, new InIdentityProviderPredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InRealmPredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InRealmPredicateWFExternalizer.java new file mode 100644 index 000000000000..e02fa4a4733c --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InRealmPredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.stream.InRealmPredicate; + +public class InRealmPredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public InRealmPredicateWFExternalizer() { + super(InRealmPredicate.class, new InRealmPredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InResourcePredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InResourcePredicateWFExternalizer.java new file mode 100644 index 000000000000..626b6917c37f --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InResourcePredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.authorization.stream.InResourcePredicate; + +public class InResourcePredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public InResourcePredicateWFExternalizer() { + super(InResourcePredicate.class, new InResourcePredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InResourceServerPredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InResourceServerPredicateWFExternalizer.java new file mode 100644 index 000000000000..afa47b436cd4 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InResourceServerPredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.authorization.stream.InResourceServerPredicate; + +public class InResourceServerPredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public InResourceServerPredicateWFExternalizer() { + super(InResourceServerPredicate.class, new InResourceServerPredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InScopePredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InScopePredicateWFExternalizer.java new file mode 100644 index 000000000000..46bbd1791d1e --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InScopePredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.authorization.stream.InScopePredicate; + +public class InScopePredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public InScopePredicateWFExternalizer() { + super(InScopePredicate.class, new InScopePredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InfinispanExternalizerAdapter.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InfinispanExternalizerAdapter.java new file mode 100644 index 000000000000..f011e1e79b3b --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InfinispanExternalizerAdapter.java @@ -0,0 +1,61 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +import org.wildfly.clustering.marshalling.Externalizer; + +/** + * Abstract subclass for Wildfly externalizers. It is adapter from {@link org.infinispan.commons.marshall.Externalizer} + * to {@link org.wildfly.clustering.marshalling.Externalizer} + * + * TODO: Remove this class (and probably whole package org.keycloak.models.sessions.infinispan.entities.wildfly once + * migrating to Wildfly 21 and infinispan protobuf marshallers) + * + * @author Marek Posolda + */ +public abstract class InfinispanExternalizerAdapter implements Externalizer { + + private final Class targetClass; + private final org.infinispan.commons.marshall.Externalizer delegate; + + + InfinispanExternalizerAdapter(Class targetClass, org.infinispan.commons.marshall.Externalizer delegate) { + this.targetClass = targetClass; + this.delegate = delegate; + } + + @Override + public void writeObject(ObjectOutput output, T object) throws IOException { + delegate.writeObject(output, object); + } + + @Override + public T readObject(ObjectInput input) throws IOException, ClassNotFoundException { + return delegate.readObject(input); + } + + @Override + public Class getTargetClass() { + return targetClass; + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InitializerStateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InitializerStateWFExternalizer.java new file mode 100644 index 000000000000..5ebc4df16ff9 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/InitializerStateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.initializer.InitializerState; + +public class InitializerStateWFExternalizer extends InfinispanExternalizerAdapter { + + public InitializerStateWFExternalizer() { + super(InitializerState.class, new InitializerState.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LastSessionRefreshEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LastSessionRefreshEventWFExternalizer.java new file mode 100644 index 000000000000..96fb3bc644eb --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LastSessionRefreshEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.changes.sessions.LastSessionRefreshEvent; + +public class LastSessionRefreshEventWFExternalizer extends InfinispanExternalizerAdapter { + + public LastSessionRefreshEventWFExternalizer() { + super(LastSessionRefreshEvent.class, new LastSessionRefreshEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LockEntryPredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LockEntryPredicateWFExternalizer.java new file mode 100644 index 000000000000..3a17ab2e7740 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LockEntryPredicateWFExternalizer.java @@ -0,0 +1,31 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.cluster.infinispan.LockEntryPredicate; + +/** + * @author Marek Posolda + */ +public class LockEntryPredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public LockEntryPredicateWFExternalizer() { + super(LockEntryPredicate.class, new LockEntryPredicate.ExternalizerImpl()); + } +} \ No newline at end of file diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LockEntryWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LockEntryWFExternalizer.java new file mode 100644 index 000000000000..2ba2eff88598 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LockEntryWFExternalizer.java @@ -0,0 +1,31 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.cluster.infinispan.LockEntry; + +/** + * @author Marek Posolda + */ +public class LockEntryWFExternalizer extends InfinispanExternalizerAdapter { + + public LockEntryWFExternalizer() { + super(LockEntry.class, new LockEntry.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LoginFailureEntityWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LoginFailureEntityWFExternalizer.java new file mode 100644 index 000000000000..c580e833cbb2 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LoginFailureEntityWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.entities.LoginFailureEntity; + +public class LoginFailureEntityWFExternalizer extends InfinispanExternalizerAdapter { + + public LoginFailureEntityWFExternalizer() { + super(LoginFailureEntity.class, new LoginFailureEntity.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LoginFailureKeyWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LoginFailureKeyWFExternalizer.java new file mode 100644 index 000000000000..e522054efc49 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/LoginFailureKeyWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.entities.LoginFailureKey; + +public class LoginFailureKeyWFExternalizer extends InfinispanExternalizerAdapter { + + public LoginFailureKeyWFExternalizer() { + super(LoginFailureKey.class, new LoginFailureKey.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/PolicyRemovedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/PolicyRemovedEventWFExternalizer.java new file mode 100644 index 000000000000..05666d7c6786 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/PolicyRemovedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.authorization.events.PolicyRemovedEvent; + +public class PolicyRemovedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public PolicyRemovedEventWFExternalizer() { + super(PolicyRemovedEvent.class, new PolicyRemovedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/PolicyUpdatedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/PolicyUpdatedEventWFExternalizer.java new file mode 100644 index 000000000000..a2255931fd7e --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/PolicyUpdatedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.authorization.events.PolicyUpdatedEvent; + +public class PolicyUpdatedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public PolicyUpdatedEventWFExternalizer() { + super(PolicyUpdatedEvent.class, new PolicyUpdatedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/PublicKeyStorageInvalidationEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/PublicKeyStorageInvalidationEventWFExternalizer.java new file mode 100644 index 000000000000..a0dc43cd7a8c --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/PublicKeyStorageInvalidationEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.keys.infinispan.PublicKeyStorageInvalidationEvent; + +public class PublicKeyStorageInvalidationEventWFExternalizer extends InfinispanExternalizerAdapter { + + public PublicKeyStorageInvalidationEventWFExternalizer() { + super(PublicKeyStorageInvalidationEvent.class, new PublicKeyStorageInvalidationEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RealmRemovedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RealmRemovedEventWFExternalizer.java new file mode 100644 index 000000000000..6c19330bf57b --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RealmRemovedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.RealmRemovedEvent; + +public class RealmRemovedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public RealmRemovedEventWFExternalizer() { + super(RealmRemovedEvent.class, new RealmRemovedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RealmRemovedSessionEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RealmRemovedSessionEventWFExternalizer.java new file mode 100644 index 000000000000..34e73c396c31 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RealmRemovedSessionEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.events.RealmRemovedSessionEvent; + +public class RealmRemovedSessionEventWFExternalizer extends InfinispanExternalizerAdapter { + + public RealmRemovedSessionEventWFExternalizer() { + super(RealmRemovedSessionEvent.class, new RealmRemovedSessionEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RealmUpdatedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RealmUpdatedEventWFExternalizer.java new file mode 100644 index 000000000000..9477d48413bf --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RealmUpdatedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.RealmUpdatedEvent; + +public class RealmUpdatedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public RealmUpdatedEventWFExternalizer() { + super(RealmUpdatedEvent.class, new RealmUpdatedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RemoveAllUserLoginFailuresEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RemoveAllUserLoginFailuresEventWFExternalizer.java new file mode 100644 index 000000000000..4e54c770b82b --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RemoveAllUserLoginFailuresEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.events.RemoveAllUserLoginFailuresEvent; + +public class RemoveAllUserLoginFailuresEventWFExternalizer extends InfinispanExternalizerAdapter { + + public RemoveAllUserLoginFailuresEventWFExternalizer() { + super(RemoveAllUserLoginFailuresEvent.class, new RemoveAllUserLoginFailuresEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RemoveUserSessionsEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RemoveUserSessionsEventWFExternalizer.java new file mode 100644 index 000000000000..beca94067efb --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RemoveUserSessionsEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.events.RemoveUserSessionsEvent; + +public class RemoveUserSessionsEventWFExternalizer extends InfinispanExternalizerAdapter { + + public RemoveUserSessionsEventWFExternalizer() { + super(RemoveUserSessionsEvent.class, new RemoveUserSessionsEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceRemovedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceRemovedEventWFExternalizer.java new file mode 100644 index 000000000000..1a4e7762c9b2 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceRemovedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.authorization.events.ResourceRemovedEvent; + +public class ResourceRemovedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public ResourceRemovedEventWFExternalizer() { + super(ResourceRemovedEvent.class, new ResourceRemovedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceServerRemovedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceServerRemovedEventWFExternalizer.java new file mode 100644 index 000000000000..c261d0dfac14 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceServerRemovedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.authorization.events.ResourceServerRemovedEvent; + +public class ResourceServerRemovedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public ResourceServerRemovedEventWFExternalizer() { + super(ResourceServerRemovedEvent.class, new ResourceServerRemovedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceServerUpdatedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceServerUpdatedEventWFExternalizer.java new file mode 100644 index 000000000000..0cc62712dd10 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceServerUpdatedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.authorization.events.ResourceServerUpdatedEvent; + +public class ResourceServerUpdatedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public ResourceServerUpdatedEventWFExternalizer() { + super(ResourceServerUpdatedEvent.class, new ResourceServerUpdatedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceUpdatedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceUpdatedEventWFExternalizer.java new file mode 100644 index 000000000000..057bc2dc5b10 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ResourceUpdatedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.authorization.events.ResourceUpdatedEvent; + +public class ResourceUpdatedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public ResourceUpdatedEventWFExternalizer() { + super(ResourceUpdatedEvent.class, new ResourceUpdatedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RoleAddedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RoleAddedEventWFExternalizer.java new file mode 100644 index 000000000000..e799481602d7 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RoleAddedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.RoleAddedEvent; + +public class RoleAddedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public RoleAddedEventWFExternalizer() { + super(RoleAddedEvent.class, new RoleAddedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RoleRemovedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RoleRemovedEventWFExternalizer.java new file mode 100644 index 000000000000..19ae612b6d9a --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RoleRemovedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.RoleRemovedEvent; + +public class RoleRemovedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public RoleRemovedEventWFExternalizer() { + super(RoleRemovedEvent.class, new RoleRemovedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RoleUpdatedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RoleUpdatedEventWFExternalizer.java new file mode 100644 index 000000000000..621a12353ef9 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RoleUpdatedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.RoleUpdatedEvent; + +public class RoleUpdatedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public RoleUpdatedEventWFExternalizer() { + super(RoleUpdatedEvent.class, new RoleUpdatedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RootAuthenticationSessionEntityWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RootAuthenticationSessionEntityWFExternalizer.java new file mode 100644 index 000000000000..72f1e755ff02 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RootAuthenticationSessionEntityWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.entities.RootAuthenticationSessionEntity; + +public class RootAuthenticationSessionEntityWFExternalizer extends InfinispanExternalizerAdapter { + + public RootAuthenticationSessionEntityWFExternalizer() { + super(RootAuthenticationSessionEntity.class, new RootAuthenticationSessionEntity.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RootAuthenticationSessionPredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RootAuthenticationSessionPredicateWFExternalizer.java new file mode 100644 index 000000000000..80631ed85ae8 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/RootAuthenticationSessionPredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.stream.RootAuthenticationSessionPredicate; + +public class RootAuthenticationSessionPredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public RootAuthenticationSessionPredicateWFExternalizer() { + super(RootAuthenticationSessionPredicate.class, new RootAuthenticationSessionPredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ScopeRemovedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ScopeRemovedEventWFExternalizer.java new file mode 100644 index 000000000000..939d2edb836a --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ScopeRemovedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.authorization.events.ScopeRemovedEvent; + +public class ScopeRemovedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public ScopeRemovedEventWFExternalizer() { + super(ScopeRemovedEvent.class, new ScopeRemovedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ScopeUpdatedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ScopeUpdatedEventWFExternalizer.java new file mode 100644 index 000000000000..675d7b698718 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/ScopeUpdatedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.authorization.events.ScopeUpdatedEvent; + +public class ScopeUpdatedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public ScopeUpdatedEventWFExternalizer() { + super(ScopeUpdatedEvent.class, new ScopeUpdatedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/SessionDataWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/SessionDataWFExternalizer.java new file mode 100644 index 000000000000..09d5754d4bd1 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/SessionDataWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.changes.sessions.SessionData; + +public class SessionDataWFExternalizer extends InfinispanExternalizerAdapter { + + public SessionDataWFExternalizer() { + super(SessionData.class, new SessionData.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/SessionEntityWrapperWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/SessionEntityWrapperWFExternalizer.java new file mode 100644 index 000000000000..a410860cce9f --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/SessionEntityWrapperWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.changes.SessionEntityWrapper; + +public class SessionEntityWrapperWFExternalizer extends InfinispanExternalizerAdapter { + + public SessionEntityWrapperWFExternalizer() { + super(SessionEntityWrapper.class, new SessionEntityWrapper.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/SessionPredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/SessionPredicateWFExternalizer.java new file mode 100644 index 000000000000..c6aaae4814e6 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/SessionPredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.stream.SessionPredicate; + +public class SessionPredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public SessionPredicateWFExternalizer() { + super(SessionPredicate.class, new SessionPredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserCacheRealmInvalidationEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserCacheRealmInvalidationEventWFExternalizer.java new file mode 100644 index 000000000000..07f293384de2 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserCacheRealmInvalidationEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.UserCacheRealmInvalidationEvent; + +public class UserCacheRealmInvalidationEventWFExternalizer extends InfinispanExternalizerAdapter { + + public UserCacheRealmInvalidationEventWFExternalizer() { + super(UserCacheRealmInvalidationEvent.class, new UserCacheRealmInvalidationEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserConsentsUpdatedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserConsentsUpdatedEventWFExternalizer.java new file mode 100644 index 000000000000..74c05bc93d13 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserConsentsUpdatedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.UserConsentsUpdatedEvent; + +public class UserConsentsUpdatedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public UserConsentsUpdatedEventWFExternalizer() { + super(UserConsentsUpdatedEvent.class, new UserConsentsUpdatedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserFederationLinkRemovedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserFederationLinkRemovedEventWFExternalizer.java new file mode 100644 index 000000000000..a2942b2ddf4c --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserFederationLinkRemovedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.UserFederationLinkRemovedEvent; + +public class UserFederationLinkRemovedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public UserFederationLinkRemovedEventWFExternalizer() { + super(UserFederationLinkRemovedEvent.class, new UserFederationLinkRemovedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserFederationLinkUpdatedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserFederationLinkUpdatedEventWFExternalizer.java new file mode 100644 index 000000000000..bf17e2c0006a --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserFederationLinkUpdatedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.UserFederationLinkUpdatedEvent; + +public class UserFederationLinkUpdatedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public UserFederationLinkUpdatedEventWFExternalizer() { + super(UserFederationLinkUpdatedEvent.class, new UserFederationLinkUpdatedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserFullInvalidationEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserFullInvalidationEventWFExternalizer.java new file mode 100644 index 000000000000..c3667f6462b0 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserFullInvalidationEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.UserFullInvalidationEvent; + +public class UserFullInvalidationEventWFExternalizer extends InfinispanExternalizerAdapter { + + public UserFullInvalidationEventWFExternalizer() { + super(UserFullInvalidationEvent.class, new UserFullInvalidationEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserLoginFailurePredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserLoginFailurePredicateWFExternalizer.java new file mode 100644 index 000000000000..01ad473a3a83 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserLoginFailurePredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.stream.UserLoginFailurePredicate; + +public class UserLoginFailurePredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public UserLoginFailurePredicateWFExternalizer() { + super(UserLoginFailurePredicate.class, new UserLoginFailurePredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserSessionEntityWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserSessionEntityWFExternalizer.java new file mode 100644 index 000000000000..c633487e16a4 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserSessionEntityWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.entities.UserSessionEntity; + +public class UserSessionEntityWFExternalizer extends InfinispanExternalizerAdapter { + + public UserSessionEntityWFExternalizer() { + super(UserSessionEntity.class, new UserSessionEntity.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserSessionPredicateWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserSessionPredicateWFExternalizer.java new file mode 100644 index 000000000000..f49068fcd8ad --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserSessionPredicateWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.sessions.infinispan.stream.UserSessionPredicate; + +public class UserSessionPredicateWFExternalizer extends InfinispanExternalizerAdapter { + + public UserSessionPredicateWFExternalizer() { + super(UserSessionPredicate.class, new UserSessionPredicate.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserUpdatedEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserUpdatedEventWFExternalizer.java new file mode 100644 index 000000000000..5e0e812ef00b --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/UserUpdatedEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.models.cache.infinispan.events.UserUpdatedEvent; + +public class UserUpdatedEventWFExternalizer extends InfinispanExternalizerAdapter { + + public UserUpdatedEventWFExternalizer() { + super(UserUpdatedEvent.class, new UserUpdatedEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/WrapperClusterEventWFExternalizer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/WrapperClusterEventWFExternalizer.java new file mode 100644 index 000000000000..cb1fb842b387 --- /dev/null +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/wildfly/WrapperClusterEventWFExternalizer.java @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.models.sessions.infinispan.entities.wildfly; + +import org.keycloak.cluster.infinispan.WrapperClusterEvent; + +public class WrapperClusterEventWFExternalizer extends InfinispanExternalizerAdapter { + + public WrapperClusterEventWFExternalizer() { + super(WrapperClusterEvent.class, new WrapperClusterEvent.ExternalizerImpl()); + } +} diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/initializer/InfinispanCacheInitializer.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/initializer/InfinispanCacheInitializer.java index c51598f68801..e6c18501ea54 100755 --- a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/initializer/InfinispanCacheInitializer.java +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/initializer/InfinispanCacheInitializer.java @@ -18,7 +18,10 @@ package org.keycloak.models.sessions.infinispan.initializer; import org.infinispan.Cache; -import org.infinispan.distexec.DefaultExecutorService; +import org.infinispan.commons.CacheConfigurationException; +import org.infinispan.commons.CacheException; +import org.infinispan.factories.ComponentRegistry; +import org.infinispan.manager.ClusterExecutor; import org.infinispan.remoting.transport.Transport; import org.jboss.logging.Logger; import org.keycloak.models.KeycloakSession; @@ -27,14 +30,12 @@ import org.keycloak.models.utils.KeycloakModelUtils; import java.io.Serializable; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.ExecutionException; import java.util.LinkedList; import java.util.List; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import org.infinispan.commons.CacheConfigurationException; -import org.infinispan.factories.ComponentRegistry; +import java.util.Queue; /** * Startup initialization for reading persistent userSessions to be filled into infinispan/memory . In cluster, @@ -50,11 +51,13 @@ public class InfinispanCacheInitializer extends BaseCacheInitializer { private final int maxErrors; + public InfinispanCacheInitializer(KeycloakSessionFactory sessionFactory, Cache workCache, SessionLoader sessionLoader, String stateKeySuffix, int sessionsPerSegment, int maxErrors) { super(sessionFactory, workCache, sessionLoader, stateKeySuffix, sessionsPerSegment); this.maxErrors = maxErrors; } + @Override public void initCache() { final ComponentRegistry cr = this.workCache.getAdvancedCache().getComponentRegistry(); @@ -113,15 +116,16 @@ protected void startLoadingImpl(InitializerState state, SessionLoader.LoaderCont // Assume each worker has same processor's count int processors = Runtime.getRuntime().availableProcessors(); - ExecutorService localExecutor = Executors.newCachedThreadPool(); Transport transport = workCache.getCacheManager().getTransport(); - boolean distributed = transport != null; - ExecutorService executorService = distributed ? new DefaultExecutorService(workCache, localExecutor) : localExecutor; + + // Every worker iteration will be executed on single node. Use 3 failover attempts for each segment (should be sufficient in all cases) + ClusterExecutor clusterExecutor = workCache.getCacheManager().executor() + .singleNodeSubmission(3); int errors = 0; int segmentToLoad = 0; - try { + //try { SessionLoader.WorkerResult previousResult = null; SessionLoader.WorkerResult nextResult = null; int distributedWorkersCount = 0; @@ -142,38 +146,35 @@ protected void startLoadingImpl(InitializerState state, SessionLoader.LoaderCont log.trace("unfinished segments for this iteration: " + segments); } - List> futures = new LinkedList<>(); + List> futures = new LinkedList<>(); + final Queue results = new ConcurrentLinkedQueue<>(); + CompletableFuture completableFuture = null; for (Integer segment : segments) { SessionLoader.WorkerContext workerCtx = sessionLoader.computeWorkerContext(loaderCtx, segment, segment - segmentToLoad, previousResult); SessionInitializerWorker worker = new SessionInitializerWorker(); - worker.setWorkerEnvironment(loaderCtx, workerCtx, sessionLoader); + worker.setWorkerEnvironment(loaderCtx, workerCtx, sessionLoader, workCache.getName()); - if (!distributed) { - worker.setEnvironment(workCache, null); - } + completableFuture = clusterExecutor.submitConsumer(worker, (address, workerResult, throwable) -> { + log.tracef("Calling triConsumer on address %s, throwable message: %s, segment: %s", address, throwable == null ? "null" : throwable.getMessage(), + workerResult.getSegment()); + + if (throwable != null) { + throw new CacheException(throwable); + } + results.add(workerResult); + }); - Future future = executorService.submit(worker); - futures.add(future); + futures.add(completableFuture); } boolean anyFailure = false; - for (Future future : futures) { + + // Make sure that all workers are finished + for (CompletableFuture future : futures) { try { - SessionLoader.WorkerResult result = future.get(); - if (result.isSuccess()) { - state.markSegmentFinished(result.getSegment()); - if (result.getSegment() == segmentToLoad + distributedWorkersCount - 1) { - // last result for next iteration when complete - nextResult = result; - } - } else { - if (log.isTraceEnabled()) { - log.tracef("Segment %d failed to compute", result.getSegment()); - } - anyFailure = true; - } + future.get(); } catch (InterruptedException ie) { anyFailure = true; errors++; @@ -185,6 +186,22 @@ protected void startLoadingImpl(InitializerState state, SessionLoader.LoaderCont } } + // Check the results + for (SessionLoader.WorkerResult result : results) { + if (result.isSuccess()) { + state.markSegmentFinished(result.getSegment()); + if (result.getSegment() == segmentToLoad + distributedWorkersCount - 1) { + // last result for next iteration when complete + nextResult = result; + } + } else { + if (log.isTraceEnabled()) { + log.tracef("Segment %d failed to compute", result.getSegment()); + } + anyFailure = true; + } + } + if (errors >= maxErrors) { throw new RuntimeException("Maximum count of worker errors occured. Limit was " + maxErrors + ". See server.log for details"); } @@ -210,12 +227,5 @@ protected void startLoadingImpl(InitializerState state, SessionLoader.LoaderCont // Loader callback after the task is finished this.sessionLoader.afterAllSessionsLoaded(this); - } finally { - if (distributed) { - executorService.shutdown(); - } - localExecutor.shutdown(); - } } - } diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/initializer/SessionInitializerWorker.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/initializer/SessionInitializerWorker.java index 9bfb46332087..4b8076d1fefd 100644 --- a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/initializer/SessionInitializerWorker.java +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/initializer/SessionInitializerWorker.java @@ -18,7 +18,7 @@ package org.keycloak.models.sessions.infinispan.initializer; import org.infinispan.Cache; -import org.infinispan.distexec.DistributedCallable; +import org.infinispan.manager.EmbeddedCacheManager; import org.jboss.logging.Logger; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; @@ -26,37 +26,35 @@ import org.keycloak.models.utils.KeycloakModelUtils; import java.io.Serializable; -import java.util.Set; +import java.util.function.Function; /** * @author Marek Posolda */ -public class SessionInitializerWorker implements DistributedCallable, Serializable { +public class SessionInitializerWorker implements Function, Serializable { private static final Logger log = Logger.getLogger(SessionInitializerWorker.class); - private SessionLoader.LoaderContext loaderCtx; private SessionLoader.WorkerContext workerCtx; private SessionLoader sessionLoader; - private transient Cache workCache; + private String cacheName; + - public void setWorkerEnvironment(SessionLoader.LoaderContext loaderCtx, SessionLoader.WorkerContext workerCtx, SessionLoader sessionLoader) { + public void setWorkerEnvironment(SessionLoader.LoaderContext loaderCtx, SessionLoader.WorkerContext workerCtx, SessionLoader sessionLoader, String cacheName) { this.loaderCtx = loaderCtx; this.workerCtx = workerCtx; this.sessionLoader = sessionLoader; + this.cacheName = cacheName; } - @Override - public void setEnvironment(Cache workCache, Set inputKeys) { - this.workCache = workCache; - } @Override - public SessionLoader.WorkerResult call() throws Exception { + public SessionLoader.WorkerResult apply(EmbeddedCacheManager embeddedCacheManager) { + Cache workCache = embeddedCacheManager.getCache(cacheName); if (log.isTraceEnabled()) { - log.tracef("Running computation for segment: %s", workerCtx.toString()); + log.tracef("Running computation for segment %s with worker %s", workerCtx.getSegment(), workerCtx.getWorkerId()); } KeycloakSessionFactory sessionFactory = workCache.getAdvancedCache().getComponentRegistry().getComponent(KeycloakSessionFactory.class); @@ -77,5 +75,4 @@ public void run(KeycloakSession session) { return ref[0]; } - } diff --git a/model/infinispan/src/main/resources/META-INF/services/org.wildfly.clustering.marshalling.Externalizer b/model/infinispan/src/main/resources/META-INF/services/org.wildfly.clustering.marshalling.Externalizer new file mode 100644 index 000000000000..30ec605162ba --- /dev/null +++ b/model/infinispan/src/main/resources/META-INF/services/org.wildfly.clustering.marshalling.Externalizer @@ -0,0 +1,80 @@ +# +# Copyright 2020 Red Hat, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +org.keycloak.models.sessions.infinispan.entities.wildfly.GroupListPredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.RealmRemovedSessionEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ActionTokenReducedKeyWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.WrapperClusterEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.UserConsentsUpdatedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.RoleRemovedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.RealmRemovedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.RemoveUserSessionsEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ResourceRemovedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ResourceServerRemovedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.RealmUpdatedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.RemoveAllUserLoginFailuresEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.InScopePredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.AuthenticationSessionAuthNoteUpdateEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.PolicyUpdatedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ClientUpdatedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ClientAddedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.LoginFailureEntityWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.PublicKeyStorageInvalidationEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.UserUpdatedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.UserLoginFailurePredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.UserFederationLinkUpdatedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.UserCacheRealmInvalidationEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.InResourcePredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.UserFederationLinkRemovedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.SessionDataWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.GroupAddedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.GroupRemovedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.GroupMovedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.GroupUpdatedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ScopeUpdatedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ResourceServerUpdatedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ResourceUpdatedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.AuthenticatedClientSessionStoreWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.LoginFailureKeyWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.LockEntryPredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.LockEntryWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ActionTokenValueEntityWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.RoleAddedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.InClientPredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.UserFullInvalidationEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ClientRemovedSessionEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.SessionPredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.UserSessionEntityWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.RoleUpdatedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.HasRolePredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.InRealmPredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ClientTemplateEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.RootAuthenticationSessionPredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.InResourceServerPredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ClientRemovedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.ScopeRemovedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.AuthenticationSessionEntityWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.RootAuthenticationSessionEntityWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.AuthenticatedClientSessionPredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.AuthenticatedClientSessionEntityWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.LastSessionRefreshEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.PolicyRemovedEventWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.UserSessionPredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.InIdentityProviderPredicateWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.SessionEntityWrapperWFExternalizer +org.keycloak.models.sessions.infinispan.entities.wildfly.InitializerStateWFExternalizer \ No newline at end of file diff --git a/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/JDGPutTest.java b/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/JDGPutTest.java new file mode 100644 index 000000000000..dbac897c58b6 --- /dev/null +++ b/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/JDGPutTest.java @@ -0,0 +1,173 @@ +/* + * Copyright 2020 Red Hat, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.keycloak.cluster.infinispan; + +import java.awt.print.Book; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import org.infinispan.Cache; +import org.infinispan.client.hotrod.RemoteCache; +import org.infinispan.client.hotrod.impl.RemoteCacheImpl; +import org.infinispan.client.hotrod.impl.operations.IterationStartOperation; +import org.infinispan.client.hotrod.impl.operations.IterationStartResponse; +import org.infinispan.client.hotrod.impl.operations.OperationsFactory; +import org.infinispan.commons.util.CloseableIterator; +import org.infinispan.manager.EmbeddedCacheManager; +import org.infinispan.persistence.remote.configuration.RemoteStoreConfigurationBuilder; +import org.jboss.logging.Logger; +import org.keycloak.connections.infinispan.InfinispanConnectionProvider; +import org.keycloak.models.sessions.infinispan.changes.SessionEntityWrapper; +import org.keycloak.models.sessions.infinispan.entities.AuthenticatedClientSessionEntity; +import org.keycloak.models.sessions.infinispan.remotestore.RemoteCacheSessionsLoaderContext; +import org.keycloak.models.sessions.infinispan.util.InfinispanUtil; + +import static org.infinispan.client.hotrod.impl.Util.await; + +/** + * @author Marek Posolda + */ +public class JDGPutTest { + + public static final Logger logger = Logger.getLogger(JDGPutTest.class); + + public static void main(String[] args) throws Exception { + Cache cache1 = createManager(1).getCache(InfinispanConnectionProvider.USER_SESSION_CACHE_NAME); + Cache cache2 = createManager(2).getCache(InfinispanConnectionProvider.USER_SESSION_CACHE_NAME); + + try { + //RemoteCache remoteCache1 = InfinispanUtil.getRemoteCache(cache1); + //RemoteCache remoteCache2 = InfinispanUtil.getRemoteCache(cache2); + + //remoteCache1.put("key1", new Book("book1", "desc", 1)); + //remoteCache2.put("key2", ); + String uuidStr = UUID.randomUUID().toString(); + System.out.println(uuidStr); + UUID uuid = UUID.fromString(uuidStr); + AuthenticatedClientSessionEntity ace = new AuthenticatedClientSessionEntity(uuid); + SessionEntityWrapper wrapper = new SessionEntityWrapper(ace); + + cache1.put("key1", wrapper); + //cache1.put("key1", "val1"); + + //AuthenticatedClientSessionEntity val1 = (AuthenticatedClientSessionEntity) cache2.get("key1"); + //RemoteCache remoteCache1 = InfinispanUtil.getRemoteCache(cache1); + //remoteCache1.put("key1", "val1"); + RemoteCache remoteCache2 = InfinispanUtil.getRemoteCache(cache2); + Object o = remoteCache2.get("key1"); + + logger.info("Before retrieve entries"); + try (CloseableIterator it = remoteCache2.retrieveEntries(null, 64)) { + Object o2 = it.next(); + logger.info("o2: " + o2); + } + + //Object key = remoteCache2.keySet().iterator().next(); + //Object value = remoteCache2.values().iterator().next(); + //logger.info("Key: " + key + ", val: " + value); + + bulkLoadSessions(remoteCache2); + } finally { + Thread.sleep(2000); + + // Finish JVM + cache1.getCacheManager().stop(); + cache2.getCacheManager().stop(); + } + } + + private static EmbeddedCacheManager createManager(int threadId) { + return new TestCacheManagerFactory().createManager(threadId, InfinispanConnectionProvider.USER_SESSION_CACHE_NAME, RemoteStoreConfigurationBuilder.class); + } + + private static void bulkLoadSessions(RemoteCache remoteCache) { + int size = remoteCache.size(); + int ispnSegmentsCount = getIspnSegmentsCount(remoteCache); + RemoteCacheSessionsLoaderContext ctx = new RemoteCacheSessionsLoaderContext(ispnSegmentsCount, 64, 1); + + Set myIspnSegments = getMyIspnSegments(0, ctx); + + Map remoteEntries = new HashMap<>(); + CloseableIterator iterator = null; + int countLoaded = 0; + try { + iterator = remoteCache.retrieveEntries(null, myIspnSegments, ctx.getSessionsPerSegment()); + while (iterator.hasNext()) { + countLoaded++; + Map.Entry entry = iterator.next(); + remoteEntries.put(entry.getKey(), entry.getValue()); + } + } catch (RuntimeException e) { + System.err.println(String.format("Error loading sessions from remote cache '%s' for segment '%d'", remoteCache.getName(), 1)); + throw e; + } finally { + if (iterator != null) { + iterator.close(); + } + } + + logger.info("Loaded " + remoteEntries); + + } + + protected static int getIspnSegmentsCount(RemoteCache remoteCache) { + OperationsFactory operationsFactory = ((RemoteCacheImpl) remoteCache).getOperationsFactory(); + + // Same like RemoteCloseableIterator.startInternal + IterationStartOperation iterationStartOperation = operationsFactory.newIterationStartOperation(null, null, null, 64, false, null); + IterationStartResponse startResponse = await(iterationStartOperation.execute()); + + try { + // Could happen for non-clustered caches + if (startResponse.getSegmentConsistentHash() == null) { + return -1; + } else { + return startResponse.getSegmentConsistentHash().getNumSegments(); + } + } finally { + startResponse.getChannel().close(); + } + } + + // Compute set of ISPN segments into 1 "worker" segment + protected static Set getMyIspnSegments(int segment, RemoteCacheSessionsLoaderContext ctx) { + // Remote cache is non-clustered + if (ctx.getIspnSegmentsCount() < 0) { + return null; + } + + if (ctx.getIspnSegmentsCount() % ctx.getSegmentsCount() > 0) { + throw new IllegalStateException("Illegal state. IspnSegmentsCount: " + ctx.getIspnSegmentsCount() + ", segmentsCount: " + ctx.getSegmentsCount()); + } + + int countPerSegment = ctx.getIspnSegmentsCount() / ctx.getSegmentsCount(); + int first = segment * countPerSegment; + int last = first + countPerSegment - 1; + + Set myIspnSegments = new HashSet<>(); + for (int i=first ; i<=last ; i++) { + myIspnSegments.add(i); + } + return myIspnSegments; + + } +} diff --git a/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/RemoteCacheSessionsLoaderTest.java b/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/RemoteCacheSessionsLoaderTest.java index 8ae5053518f7..c61241d3ed95 100644 --- a/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/RemoteCacheSessionsLoaderTest.java +++ b/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/RemoteCacheSessionsLoaderTest.java @@ -17,6 +17,7 @@ package org.keycloak.cluster.infinispan; + import java.util.HashSet; import java.util.Set; @@ -26,6 +27,8 @@ import org.infinispan.persistence.remote.configuration.RemoteStoreConfigurationBuilder; import org.jboss.logging.Logger; import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; import org.keycloak.common.util.Time; import org.keycloak.connections.infinispan.InfinispanConnectionProvider; import org.keycloak.models.KeycloakSession; @@ -45,7 +48,9 @@ public class RemoteCacheSessionsLoaderTest { private static final int COUNT = 10000; - public static void main(String[] args) throws Exception { + @Test + @Ignore + public void testRemoteCache() throws Exception { String cacheName = InfinispanConnectionProvider.USER_SESSION_CACHE_NAME; Cache cache1 = createManager(1, cacheName).getCache(cacheName); Cache cache2 = cache1.getCacheManager().getCache("local"); diff --git a/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/TestCacheManagerFactory.java b/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/TestCacheManagerFactory.java index 82de12c49b1d..4e170c69a7bc 100644 --- a/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/TestCacheManagerFactory.java +++ b/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/TestCacheManagerFactory.java @@ -17,14 +17,17 @@ package org.keycloak.cluster.infinispan; +import org.infinispan.client.hotrod.ProtocolVersion; import org.infinispan.configuration.cache.Configuration; import org.infinispan.configuration.cache.ConfigurationBuilder; import org.infinispan.configuration.cache.StoreConfigurationBuilder; import org.infinispan.configuration.global.GlobalConfigurationBuilder; +import org.infinispan.jboss.marshalling.core.JBossUserMarshaller; import org.infinispan.manager.DefaultCacheManager; import org.infinispan.manager.EmbeddedCacheManager; import org.infinispan.persistence.remote.configuration.ExhaustedAction; import org.infinispan.persistence.remote.configuration.RemoteStoreConfigurationChildBuilder; +import org.keycloak.connections.infinispan.InfinispanConnectionProvider; /** * @author Marek Posolda @@ -37,16 +40,22 @@ & RemoteStoreConfigurationChildBuilde System.setProperty("jgroups.tcp.port", "53715"); GlobalConfigurationBuilder gcb = new GlobalConfigurationBuilder(); - boolean clustered = false; + // For Infinispan 10, we go with the JBoss marshalling. + // TODO: This should be replaced later with the marshalling recommended by infinispan. Probably protostream. + // See https://infinispan.org/docs/stable/titles/developing/developing.html#marshalling for the details + gcb.serialization().marshaller(new JBossUserMarshaller()); + + boolean clustered = true; boolean async = false; boolean allowDuplicateJMXDomains = true; if (clustered) { gcb = gcb.clusteredDefault(); - gcb.transport().clusterName("test-clustering"); + gcb.transport().clusterName("test-clustering-" + threadId); } - gcb.globalJmxStatistics().allowDuplicateDomains(allowDuplicateJMXDomains); + gcb.jmx() + .domain(InfinispanConnectionProvider.JMX_DOMAIN + "-" + threadId).enable(); EmbeddedCacheManager cacheManager = new DefaultCacheManager(gcb.build()); @@ -62,11 +71,13 @@ & RemoteStoreConfigurationChildBuilde private & RemoteStoreConfigurationChildBuilder> Configuration getCacheBackedByRemoteStore(int threadId, String cacheName, Class builderClass) { ConfigurationBuilder cacheConfigBuilder = new ConfigurationBuilder(); - String host = "localhost"; - int port = threadId==1 ? 12232 : 13232; - //int port = 11222; + //String host = "localhost"; + //int port = threadId==1 ? 12232 : 13232; + String host = threadId==1 ? "jdg1" : "jdg2"; + int port = 11222; - return cacheConfigBuilder.persistence().addStore(builderClass) + return cacheConfigBuilder.statistics().enable() + .persistence().addStore(builderClass) .fetchPersistentState(false) .ignoreModifications(false) .purgeOnStartup(false) @@ -76,7 +87,7 @@ private & RemoteStoreConfigurationChi .rawValues(true) .forceReturnValues(false) .marshaller(KeycloakHotRodMarshallerFactory.class.getName()) - //.protocolVersion(ProtocolVersion.PROTOCOL_VERSION_26) + .protocolVersion(ProtocolVersion.PROTOCOL_VERSION_29) //.maxBatchSize(5) .addServer() .host(host) diff --git a/model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/ConcurrencyVersioningTest.java b/model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/ConcurrencyVersioningTest.java index 3641d278e36b..28f435de27c0 100755 --- a/model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/ConcurrencyVersioningTest.java +++ b/model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/ConcurrencyVersioningTest.java @@ -252,7 +252,12 @@ protected DefaultCacheManager getVersionedCacheManager() { //.invocationBatching().enable() .transaction().transactionMode(TransactionMode.TRANSACTIONAL) .transaction().transactionManagerLookup(new EmbeddedTransactionManagerLookup()) - .locking().isolationLevel(IsolationLevel.REPEATABLE_READ).writeSkewCheck(true).versioning().enable().scheme(VersioningScheme.SIMPLE); + .locking().isolationLevel(IsolationLevel.REPEATABLE_READ); + // KEYCLOAK-13692 - Per ISPN-7613 Infinispan: + // * Automatically enables versioning when needed, + // * writeSkewCheck automatically enabled for OPTIMISTIC and REPEATABLE_READ transactions + //.writeSkewCheck(true).versioning() + //.enable().scheme(VersioningScheme.SIMPLE); //invalidationConfigBuilder.locking().isolationLevel(IsolationLevel.REPEATABLE_READ).writeSkewCheck(true).versioning().enable().scheme(VersioningScheme.SIMPLE); diff --git a/model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/DistributedCacheWriteSkewTest.java b/model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/DistributedCacheWriteSkewTest.java index eaa2d0bb0879..01dcf059b109 100644 --- a/model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/DistributedCacheWriteSkewTest.java +++ b/model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/DistributedCacheWriteSkewTest.java @@ -188,19 +188,24 @@ public static EmbeddedCacheManager createManager(String nodeName) { //distConfigBuilder.storeAsBinary().enable().storeKeysAsBinary(false).storeValuesAsBinary(true); - distConfigBuilder.versioning().enabled(true); - distConfigBuilder.versioning().scheme(VersioningScheme.SIMPLE); + // KEYCLOAK-13692 - Per ISPN-7613 Infinispan: + // * Automatically enables versioning when needed, + // * writeSkewCheck automatically enabled for OPTIMISTIC and REPEATABLE_READ transactions + // distConfigBuilder.versioning().enabled(true); + // distConfigBuilder.versioning().scheme(VersioningScheme.SIMPLE); + // distConfigBuilder.locking().writeSkewCheck(true); - distConfigBuilder.locking().writeSkewCheck(true); distConfigBuilder.locking().isolationLevel(IsolationLevel.REPEATABLE_READ); distConfigBuilder.locking().concurrencyLevel(32); distConfigBuilder.locking().lockAcquisitionTimeout(1000, TimeUnit.SECONDS); - distConfigBuilder.versioning().enabled(true); - distConfigBuilder.versioning().scheme(VersioningScheme.SIMPLE); + // KEYCLOAK-13692 - Per ISPN-7613 Infinispan: + // * Automatically enables versioning when needed, + // * writeSkewCheck automatically enabled for OPTIMISTIC and REPEATABLE_READ transactions + // distConfigBuilder.versioning().enabled(true); + // distConfigBuilder.versioning().scheme(VersioningScheme.SIMPLE); - - // distConfigBuilder.invocationBatching().enable(); + // distConfigBuilder.invocationBatching().enable(); //distConfigBuilder.transaction().transactionMode(TransactionMode.TRANSACTIONAL); distConfigBuilder.transaction().transactionManagerLookup(new EmbeddedTransactionManagerLookup()); distConfigBuilder.transaction().lockingMode(LockingMode.OPTIMISTIC); diff --git a/pom.xml b/pom.xml index e19019a7b99b..abb888702c53 100755 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,4 @@ - + - - + 4.0.0 @@ -37,14 +35,27 @@ pom + + + 7.4.0.GA ${timestamp} - - 19.1.0.Final + 20.0.1.Final 1.2.13.Final - 7.4.0.CD19-redhat-00001 - 11.1.1.Final + 7.4.0.CD20-redhat-00001 + 12.0.3.Final 7.2.0.Final 7.5.22.Final-redhat-1 @@ -52,11 +63,11 @@ 0.66.19 2.4 - 4.5.11 + 4.5.12 4.4.13 0.6 - 1.5.0.Final - 1.62 + 1.5.1.Final + 1.65 3.3.6 3.3.6 3.3.6 @@ -64,13 +75,13 @@ 2.1.3 1.4.197 2.2.3 - 5.3.15.Final - 5.3.15.Final - 9.4.18.Final - 2.10.1 + 5.3.17.Final + 5.3.17.Final + 10.1.8.Final + 2.10.4 ${jackson.version} ${jackson.databind.version} - 1.6.4 + 1.6.5 3.4.1.Final 2.2.1.Final 2.0.1.Final @@ -78,19 +89,19 @@ 2.0.0.Final 2.0.0.Final 1.2.17 - 3.11.2.Final + 3.12.1.Final ${resteasy.version} 20191001.1 - 1.7.22 - 1.7.22 + 1.7.30 + 1.7.30 3.0.10 2.3.3-b02 2.4.0-b180830.0359 2.3.1 1.2.1 2.3.3-b02 - 2.1.0.Final - 1.11.4.Final + 2.1.3.Final + 1.12.1.Final 1.7.1.Final 9.2.4.v20141103 9.3.9.v20160517 @@ -100,7 +111,7 @@ 1.1.6 1.5.2.Final 1.4.3 - 5.0.3.Final + 5.0.3.Final-redhat-00005 25.0-jre @@ -137,6 +148,7 @@ 2.35.0 1.4.01 3.1.7 + 2.3 1.3.5 @@ -772,6 +784,11 @@ wildfly-web-common ${wildfly.version} + + org.wildfly + wildfly-clustering-infinispan-marshalling + ${wildfly.version} + org.wildfly.security wildfly-elytron @@ -797,6 +814,11 @@ infinispan-cachestore-remote ${infinispan.version} + + org.infinispan + infinispan-jboss-marshalling + ${infinispan.version} + org.liquibase liquibase-core @@ -1495,6 +1517,18 @@ commons-io ${commons-io.version} + + + org.eclipse.microprofile.metrics + microprofile-metrics-api + ${microprofile-metrics-api.version} + + + org.osgi + org.osgi.annotation.versioning + + + diff --git a/prod-arguments.json b/prod-arguments.json index 4df5df377b04..39b96348c870 100644 --- a/prod-arguments.json +++ b/prod-arguments.json @@ -20,7 +20,7 @@ "dependencyExclusion.org.jboss:jboss-parent@*": "19.0.0.redhat-2", "dependencyExclusion.org.jboss.web:jbossweb@*": "$EAP6SUPPORTED_ORG_JBOSS_WEB_JBOSSWEB", "dependencyOverride.com.google.guava:guava@org.keycloak.testsuite:integration-arquillian": "", - "dependencyOverride.com.fasterxml.jackson.dataformat:*@*": "2.10.0.redhat-00002", + "dependencyOverride.com.fasterxml.jackson.dataformat:*@*": "2.10.4.redhat-00001", "dependencyOverride.org.jboss.logging:jboss-logging-processor@*": "", "dependencyOverride.org.jboss.logging:jboss-logging@org.keycloak:keycloak-as7-subsystem": "", "dependencyOverride.org.jboss.logging:jboss-logging@org.keycloak:keycloak-saml-as7-subsystem": "" diff --git a/quarkus/runtime/src/main/java/org/keycloak/provider/quarkus/QuarkusCacheManagerProvider.java b/quarkus/runtime/src/main/java/org/keycloak/provider/quarkus/QuarkusCacheManagerProvider.java index 113418c64e06..da253c14fdc2 100644 --- a/quarkus/runtime/src/main/java/org/keycloak/provider/quarkus/QuarkusCacheManagerProvider.java +++ b/quarkus/runtime/src/main/java/org/keycloak/provider/quarkus/QuarkusCacheManagerProvider.java @@ -17,18 +17,22 @@ package org.keycloak.provider.quarkus; +import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.stream.Collectors; import org.infinispan.commons.util.FileLookupFactory; import org.infinispan.configuration.parsing.ConfigurationBuilderHolder; import org.infinispan.configuration.parsing.ParserRegistry; import org.infinispan.manager.DefaultCacheManager; import org.jboss.logging.Logger; -import org.keycloak.Config; import org.keycloak.cluster.ManagedCacheManagerProvider; +import org.keycloak.Config; /** * @author Pedro Igor @@ -42,8 +46,8 @@ public final class QuarkusCacheManagerProvider implements ManagedCacheManagerPro @Override public C getCacheManager(Config.Scope config) { try { - InputStream configurationStream = loadConfiguration(config); - ConfigurationBuilderHolder builder = new ParserRegistry().parse(configurationStream); + String configurationAsString = loadConfigurationToString(config); + ConfigurationBuilderHolder builder = new ParserRegistry().parse(configurationAsString); if (builder.getNamedConfigurationBuilders().get("sessions").clustering().cacheMode().isClustered()) { configureTransportStack(config, builder); @@ -55,6 +59,11 @@ public C getCacheManager(Config.Scope config) { } } + private String loadConfigurationToString(Config.Scope config) throws FileNotFoundException { + BufferedReader configurationReader = new BufferedReader(new InputStreamReader(loadConfiguration(config), StandardCharsets.UTF_8)); + return configurationReader.lines().collect(Collectors.joining(System.lineSeparator())); + } + private InputStream loadConfiguration(Config.Scope config) throws FileNotFoundException { String homeDir = System.getProperty("keycloak.home.dir"); diff --git a/server-spi-private/src/main/java/org/keycloak/device/DeviceActivityManager.java b/server-spi-private/src/main/java/org/keycloak/device/DeviceActivityManager.java index 0ceae7f138b7..27c54d1df653 100644 --- a/server-spi-private/src/main/java/org/keycloak/device/DeviceActivityManager.java +++ b/server-spi-private/src/main/java/org/keycloak/device/DeviceActivityManager.java @@ -89,6 +89,11 @@ public static void attachDevice(UserSessionModel userSession, KeycloakSession se private static DeviceRepresentation getDeviceFromUserAgent(KeycloakSession session) { KeycloakContext context = session.getContext(); + + if (context.getRequestHeaders() == null) { + return null; + } + String userAgent = context.getRequestHeaders().getHeaderString(HttpHeaders.USER_AGENT); if (userAgent == null) { diff --git a/testsuite/integration-arquillian/HOW-TO-RUN.md b/testsuite/integration-arquillian/HOW-TO-RUN.md index e704c85c6727..a072e80dc293 100644 --- a/testsuite/integration-arquillian/HOW-TO-RUN.md +++ b/testsuite/integration-arquillian/HOW-TO-RUN.md @@ -778,7 +778,7 @@ By default JBoss-based containers use TCP-based h2 database. It can be configure b1) For **Undertow** Keycloak backend containers, you can run the tests using the following command (adjust the test specification according to your needs): - `mvn -Pcache-server-infinispan,auth-servers-crossdc-undertow -Dtest=*.crossdc.* -pl testsuite/integration-arquillian/tests/base clean install` + `mvn -Pcache-server-infinispan,auth-servers-crossdc-undertow -Dtest=org.keycloak.testsuite.crossdc.**.*Test -pl testsuite/integration-arquillian/tests/base clean install` *note: 'cache-server-infinispan' can be replaced by 'cache-server-jdg'* @@ -788,7 +788,7 @@ b1) For **Undertow** Keycloak backend containers, you can run the tests using th b2) For **JBoss-based** Keycloak backend containers, you can run the tests like this: - `mvn -Pcache-server-infinispan,auth-servers-crossdc-jboss,auth-server-wildfly -Dtest=*.crossdc.* -pl testsuite/integration-arquillian/tests/base clean install` + `mvn -Pcache-server-infinispan,auth-servers-crossdc-jboss,auth-server-wildfly -Dtest=org.keycloak.testsuite.crossdc.**.*Test -pl testsuite/integration-arquillian/tests/base clean install` *note: 'cache-server-infinispan' can be replaced by 'cache-server-jdg'* @@ -797,7 +797,7 @@ b2) For **JBoss-based** Keycloak backend containers, you can run the tests like **note**: For **JBoss-based** Keycloak backend containers on real DB, the previous commands from (a2) and (b2) can be "squashed" into one. E.g.: - `mvn -f testsuite/integration-arquillian -Dtest=*.crossdc.* -Pcache-server-infinispan,auth-servers-crossdc-jboss,auth-server-wildfly,jpa,db-mariadb clean install` + `mvn -f testsuite/integration-arquillian -Dtest=org.keycloak.testsuite.crossdc.**.*Test -Pcache-server-infinispan,auth-servers-crossdc-jboss,auth-server-wildfly,jpa,db-mariadb clean install` #### Run Cross-DC Tests from Intellij IDEA diff --git a/testsuite/integration-arquillian/pom.xml b/testsuite/integration-arquillian/pom.xml index 0d147742cdeb..59da0c2b4b84 100644 --- a/testsuite/integration-arquillian/pom.xml +++ b/testsuite/integration-arquillian/pom.xml @@ -42,8 +42,8 @@ undertow - 18.0.1.Final - 10.0.3.Final + 19.1.0.Final + 11.1.1.Final 2.1.1.Final diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/common/cli/configure-crossdc-config.cli b/testsuite/integration-arquillian/servers/app-server/jboss/common/cli/configure-crossdc-config.cli index 4e39dfaabe89..20a7762c710e 100644 --- a/testsuite/integration-arquillian/servers/app-server/jboss/common/cli/configure-crossdc-config.cli +++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/cli/configure-crossdc-config.cli @@ -22,7 +22,17 @@ embed-server --server-config=standalone-ha.xml /subsystem=infinispan/cache-container=web/replicated-cache=employee-distributable-cache:add(statistics-enabled=true,mode=SYNC) /subsystem=infinispan/cache-container=web/replicated-cache=employee-distributable-cache/component=locking:add(isolation=REPEATABLE_READ) /subsystem=infinispan/cache-container=web/replicated-cache=employee-distributable-cache/component=transaction:add(mode=BATCH) -/subsystem=infinispan/cache-container=web/replicated-cache=employee-distributable-cache/store=remote:add(remote-servers=[cache-server],cache=employee-distributable-cache,passivation=false,purge=false,preload=false,shared=true) +/subsystem=infinispan/cache-container=web/replicated-cache=employee-distributable-cache/store=remote:add( \ + remote-servers=[cache-server], \ + cache=employee-distributable-cache, \ + passivation=false, \ + purge=false, \ + preload=false, \ + shared=true, \ + properties={ \ + protocolVersion=${keycloak.connectionsInfinispan.hotrodProtocolVersion:2.6} \ + } \ +) /subsystem=infinispan/cache-container=web/replicated-cache=employee-distributable-cache.ssoCache:add(statistics-enabled=true,mode=SYNC) /subsystem=infinispan/cache-container=web/replicated-cache=employee-distributable-cache.ssoCache/store=remote:add( \ @@ -34,7 +44,6 @@ embed-server --server-config=standalone-ha.xml shared=true, \ fetch-state=false, \ properties={ \ - rawValues=true, \ protocolVersion=${keycloak.connectionsInfinispan.hotrodProtocolVersion:2.6} \ } \ ) diff --git a/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/rest/resource/TestCacheResource.java b/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/rest/resource/TestCacheResource.java index 33073a824fb7..cadd2a3d7c35 100644 --- a/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/rest/resource/TestCacheResource.java +++ b/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/rest/resource/TestCacheResource.java @@ -18,6 +18,7 @@ package org.keycloak.testsuite.rest.resource; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.UUID; @@ -77,7 +78,9 @@ public boolean containsUuid(@PathParam("id") String id) { @Path("/enumerate-keys") @Produces(MediaType.APPLICATION_JSON) public Set enumerateKeys() { - return cache.keySet().stream() + // Wrap cache.keySet into another set to avoid infinispan ClassNotFoundExceptions + Set keySet = new HashSet<>(cache.keySet()); + return keySet.stream() .map(Object::toString) .collect(CacheCollectors.serializableCollector(Collectors::toSet)); // See https://issues.jboss.org/browse/ISPN-7596 } diff --git a/testsuite/integration-arquillian/servers/cache-server/jboss/infinispan/pom.xml b/testsuite/integration-arquillian/servers/cache-server/jboss/infinispan/pom.xml index 99a0ee4d0ce1..1b8b7561bbd4 100644 --- a/testsuite/integration-arquillian/servers/cache-server/jboss/infinispan/pom.xml +++ b/testsuite/integration-arquillian/servers/cache-server/jboss/infinispan/pom.xml @@ -38,7 +38,9 @@ false org.infinispan.server infinispan-server - ${infinispan.version} + + 9.4.18.Final ${cache.server.jboss.artifactId}-${cache.server.jboss.version} ${cache.default.worker.io-threads} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/CacheStatisticsControllerEnricher.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/CacheStatisticsControllerEnricher.java index 354f2cdae1da..8d862d83be77 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/CacheStatisticsControllerEnricher.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/CacheStatisticsControllerEnricher.java @@ -8,6 +8,9 @@ import java.lang.reflect.Parameter; import java.net.MalformedURLException; import java.util.Arrays; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; @@ -81,7 +84,8 @@ public void enrich(Object testCase) { } private InfinispanStatistics getInfinispanCacheStatistics(JmxInfinispanCacheStatistics annotation) throws MalformedObjectNameException, IOException, MalformedURLException { - ObjectName mbeanName = new ObjectName(String.format( + List mbeanNameTemplates = new LinkedList<>(); + mbeanNameTemplates.add(new ObjectName(String.format( "%s:type=%s,name=\"%s(%s)\",manager=\"%s\",component=%s", annotation.domain().isEmpty() ? getDefaultDomain(annotation.dc().getDcIndex(), annotation.dcNodeIndex()) : InfinispanConnectionProvider.JMX_DOMAIN, annotation.type(), @@ -89,9 +93,17 @@ private InfinispanStatistics getInfinispanCacheStatistics(JmxInfinispanCacheStat annotation.cacheMode(), annotation.cacheManagerName(), annotation.component() - )); + ))); + + // For the Keycloak on Wildfly 20 and bigger, the typical objectName for the cache statistics looks similar to: jboss.as:subsystem=infinispan,cache-container=keycloak,cache=actionTokens + if (annotation.dc().getDcIndex() != -1 && annotation.dcNodeIndex() != -1) { + mbeanNameTemplates.add(new ObjectName(String.format( + "jboss.as:subsystem=infinispan,cache-container=keycloak,cache=%s", + annotation.cacheName() + ))); + } - InfinispanStatistics value = new InfinispanCacheStatisticsImpl(getJmxServerConnection(annotation), mbeanName); + InfinispanStatistics value = new InfinispanCacheStatisticsImpl(getJmxServerConnection(annotation), mbeanNameTemplates); if (annotation.domain().isEmpty()) { try { @@ -101,7 +113,7 @@ private InfinispanStatistics getInfinispanCacheStatistics(JmxInfinispanCacheStat } catch (RuntimeException ex) { if (annotation.dc() != DC.UNDEFINED && annotation.dcNodeIndex() != -1 && suiteContext.get().getAuthServerBackendsInfo(annotation.dc().getDcIndex()).get(annotation.dcNodeIndex()).isStarted()) { - LOG.warn("Could not reset statistics for " + mbeanName + ". The reason is: \"" + ex.getMessage() + "\""); + LOG.warn("Could not reset statistics for any of the mbean name templates " + mbeanNameTemplates + ". The reason is: \"" + ex.getMessage() + "\""); } } } @@ -253,12 +265,16 @@ private Supplier getJmxServerConnection(JmxInfinispanChan private static abstract class CacheStatisticsImpl implements InfinispanStatistics { private final Supplier mbscCreateor; - private final ObjectName mbeanNameTemplate; + private final List mbeanNameTemplates; private ObjectName mbeanName; public CacheStatisticsImpl(Supplier mbscCreateor, ObjectName mbeanNameTemplate) { + this(mbscCreateor, Collections.singletonList(mbeanNameTemplate)); + } + + public CacheStatisticsImpl(Supplier mbscCreateor, List mbeanNameTemplates) { this.mbscCreateor = mbscCreateor; - this.mbeanNameTemplate = mbeanNameTemplate; + this.mbeanNameTemplates = mbeanNameTemplates; } protected MBeanServerConnection getConnection() { @@ -295,11 +311,18 @@ public Map getStatistics() { protected ObjectName getMbeanName() throws IOException, RuntimeException { if (this.mbeanName == null) { - Set queryNames = getConnection().queryNames(mbeanNameTemplate, null); - if (queryNames.isEmpty()) { - throw new RuntimeException("No MBean of template " + mbeanNameTemplate + " found at JMX server"); + // Try all the mbeanName templates + for (ObjectName mbeanNameTemplate : this.mbeanNameTemplates) { + Set queryNames = getConnection().queryNames(mbeanNameTemplate, null); + if (queryNames.isEmpty()) { + LOG.infof("No MBean available for the template %s .", mbeanNameTemplate); + continue; + } + this.mbeanName = queryNames.iterator().next(); + return this.mbeanName; } - this.mbeanName = queryNames.iterator().next(); + + throw new RuntimeException("No MBean for any of the templates " + this.mbeanNameTemplates + " found at JMX server"); } return this.mbeanName; @@ -322,7 +345,7 @@ public void waitToBecomeAvailable(int time, TimeUnit unit) { getMbeanName(); if (! isAvailable()) throw new RuntimeException("Not available"); } catch (IOException | RuntimeException ex) { - throw new RuntimeException("Timed out while waiting for " + mbeanNameTemplate + " to become available", ex); + throw new RuntimeException("Timed out while waiting for any of the mbean name templates " + this.mbeanNameTemplates + " to become available", ex); } }, 1 + (int) timeInMillis / 100, 100); } @@ -332,8 +355,8 @@ public void waitToBecomeAvailable(int time, TimeUnit unit) { private static class InfinispanCacheStatisticsImpl extends CacheStatisticsImpl { - public InfinispanCacheStatisticsImpl(Supplier mbscCreator, ObjectName mbeanName) { - super(mbscCreator, mbeanName); + public InfinispanCacheStatisticsImpl(Supplier mbscCreator, List mbeanNames) { + super(mbscCreator, mbeanNames); } @Override @@ -347,7 +370,7 @@ public void reset() { @Override protected boolean isAvailable() { - return getSingleStatistics(Constants.STAT_CACHE_ELAPSED_TIME) != null; + return getSingleStatistics(Constants.STAT_CACHE_HITS) != null; } } diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/h2/H2TestEnricher.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/h2/H2TestEnricher.java index ecb6582d62bc..2201d595d20c 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/h2/H2TestEnricher.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/h2/H2TestEnricher.java @@ -39,4 +39,26 @@ public void stopH2(@Observes(precedence = -2) AfterSuite event) { } } + // Ability to run H2 database available via TCP in separate process. Useful for dev purposes + public static void main(String[] args) { + System.setProperty("run.h2", "true"); + + final H2TestEnricher h2Enricher = new H2TestEnricher(); + + try { + h2Enricher.startH2(null); + } catch (Exception se) { + h2Enricher.stopH2(null); + } + + Runtime.getRuntime().addShutdownHook(new Thread() { + + @Override + public void run() { + h2Enricher.stopH2(null); + } + + }); + } + } \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/ActionTokenCrossDCTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/ActionTokenCrossDCTest.java index d88785bd719e..e0ce00ca0c6f 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/ActionTokenCrossDCTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/ActionTokenCrossDCTest.java @@ -94,6 +94,8 @@ public void sendResetPasswordEmailSuccessWorksInCrossDc( Comparable originalNumberOfEntries = cacheDc0Node0Statistics.getSingleStatistics(Constants.STAT_CACHE_NUMBER_OF_ENTRIES_IN_MEMORY); + log.infof("Before creating user. %s", dumpNumberOfEntriesInMemory(cacheDc0Node0Statistics, cacheDc0Node1Statistics, cacheDc1Node0Statistics)); + UserRepresentation userRep = new UserRepresentation(); userRep.setEnabled(true); userRep.setUsername("user1"); @@ -108,6 +110,8 @@ public void sendResetPasswordEmailSuccessWorksInCrossDc( Assert.assertEquals(1, greenMail.getReceivedMessages().length); + log.infof("After sending email. %s", dumpNumberOfEntriesInMemory(cacheDc0Node0Statistics, cacheDc0Node1Statistics, cacheDc1Node0Statistics)); + MimeMessage message = greenMail.getReceivedMessages()[0]; String link = MailUtils.getPasswordResetEmailLink(message); @@ -117,10 +121,14 @@ public void sendResetPasswordEmailSuccessWorksInCrossDc( Matchers::is ); + log.infof("After click to the link from email. %s", dumpNumberOfEntriesInMemory(cacheDc0Node0Statistics, cacheDc0Node1Statistics, cacheDc1Node0Statistics)); + proceedPage.assertCurrent(); proceedPage.clickProceedLink(); passwordUpdatePage.assertCurrent(); + log.infof("After open password update page. %s", dumpNumberOfEntriesInMemory(cacheDc0Node0Statistics, cacheDc0Node1Statistics, cacheDc1Node0Statistics)); + // Verify that there was at least one message sent via the channel - Even if we did the change on DC0, the message may be sent either from DC0 or DC1. Seems it depends on the actionTokens key ownership. // In case that it was sent from DC1, we will receive it in DC0. assertStatistics(channelStatisticsCrossDc, @@ -140,6 +148,8 @@ public void sendResetPasswordEmailSuccessWorksInCrossDc( assertThat(PageUtils.getPageTitle(driver), containsString("Your account has been updated.")); + log.infof("After update password. %s", dumpNumberOfEntriesInMemory(cacheDc0Node0Statistics, cacheDc0Node1Statistics, cacheDc1Node0Statistics)); + // Verify that there was an action token added in the node which was targetted by the link assertThat(cacheDc0Node0Statistics.getSingleStatistics(Constants.STAT_CACHE_NUMBER_OF_ENTRIES_IN_MEMORY), greaterThan(originalNumberOfEntries)); @@ -154,10 +164,22 @@ public void sendResetPasswordEmailSuccessWorksInCrossDc( Matchers::greaterThan ); + log.infof("After another click to the invalid link. %s", dumpNumberOfEntriesInMemory(cacheDc0Node0Statistics, cacheDc0Node1Statistics, cacheDc1Node0Statistics)); + errorPage.assertCurrent(); log.debug("--DC: END sendResetPasswordEmailSuccessWorksInCrossDc"); } + private String dumpNumberOfEntriesInMemory(InfinispanStatistics cacheDc0Node0Statistics, InfinispanStatistics cacheDc0Node1Statistics, InfinispanStatistics cacheDc1Node0Statistics) { + return new StringBuilder("dc0node0 - numberOfEntriesInMemory: ") + .append(cacheDc0Node0Statistics.getSingleStatistics(Constants.STAT_CACHE_NUMBER_OF_ENTRIES_IN_MEMORY)) + .append(", dc0node1 - numberOfEntriesInMemory: ") + .append(cacheDc0Node1Statistics.getSingleStatistics(Constants.STAT_CACHE_NUMBER_OF_ENTRIES_IN_MEMORY)) + .append(", dc1node0 - numberOfEntriesInMemory: ") + .append(cacheDc1Node0Statistics.getSingleStatistics(Constants.STAT_CACHE_NUMBER_OF_ENTRIES_IN_MEMORY)) + .toString(); + } + @Test @InitialDcState(authServers = ServerSetup.FIRST_NODE_IN_FIRST_DC) public void sendResetPasswordEmailAfterNewNodeAdded() throws IOException, MessagingException { diff --git a/testsuite/integration-arquillian/tests/pom.xml b/testsuite/integration-arquillian/tests/pom.xml index 33fcb1c3bc6b..156c6789b782 100755 --- a/testsuite/integration-arquillian/tests/pom.xml +++ b/testsuite/integration-arquillian/tests/pom.xml @@ -788,7 +788,6 @@ false standalone.xml ${auth.server.home}/standalone/configuration - 1.4.193 1024m @@ -813,7 +812,6 @@ false standalone.xml ${auth.server.home}/standalone/configuration - 1.4.193 1024m @@ -1050,7 +1048,7 @@ ${cache.server.home}/standalone/configuration %d{HH:mm:ss,SSS} [%t] %-5p [%c{1.}] %m%n false - 2.8 + 2.9 @@ -1121,7 +1119,7 @@ ${cache.server.home}/standalone/configuration %d{HH:mm:ss,SSS} [%t] %-5p [%c{1.}] %m%n false - 2.6 + 2.9 @@ -1811,6 +1809,12 @@ provided + + + org.eclipse.microprofile.metrics + microprofile-metrics-api + + diff --git a/wildfly/server-subsystem/src/main/resources/subsystem-templates/keycloak-infinispan.xml b/wildfly/server-subsystem/src/main/resources/subsystem-templates/keycloak-infinispan.xml index bf000fc01f42..41697cac28d6 100755 --- a/wildfly/server-subsystem/src/main/resources/subsystem-templates/keycloak-infinispan.xml +++ b/wildfly/server-subsystem/src/main/resources/subsystem-templates/keycloak-infinispan.xml @@ -19,12 +19,12 @@ org.jboss.as.clustering.infinispan - + - + @@ -89,7 +89,7 @@ - +