098d4dda0e
Split PublicKeyStorageProvider - Extract clearCache() method to separate interface and move it to the legacy module - Make PublicKeyProvider factories environment dependent - Simple map storage for public keys that just delegates Resolves #12763 Co-authored-by: Martin Kanis <mkanis@redhat.com>
911 lines
44 KiB
XML
911 lines
44 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
~ Copyright 2016 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.
|
|
-->
|
|
|
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
<parent>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>integration-arquillian-tests</artifactId>
|
|
<version>999-SNAPSHOT</version>
|
|
</parent>
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<artifactId>integration-arquillian-tests-base</artifactId>
|
|
|
|
<name>Base TestSuite</name>
|
|
|
|
<description></description>
|
|
|
|
<properties>
|
|
<cli.log.output>false</cli.log.output>
|
|
<test.intermittent>false</test.intermittent>
|
|
<exclude.test>-</exclude.test>
|
|
<exclude.console>-</exclude.console>
|
|
<exclude.account>-</exclude.account>
|
|
<exclude.client>-</exclude.client>
|
|
<!--exclude cluster tests by default, enabled by 'auth-server-*-cluster' profiles in tests/pom.xml-->
|
|
<exclude.cluster>**/cluster/**/*Test.java</exclude.cluster>
|
|
<exclude.crossdc>**/crossdc/**/*Test.java</exclude.crossdc>
|
|
<mvel.version>2.4.0.Final</mvel.version>
|
|
<systemrules.version>1.19.0</systemrules.version>
|
|
<common.resources>${basedir}/../../servers/auth-server/jboss/common</common.resources>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.keycloak</groupId>
|
|
<artifactId>keycloak-util-embedded-ldap</artifactId>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>bouncycastle</groupId>
|
|
<artifactId>bcprov-jdk15</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>commons-configuration</groupId>
|
|
<artifactId>commons-configuration</artifactId>
|
|
<version>1.10</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>commons-io</groupId>
|
|
<artifactId>commons-io</artifactId>
|
|
<version>2.5</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>integration-arquillian-testsuite-providers</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>integration-arquillian-testsuite-providers-deployment</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.hamcrest</groupId>
|
|
<artifactId>hamcrest</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.subethamail</groupId>
|
|
<artifactId>subethasmtp</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.icegreen</groupId>
|
|
<artifactId>greenmail</artifactId>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.testcontainers</groupId>
|
|
<artifactId>testcontainers</artifactId>
|
|
<version>${testcontainers.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.keycloak</groupId>
|
|
<artifactId>keycloak-model-map</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.keycloak</groupId>
|
|
<artifactId>keycloak-model-legacy-services</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>integration-arquillian-servers-app-server-spi</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>integration-arquillian-servers-app-server-undertow</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>photoz-restful-api</artifactId>
|
|
<version>${project.version}</version>
|
|
<classifier>classes</classifier>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.mvel</groupId>
|
|
<artifactId>mvel2</artifactId>
|
|
<version>${mvel.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.maven.resolver</groupId>
|
|
<artifactId>maven-resolver-api</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.jboss</groupId>
|
|
<artifactId>jandex</artifactId>
|
|
<version>2.1.3.Final</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.github.stefanbirkner</groupId>
|
|
<artifactId>system-rules</artifactId>
|
|
<version>${systemrules.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.infinispan</groupId>
|
|
<artifactId>infinispan-server-hotrod</artifactId>
|
|
<version>${infinispan.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<testResources>
|
|
<testResource>
|
|
<directory>src/test/resources</directory>
|
|
<filtering>true</filtering>
|
|
<includes>
|
|
<include>migration-test/*</include>
|
|
<include>authorization-test/*</include>
|
|
</includes>
|
|
</testResource>
|
|
<testResource>
|
|
<directory>src/test/resources</directory>
|
|
</testResource>
|
|
</testResources>
|
|
<plugins>
|
|
<plugin>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>2.2</version>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>test-jar</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<phase>process-test-resources</phase>
|
|
<goals>
|
|
<goal>run</goal>
|
|
</goals>
|
|
<configuration>
|
|
<target>
|
|
<delete>
|
|
<fileset dir="${project.build.directory}" includes="map-*.json"/>
|
|
</delete>
|
|
</target>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<configuration>
|
|
<excludes>
|
|
<exclude>${exclude.test}</exclude>
|
|
<exclude>${exclude.console}</exclude>
|
|
<exclude>${exclude.account}</exclude>
|
|
<exclude>${exclude.client}</exclude>
|
|
<exclude>${exclude.cluster}</exclude>
|
|
<exclude>${exclude.crossdc}</exclude>
|
|
</excludes>
|
|
<systemPropertyVariables>
|
|
<com.mchange.v2.c3p0.VMID>testsuiteVmId</com.mchange.v2.c3p0.VMID>
|
|
<auth.server.db.host>${docker.container.testdb.ip}</auth.server.db.host>
|
|
</systemPropertyVariables>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-common-dependencies</id>
|
|
<phase>generate-resources</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>src/test/resources</directory>
|
|
<includes>
|
|
<include>arquillian.xml</include>
|
|
<include>wildfly-config.xml</include>
|
|
<include>password-blacklists/**</include>
|
|
<include>log4j.properties</include>
|
|
<include>vault/**</include>
|
|
<include>firefox-cookies-prefs.js</include>
|
|
</includes>
|
|
<!--<filtering>true</filtering>-->
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>copy-admin-user-json-file</id>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<skip>${skip.add.user.json}</skip>
|
|
<outputDirectory>${auth.server.config.dir}</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>src/test/resources</directory>
|
|
<includes>
|
|
<include>keycloak-add-user.json</include>
|
|
</includes>
|
|
<filtering>true</filtering>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>unpack-client-cli-dist</id>
|
|
<phase>generate-test-resources</phase>
|
|
<goals>
|
|
<goal>unpack</goal>
|
|
</goals>
|
|
<configuration>
|
|
<artifactItems>
|
|
<artifactItem>
|
|
<groupId>org.keycloak</groupId>
|
|
<artifactId>keycloak-client-cli-dist</artifactId>
|
|
<version>${project.version}</version>
|
|
<type>zip</type>
|
|
<outputDirectory>${containers.home}</outputDirectory>
|
|
</artifactItem>
|
|
</artifactItems>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>io.fabric8</groupId>
|
|
<artifactId>docker-maven-plugin</artifactId>
|
|
<version>${docker.maven.plugin.version}</version>
|
|
<configuration>
|
|
<skip>${docker.database.skip}</skip>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>start-db-container</id>
|
|
<phase>process-test-classes</phase>
|
|
<goals>
|
|
<goal>start</goal>
|
|
</goals>
|
|
<configuration>
|
|
<showLogs>true</showLogs>
|
|
<images>
|
|
<image>
|
|
<alias>testdb</alias>
|
|
<name>${docker.database.image}</name>
|
|
<run>
|
|
<shmSize>${docker.database.shmsize}</shmSize>
|
|
<ports>
|
|
<port>${docker.database.port}</port>
|
|
</ports>
|
|
<env>
|
|
<!-- MYSQL and MariaDB -->
|
|
<MYSQL_DATABASE>${keycloak.connectionsJpa.database}</MYSQL_DATABASE>
|
|
<MYSQL_USER>${keycloak.connectionsJpa.user}</MYSQL_USER>
|
|
<MYSQL_PASSWORD>${keycloak.connectionsJpa.password}</MYSQL_PASSWORD>
|
|
<MYSQL_RANDOM_ROOT_PASSWORD>true</MYSQL_RANDOM_ROOT_PASSWORD>
|
|
|
|
<!-- PostgreSQL -->
|
|
<POSTGRES_DB>${keycloak.connectionsJpa.database}</POSTGRES_DB>
|
|
<POSTGRES_USER>${keycloak.connectionsJpa.user}</POSTGRES_USER>
|
|
<POSTGRES_PASSWORD>${keycloak.connectionsJpa.password}</POSTGRES_PASSWORD>
|
|
|
|
<!-- MSSQL -->
|
|
<ACCEPT_EULA>Y</ACCEPT_EULA>
|
|
<SA_PASSWORD>${keycloak.connectionsJpa.password}</SA_PASSWORD>
|
|
|
|
<!-- Oracle -->
|
|
<ORACLE_SID>${keycloak.connectionsJpa.database}</ORACLE_SID>
|
|
<ORACLE_PWD>sa</ORACLE_PWD>
|
|
</env>
|
|
<cmd>${docker.database.cmd}</cmd>
|
|
<wait>
|
|
<!-- Do not use waiting for port since that is unreliable, sometimes port is listening before DB is ready to serve -->
|
|
<log>${docker.database.wait-for-log-regex}</log>
|
|
<time>300000</time>
|
|
<exec>
|
|
<postStart>${docker.database.postStart}</postStart>
|
|
<breakOnError>true</breakOnError>
|
|
</exec>
|
|
</wait>
|
|
</run>
|
|
</image>
|
|
</images>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>stop-db-container</id>
|
|
<phase>test</phase>
|
|
<goals>
|
|
<goal>stop</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>auth-server-remote</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-keystore</id>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/containers/auth-server-remote</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${common.resources}/keystore</directory>
|
|
<includes>
|
|
<include>keycloak.jks</include>
|
|
<include>keycloak.truststore</include>
|
|
<include>client.jks</include>
|
|
<include>client-ca.jks</include>
|
|
<include>test-user-cert-intermediary-ca.jks</include>
|
|
<include>ca.crt</include>
|
|
<include>client.crt</include>
|
|
<include>client.key</include>
|
|
<include>*.crl</include>
|
|
<include>other_client.jks</include>
|
|
<include>test-user-obb.jks</include>
|
|
</includes>
|
|
</resource>
|
|
<resource>
|
|
<directory>${common.resources}/pki/root/ca</directory>
|
|
<includes>
|
|
<include>certs/clients/test-user-san@localhost.cert.pem</include>
|
|
<include>certs/clients/test-user@localhost.key.pem</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
|
|
<profile>
|
|
<id>jpa</id>
|
|
<build>
|
|
<plugins>
|
|
<!-- DB will be released after the test -->
|
|
<plugin>
|
|
<groupId>org.keycloak</groupId>
|
|
<artifactId>db-allocator-plugin</artifactId>
|
|
<inherited>false</inherited>
|
|
<executions>
|
|
<execution>
|
|
<id>release-db</id>
|
|
<goals>
|
|
<goal>release</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<id>product</id>
|
|
<activation>
|
|
<property>
|
|
<name>product</name>
|
|
</property>
|
|
</activation>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>com.igormaznitsa</groupId>
|
|
<artifactId>mvn-golang-wrapper</artifactId>
|
|
<configuration>
|
|
<skip>true</skip>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
|
|
<profile>
|
|
<id>app-server-jetty94</id>
|
|
<activation>
|
|
<property>
|
|
<name>app.server</name>
|
|
<value>jetty94</value>
|
|
</property>
|
|
</activation>
|
|
<properties>
|
|
<app.server>jetty94</app.server> <!--in case the profile is called directly-->
|
|
<app.server.skip.unpack>true</app.server.skip.unpack>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>integration-arquillian-servers-app-server-jetty-94</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.commonjava.maven.plugins</groupId>
|
|
<artifactId>directory-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<id>app-server-wildfly</id>
|
|
<activation>
|
|
<property>
|
|
<name>app.server</name>
|
|
<value>wildfly</value>
|
|
</property>
|
|
</activation>
|
|
<properties>
|
|
<app.server>wildfly</app.server> <!--in case the profile is called directly-->
|
|
<app.server.skip.unpack>false</app.server.skip.unpack>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>integration-arquillian-servers-app-server-wildfly</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
<!--required by creaper-core-->
|
|
<dependency>
|
|
<groupId>org.wildfly.core</groupId>
|
|
<artifactId>wildfly-cli</artifactId>
|
|
<scope>test</scope>
|
|
<version>${wildfly.core.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.commonjava.maven.plugins</groupId>
|
|
<artifactId>directory-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<id>app-server-eap</id>
|
|
<activation>
|
|
<property>
|
|
<name>app.server</name>
|
|
<value>eap</value>
|
|
</property>
|
|
</activation>
|
|
<properties>
|
|
<app.server>eap</app.server> <!--in case the profile is called directly-->
|
|
<app.server.skip.unpack>false</app.server.skip.unpack>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>integration-arquillian-servers-app-server-eap</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
<!--required by creaper-core-->
|
|
<dependency>
|
|
<groupId>org.wildfly.core</groupId>
|
|
<artifactId>wildfly-cli</artifactId>
|
|
<scope>test</scope>
|
|
<version>${wildfly.core.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.commonjava.maven.plugins</groupId>
|
|
<artifactId>directory-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
|
|
<profile>
|
|
<id>app-server-eap71</id>
|
|
<activation>
|
|
<property>
|
|
<name>app.server</name>
|
|
<value>eap71</value>
|
|
</property>
|
|
</activation>
|
|
<properties>
|
|
<app.server>eap71</app.server> <!--in case the profile is called directly-->
|
|
<app.server.skip.unpack>false</app.server.skip.unpack>
|
|
<app.server.artifactId>integration-arquillian-servers-app-server-eap</app.server.artifactId><!-- Need to override -->
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>integration-arquillian-servers-app-server-eap</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
<!--required by creaper-core-->
|
|
<dependency>
|
|
<groupId>org.wildfly.core</groupId>
|
|
<artifactId>wildfly-cli</artifactId>
|
|
<scope>test</scope>
|
|
<version>3.0.10.Final</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.commonjava.maven.plugins</groupId>
|
|
<artifactId>directory-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
|
|
<profile>
|
|
<id>app-server-tomcat8</id>
|
|
<activation>
|
|
<property>
|
|
<name>app.server</name>
|
|
<value>tomcat8</value>
|
|
</property>
|
|
</activation>
|
|
<properties>
|
|
<app.server>tomcat8</app.server> <!--in case the profile is called directly-->
|
|
<app.server.skip.unpack>false</app.server.skip.unpack>
|
|
<app.server.artifactId>integration-arquillian-servers-app-server-tomcat8</app.server.artifactId><!-- Need to override -->
|
|
<app.server.port.offset>0</app.server.port.offset>
|
|
<app.server.http.port>8080</app.server.http.port>
|
|
<app.server.management.port>9990</app.server.management.port>
|
|
<app.server.keystore.dir>${app.server.home}/lib</app.server.keystore.dir>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>integration-arquillian-servers-app-server-tomcat8</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.commonjava.maven.plugins</groupId>
|
|
<artifactId>directory-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<id>app-server-tomcat9</id>
|
|
<activation>
|
|
<property>
|
|
<name>app.server</name>
|
|
<value>tomcat9</value>
|
|
</property>
|
|
</activation>
|
|
<properties>
|
|
<app.server>tomcat9</app.server> <!--in case the profile is called directly-->
|
|
<app.server.skip.unpack>false</app.server.skip.unpack>
|
|
<app.server.artifactId>integration-arquillian-servers-app-server-tomcat9</app.server.artifactId><!-- Need to override -->
|
|
<app.server.port.offset>0</app.server.port.offset>
|
|
<app.server.http.port>8080</app.server.http.port>
|
|
<app.server.management.port>9990</app.server.management.port>
|
|
<app.server.keystore.dir>${app.server.home}/lib</app.server.keystore.dir>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.keycloak.testsuite</groupId>
|
|
<artifactId>integration-arquillian-servers-app-server-tomcat9</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.commonjava.maven.plugins</groupId>
|
|
<artifactId>directory-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<id>auth-servers-crossdc-undertow</id>
|
|
<properties>
|
|
<skip.clean.second.cache>false</skip.clean.second.cache>
|
|
<exclude.crossdc>-</exclude.crossdc>
|
|
<surefire.memory.Xmx>1024m</surefire.memory.Xmx>
|
|
</properties>
|
|
</profile>
|
|
<profile>
|
|
<id>auth-servers-crossdc-jboss</id>
|
|
<properties>
|
|
<skip.clean.second.cache>false</skip.clean.second.cache>
|
|
<skip.copy.auth.crossdc.nodes>false</skip.copy.auth.crossdc.nodes>
|
|
<exclude.crossdc>-</exclude.crossdc>
|
|
<surefire.memory.Xmx>1024m</surefire.memory.Xmx>
|
|
</properties>
|
|
</profile>
|
|
|
|
<profile>
|
|
<id>generate-certs-for-custom-app-server-host</id>
|
|
<activation>
|
|
<property>
|
|
<name>app.server.host</name>
|
|
</property>
|
|
</activation>
|
|
<build>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>keytool-maven-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>remove-old-app-server-key</id>
|
|
<phase>generate-test-resources</phase>
|
|
<goals>
|
|
<goal>deleteAlias</goal>
|
|
</goals>
|
|
<configuration>
|
|
<keystore>${app.server.keystore}</keystore>
|
|
<storepass>${app.server.keystore.password}</storepass>
|
|
<alias>localhost3</alias>
|
|
<skip>${app.server.skip.unpack}</skip>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>generate-new-app-server-cert</id>
|
|
<phase>generate-test-resources</phase>
|
|
<goals>
|
|
<goal>generateKeyPair</goal>
|
|
</goals>
|
|
<configuration>
|
|
<keystore>${app.server.keystore}</keystore>
|
|
<storepass>${app.server.keystore.password}</storepass>
|
|
<alias>${app.server.host}</alias>
|
|
<dname>CN=${app.server.host}, OU=Keycloak, O=Red Hat, L=Westword, ST=MA, C=US</dname>
|
|
<keyalg>RSA</keyalg>
|
|
<keysize>2048</keysize>
|
|
<sigalg>SHA256withRSA</sigalg>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>export-app-server-cert</id>
|
|
<phase>generate-test-resources</phase>
|
|
<goals>
|
|
<goal>exportCertificate</goal>
|
|
</goals>
|
|
<configuration>
|
|
<keystore>${app.server.keystore}</keystore>
|
|
<storepass>${app.server.keystore.password}</storepass>
|
|
<alias>${app.server.host}</alias>
|
|
<file>${dependency.keystore.root}/${app.server.host}.pem</file>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>import-app-server-cert-to-truststore</id>
|
|
<phase>generate-test-resources</phase>
|
|
<goals>
|
|
<goal>importCertificate</goal>
|
|
</goals>
|
|
<configuration>
|
|
<keystore>${dependency.truststore}</keystore>
|
|
<storepass>${dependency.truststore.password}</storepass>
|
|
<alias>${app.server.host}</alias>
|
|
<file>${dependency.keystore.root}/${app.server.host}.pem</file>
|
|
<trustcacerts>true</trustcacerts>
|
|
<noprompt>true</noprompt>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-processed-truststore-to-app-server</id>
|
|
<phase>process-test-resources</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${app.server.keystore.dir}</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${dependency.keystore.root}</directory>
|
|
</resource>
|
|
</resources>
|
|
<overwrite>true</overwrite>
|
|
<skip>${app.server.skip.unpack}</skip>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>copy-processed-truststore-to-secured-deployment-app-server-config</id>
|
|
<phase>process-test-resources</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${app.server.home}/standalone-secured-deployments/configuration</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${dependency.keystore.root}</directory>
|
|
</resource>
|
|
</resources>
|
|
<overwrite>true</overwrite>
|
|
<skip>${app.server.skip.unpack}</skip>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>copy-processed-keystore-to-secured-deployment-app-server-config</id>
|
|
<phase>process-test-resources</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${app.server.home}/standalone-secured-deployments/configuration</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${app.server.keystore.dir}</directory>
|
|
<includes>
|
|
<include>adapter.jks</include>
|
|
</includes>
|
|
</resource>
|
|
</resources>
|
|
<overwrite>true</overwrite>
|
|
<skip>${app.server.skip.unpack}</skip>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<id>map-storage</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<configuration>
|
|
<systemPropertyVariables>
|
|
<keycloak.profile.feature.map_storage>enabled</keycloak.profile.feature.map_storage>
|
|
<keycloak.mapStorage.provider>concurrenthashmap</keycloak.mapStorage.provider>
|
|
<keycloak.dblock.provider>none</keycloak.dblock.provider>
|
|
<keycloak.realm.provider>map</keycloak.realm.provider>
|
|
<keycloak.client.provider>map</keycloak.client.provider>
|
|
<keycloak.clientScope.provider>map</keycloak.clientScope.provider>
|
|
<keycloak.group.provider>map</keycloak.group.provider>
|
|
<keycloak.role.provider>map</keycloak.role.provider>
|
|
<keycloak.user.provider>map</keycloak.user.provider>
|
|
<keycloak.deploymentState.provider>map</keycloak.deploymentState.provider>
|
|
<keycloak.authSession.provider>map</keycloak.authSession.provider>
|
|
<keycloak.userSession.provider>map</keycloak.userSession.provider>
|
|
<keycloak.loginFailure.provider>map</keycloak.loginFailure.provider>
|
|
<keycloak.authorization.provider>map</keycloak.authorization.provider>
|
|
<keycloak.eventsStore.provider>map</keycloak.eventsStore.provider>
|
|
<keycloak.actionToken.provider>map</keycloak.actionToken.provider>
|
|
<keycloak.singleUseObject.provider>map</keycloak.singleUseObject.provider>
|
|
<keycloak.publicKeyStorage.provider>map</keycloak.publicKeyStorage.provider>
|
|
<keycloak.authorizationCache.enabled>false</keycloak.authorizationCache.enabled>
|
|
<keycloak.realmCache.enabled>false</keycloak.realmCache.enabled>
|
|
<keycloak.userCache.enabled>false</keycloak.userCache.enabled>
|
|
<keycloak.publicKeyCache.enabled>false</keycloak.publicKeyCache.enabled>
|
|
<keycloak.userSessionPersister.provider></keycloak.userSessionPersister.provider>
|
|
</systemPropertyVariables>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
|
|
<profile>
|
|
<id>map-storage-jpa</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
<goals>
|
|
<goal>enforce</goal>
|
|
</goals>
|
|
<configuration>
|
|
<rules>
|
|
<requireActiveProfile>
|
|
<profiles>map-storage</profiles>
|
|
<message>map-storage profile not active</message>
|
|
</requireActiveProfile>
|
|
</rules>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<configuration>
|
|
<systemPropertyVariables>
|
|
<keycloak.map.storage.connectionsJpa.url>${keycloak.map.storage.connectionsJpa.url}</keycloak.map.storage.connectionsJpa.url>
|
|
<keycloak.map.storage.connectionsJpa.user>${keycloak.map.storage.connectionsJpa.user}</keycloak.map.storage.connectionsJpa.user>
|
|
<keycloak.map.storage.connectionsJpa.password>${keycloak.map.storage.connectionsJpa.password}</keycloak.map.storage.connectionsJpa.password>
|
|
|
|
<keycloak.authorization.map.storage.provider>jpa</keycloak.authorization.map.storage.provider>
|
|
<keycloak.authSession.map.storage.provider>jpa</keycloak.authSession.map.storage.provider>
|
|
<keycloak.client.map.storage.provider>jpa</keycloak.client.map.storage.provider>
|
|
<keycloak.clientScope.map.storage.provider>jpa</keycloak.clientScope.map.storage.provider>
|
|
<keycloak.adminEventsStore.map.storage.provider>jpa</keycloak.adminEventsStore.map.storage.provider>
|
|
<keycloak.authEventsStore.map.storage.provider>jpa</keycloak.authEventsStore.map.storage.provider>
|
|
<keycloak.group.map.storage.provider>jpa</keycloak.group.map.storage.provider>
|
|
<keycloak.loginFailure.map.storage.provider>jpa</keycloak.loginFailure.map.storage.provider>
|
|
<keycloak.realm.map.storage.provider>jpa</keycloak.realm.map.storage.provider>
|
|
<keycloak.role.map.storage.provider>jpa</keycloak.role.map.storage.provider>
|
|
<keycloak.singleUseObject.map.storage.provider>jpa</keycloak.singleUseObject.map.storage.provider>
|
|
</systemPropertyVariables>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
|
|
</project>
|