[KEYCLOAK-13692] Upgrade to Wildfly "20.0.1.Final" and Infinispan "10.1.8.Final"

Co-authored-by: Jan Lieskovsky <jlieskov@redhat.com>
Co-authored-by: Marek Posolda <mposolda@redhat.com>
This commit is contained in:
Jan Lieskovsky 2020-06-10 14:50:45 +02:00 committed by Marek Posolda
parent 46bf139cb4
commit 969b09f530
161 changed files with 4279 additions and 279 deletions

4
.gitignore vendored
View File

@ -51,6 +51,10 @@ nbproject
*.tar
*.zip
# Python byte-compiled files #
##############################
*.pyc
# Logs and databases #
######################
*.log

View File

@ -30,6 +30,18 @@
<name>Keycloak Wildfly Integration</name>
<description/>
<repositories>
<!-- KEYCLOAK-13692 Needed for org.picketbox:*:jar:5.0.3.Final-redhat-00005 -->
<repository>
<id>jboss-enterprise-maven-repository</id>
<name>JBoss Enterprise Maven Repository</name>
<url>https://maven.repository.redhat.com/ga/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jboss.logging</groupId>

View File

@ -66,14 +66,21 @@ public class InfinispanSessionCacheIdMapperUpdater {
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 class InfinispanSessionCacheIdMapperUpdater {
}
}
/**
* 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<String, String[]> ssoCache, SsoSessionCacheListener listener) {
if (ssoCache.getCacheConfiguration().persistence() == null) {
return;

View File

@ -30,6 +30,18 @@
<name>Keycloak Wildfly SAML Adapter</name>
<description/>
<repositories>
<!-- KEYCLOAK-13692 Needed for org.picketbox:*:jar:5.0.3.Final-redhat-00005 -->
<repository>
<id>jboss-enterprise-maven-repository</id>
<name>JBoss Enterprise Maven Repository</name>
<url>https://maven.repository.redhat.com/ga/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jboss.logging</groupId>

View File

@ -35,6 +35,18 @@
<maven.compiler.source>1.7</maven.compiler.source>
</properties>
<repositories>
<!-- KEYCLOAK-13692 Needed for org.picketbox:*:jar:5.0.3.Final-redhat-00005 -->
<repository>
<id>jboss-enterprise-maven-repository</id>
<name>JBoss Enterprise Maven Repository</name>
<url>https://maven.repository.redhat.com/ga/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jboss.logging</groupId>

View File

@ -1,91 +1,91 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.62</version>
<version>1.65</version>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html</url>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.62</version>
<version>1.65</version>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html</url>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.10.1</version>
<version>2.10.4</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.1/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.4/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.10.1</version>
<version>2.10.4</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.1/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.4/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.1</version>
<version>2.10.4</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.1/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.4/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-base</artifactId>
<version>2.10.1</version>
<version>2.10.4</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>2.10.1</version>
<version>2.10.4</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>2.10.1</version>
<version>2.10.4</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>

View File

@ -1,91 +1,91 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.62.0.redhat-00001</version>
<version>1.65.0.redhat-00001</version>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html</url>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.62.0.redhat-00001</version>
<version>1.65.0.redhat-00001</version>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html</url>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.10.1.redhat-00001</version>
<version>2.10.4.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.1/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.4/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.10.1.redhat-00001</version>
<version>2.10.4.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.1/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.4/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.1.redhat-00001</version>
<version>2.10.4.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.1/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.4/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-base</artifactId>
<version>2.10.1.redhat-00001</version>
<version>2.10.4.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>2.10.1.redhat-00001</version>
<version>2.10.4.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>2.10.1.redhat-00001</version>
<version>2.10.4.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>

View File

@ -1,102 +1,102 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.62</version>
<version>1.65</version>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html</url>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.62</version>
<version>1.65</version>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html</url>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.10.1</version>
<version>2.10.4</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.1/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.4/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.10.1</version>
<version>2.10.4</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.1/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.4/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.1</version>
<version>2.10.4</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.1/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.4/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-base</artifactId>
<version>2.10.1</version>
<version>2.10.4</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>2.10.1</version>
<version>2.10.4</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>2.10.1</version>
<version>2.10.4</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.11</version>
<version>4.5.12</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>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</url>
<url>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</url>
</license>
</licenses>
</dependency>

View File

@ -1,102 +1,102 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.62.0.redhat-00001</version>
<version>1.65.0.redhat-00001</version>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html</url>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.62.0.redhat-00001</version>
<version>1.65.0.redhat-00001</version>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html</url>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.10.1.redhat-00001</version>
<version>2.10.4.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.1/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.10.4/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.10.1.redhat-00001</version>
<version>2.10.4.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.1/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.10.4/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.1.redhat-00001</version>
<version>2.10.4.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.1/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.10.4/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-base</artifactId>
<version>2.10.1.redhat-00001</version>
<version>2.10.4.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>2.10.1.redhat-00001</version>
<version>2.10.4.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>2.10.1.redhat-00001</version>
<version>2.10.4.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.1/json/src/main/resources/META-INF/LICENSE</url>
<url>https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.10.4/json/src/main/resources/META-INF/LICENSE</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.11.redhat-00001</version>
<version>4.5.12.redhat-00001</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>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</url>
<url>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</url>
</license>
</licenses>
</dependency>

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
</dependencies>

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
</dependencies>

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
</dependencies>

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
</dependencies>

View File

@ -80,6 +80,16 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-jboss-marshalling</artifactId>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authz-policy-common</artifactId>

View File

@ -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 ***

View File

@ -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 ***

View File

@ -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 ***

View File

@ -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 ***

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
<dependency>
@ -103,7 +103,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.22</version>
<version>3.1.1</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
@ -551,6 +551,17 @@
</license>
</licenses>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-jboss-marshalling</artifactId>
<version>10.1.8.Final</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/infinispan/infinispan/master/LICENSE.md</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-cbor</artifactId>

View File

@ -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.

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
<dependency>
@ -551,6 +551,17 @@
</license>
</licenses>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-jboss-marshalling</artifactId>
<version>10.1.8.Final</version>
<licenses>
<license>
<name>Apache Software License 2.0</name>
<url>https://raw.githubusercontent.com/infinispan/infinispan/master/LICENSE.md</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-cbor</artifactId>

View File

@ -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.

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<module xmlns="urn:jboss:module:1.3" name="org.infinispan.jboss-marshalling">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<artifact name="${org.infinispan:infinispan-jboss-marshalling}"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="com.github.ben-manes.caffeine"/>
<module name="org.infinispan"/>
<module name="org.infinispan.commons"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.marshalling"/>
<module name="org.jboss.marshalling.river"/>
</dependencies>
</module>

View File

@ -34,8 +34,10 @@
<module name="org.infinispan.commons"/>
<module name="org.infinispan.persistence.remote"/>
<module name="org.infinispan.client.hotrod"/>
<module name="org.infinispan.jboss-marshalling"/>
<module name="org.jgroups"/>
<module name="org.jboss.logging"/>
<module name="org.wildfly.clustering.marshalling.api"/>
<module name="io.netty"/>
<module name="javax.api"/>
</dependencies>

View File

@ -1,25 +1,25 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.62</version>
<version>1.65</version>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html</url>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.62</version>
<version>1.65</version>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv62/LICENSE.html</url>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html</url>
</license>
</licenses>
</dependency>

View File

@ -1,25 +1,25 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.60.0.redhat-00001</version>
<version>1.65.0.redhat-00001</version>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv60/LICENSE.html</url>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html</url>
</license>
</licenses>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.60.0.redhat-00001</version>
<version>1.65.0.redhat-00001</version>
<licenses>
<license>
<name>MIT License</name>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv60/LICENSE.html</url>
<url>https://raw.githubusercontent.com/bcgit/bc-java/r1rv65/LICENSE.html</url>
</license>
</licenses>
</dependency>

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
</dependencies>

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version='1.0' encoding='UTF-8'?>
<licenseSummary>
<dependencies>
</dependencies>

View File

@ -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)

View File

@ -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 <jlieskov@redhat.com>"
__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
'<version>' 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 <product.name> and <product.name.full> 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
<property> 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 <property> element.
The value of the child dictionary item is the
value of the <property> 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 <property> 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 <property> 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 <property> 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 <url> 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)
)

View File

@ -51,10 +51,29 @@
<groupId>org.infinispan</groupId>
<artifactId>infinispan-cachestore-remote</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-jboss-marshalling</artifactId>
</dependency>
<!-- Needed for externalizers in package "org.keycloak.models.sessions.infinispan.entities.wildfly" .
Hopefully can be removed once we start to use the protobuf marshalling -->
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-clustering-infinispan-marshalling</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- Needed for infinispan statistics -->
<dependency>
<groupId>org.eclipse.microprofile.metrics</groupId>
<artifactId>microprofile-metrics-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -19,6 +19,10 @@ package org.keycloak.cluster.infinispan;
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.InfinispanConnectionProvider;
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 InfinispanClusterProviderFactory implements ClusterProviderFactory
@ViewChanged
public void viewChanged(ViewChangedEvent event) {
EmbeddedCacheManager cacheManager = event.getCacheManager();
Transport transport = cacheManager.getTransport();
final Set<String> removedNodesAddresses = convertAddresses(event.getOldMembers());
final Set<String> 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<String> newAddresses = convertAddresses(event.getNewMembers());
Set<String> 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;
removedNodesAddresses.removeAll(newAddresses);
if (removedNodesAddresses.isEmpty()) {
return;
}
logger.debugf("Nodes %s removed from cluster. Removing tasks locked by this nodes", removedNodesAddresses.toString());
workCache.entrySet().removeIf(new LockEntryPredicate(removedNodesAddresses));
}
logger.debugf("Nodes %s removed from cluster. Removing tasks locked by this nodes", removedNodesAddresses.toString());
Cache<String, Serializable> cache = cacheManager.getCache(InfinispanConnectionProvider.WORK_CACHE_NAME);
Iterator<String> toRemove = cache.entrySet().stream().filter(new Predicate<Map.Entry<String, Serializable>>() {
@Override
public boolean test(Map.Entry<String, Serializable> entry) {
if (!(entry.getValue() instanceof LockEntry)) {
return false;
}
LockEntry lock = (LockEntry) entry.getValue();
return removedNodesAddresses.contains(lock.getNode());
}
}).map(new Function<Map.Entry<String, Serializable>, String>() {
@Override
public String apply(Map.Entry<String, Serializable> entry) {
return entry.getKey();
}
}).iterator();
while (toRemove.hasNext()) {
String rem = toRemove.next();
if (logger.isTraceEnabled()) {
logger.tracef("Removing task %s due it's node left cluster", rem);
}
// If we have task in progress, it needs to be notified
notificationsManager.taskFinished(rem, false);
cache.remove(rem);
}
}
});
}
private Set<String> convertAddresses(Collection<Address> addresses) {

View File

@ -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

View File

@ -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 <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
@SerializeWith(LockEntry.ExternalizerImpl.class)
public class LockEntry implements Serializable {
private String node;
@ -42,4 +51,33 @@ public class LockEntry implements Serializable {
public void setTimestamp(int timestamp) {
this.timestamp = timestamp;
}
public static class ExternalizerImpl implements Externalizer<LockEntry> {
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;
}
}
}

View File

@ -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 <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
@SerializeWith(LockEntryPredicate.ExternalizerImpl.class)
public class LockEntryPredicate implements Predicate<Map.Entry<String, Serializable>> {
private final Set<String> removedNodesAddresses;
public LockEntryPredicate(Set<String> removedNodesAddresses) {
this.removedNodesAddresses = removedNodesAddresses;
}
@Override
public boolean test(Map.Entry<String, Serializable> entry) {
if (!(entry.getValue() instanceof LockEntry)) {
return false;
}
LockEntry lock = (LockEntry) entry.getValue();
return removedNodesAddresses.contains(lock.getNode());
}
public static class ExternalizerImpl implements Externalizer<LockEntryPredicate> {
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<>())
);
}
}
}

View File

@ -21,15 +21,20 @@ import java.util.Iterator;
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 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
}
protected void initEmbedded() {
GlobalConfigurationBuilder gcb = new GlobalConfigurationBuilder();
boolean clustered = config.getBoolean("clustered", false);
@ -191,6 +193,11 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
.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 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
.size(InfinispanConnectionProvider.KEYS_CACHE_DEFAULT_MAX);
cb.expiration().maxIdle(InfinispanConnectionProvider.KEYS_CACHE_MAX_IDLE_SECONDS, TimeUnit.SECONDS);
return cb.build();
}
@ -461,18 +469,24 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
}
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) {

View File

@ -95,6 +95,10 @@ public class RemoteCacheProvider {
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 {

View File

@ -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<ActionTokenReducedKey> {
public ActionTokenReducedKeyWFExternalizer() {
super(ActionTokenReducedKey.class, new ActionTokenReducedKey.ExternalizerImpl());
}
}

View File

@ -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<ActionTokenValueEntity> {
public ActionTokenValueEntityWFExternalizer() {
super(ActionTokenValueEntity.class, new ActionTokenValueEntity.ExternalizerImpl());
}
}

View File

@ -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<AuthenticatedClientSessionEntity> {
public AuthenticatedClientSessionEntityWFExternalizer() {
super(AuthenticatedClientSessionEntity.class, new AuthenticatedClientSessionEntity.ExternalizerImpl());
}
}

View File

@ -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<AuthenticatedClientSessionPredicate> {
public AuthenticatedClientSessionPredicateWFExternalizer() {
super(AuthenticatedClientSessionPredicate.class, new AuthenticatedClientSessionPredicate.ExternalizerImpl());
}
}

View File

@ -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<AuthenticatedClientSessionStore> {
public AuthenticatedClientSessionStoreWFExternalizer() {
super(AuthenticatedClientSessionStore.class, new AuthenticatedClientSessionStore.ExternalizerImpl());
}
}

View File

@ -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<AuthenticationSessionAuthNoteUpdateEvent> {
public AuthenticationSessionAuthNoteUpdateEventWFExternalizer() {
super(AuthenticationSessionAuthNoteUpdateEvent.class, new AuthenticationSessionAuthNoteUpdateEvent.ExternalizerImpl());
}
}

View File

@ -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<AuthenticationSessionEntity> {
public AuthenticationSessionEntityWFExternalizer() {
super(AuthenticationSessionEntity.class, new AuthenticationSessionEntity.ExternalizerImpl());
}
}

View File

@ -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<ClientAddedEvent> {
public ClientAddedEventWFExternalizer() {
super(ClientAddedEvent.class, new ClientAddedEvent.ExternalizerImpl());
}
}

View File

@ -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<ClientRemovedEvent> {
public ClientRemovedEventWFExternalizer() {
super(ClientRemovedEvent.class, new ClientRemovedEvent.ExternalizerImpl());
}
}

View File

@ -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<ClientRemovedSessionEvent> {
public ClientRemovedSessionEventWFExternalizer() {
super(ClientRemovedSessionEvent.class, new ClientRemovedSessionEvent.ExternalizerImpl());
}
}

View File

@ -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<ClientTemplateEvent> {
public ClientTemplateEventWFExternalizer() {
super(ClientTemplateEvent.class, new ClientTemplateEvent.ExternalizerImpl());
}
}

View File

@ -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<ClientUpdatedEvent> {
public ClientUpdatedEventWFExternalizer() {
super(ClientUpdatedEvent.class, new ClientUpdatedEvent.ExternalizerImpl());
}
}

View File

@ -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<GroupAddedEvent> {
public GroupAddedEventWFExternalizer() {
super(GroupAddedEvent.class, new GroupAddedEvent.ExternalizerImpl());
}
}

View File

@ -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<GroupListPredicate> {
public GroupListPredicateWFExternalizer() {
super(GroupListPredicate.class, new GroupListPredicate.ExternalizerImpl());
}
}

View File

@ -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<GroupMovedEvent> {
public GroupMovedEventWFExternalizer() {
super(GroupMovedEvent.class, new GroupMovedEvent.ExternalizerImpl());
}
}

View File

@ -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<GroupRemovedEvent> {
public GroupRemovedEventWFExternalizer() {
super(GroupRemovedEvent.class, new GroupRemovedEvent.ExternalizerImpl());
}
}

View File

@ -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<GroupUpdatedEvent> {
public GroupUpdatedEventWFExternalizer() {
super(GroupUpdatedEvent.class, new GroupUpdatedEvent.ExternalizerImpl());
}
}

View File

@ -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<HasRolePredicate> {
public HasRolePredicateWFExternalizer() {
super(HasRolePredicate.class, new HasRolePredicate.ExternalizerImpl());
}
}

View File

@ -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<InClientPredicate> {
public InClientPredicateWFExternalizer() {
super(InClientPredicate.class, new InClientPredicate.ExternalizerImpl());
}
}

View File

@ -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<InIdentityProviderPredicate> {
public InIdentityProviderPredicateWFExternalizer() {
super(InIdentityProviderPredicate.class, new InIdentityProviderPredicate.ExternalizerImpl());
}
}

View File

@ -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<InRealmPredicate> {
public InRealmPredicateWFExternalizer() {
super(InRealmPredicate.class, new InRealmPredicate.ExternalizerImpl());
}
}

View File

@ -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<InResourcePredicate> {
public InResourcePredicateWFExternalizer() {
super(InResourcePredicate.class, new InResourcePredicate.ExternalizerImpl());
}
}

View File

@ -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<InResourceServerPredicate> {
public InResourceServerPredicateWFExternalizer() {
super(InResourceServerPredicate.class, new InResourceServerPredicate.ExternalizerImpl());
}
}

View File

@ -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<InScopePredicate> {
public InScopePredicateWFExternalizer() {
super(InScopePredicate.class, new InScopePredicate.ExternalizerImpl());
}
}

Some files were not shown because too many files have changed in this diff Show More