KEYCLOAK-2641 moved app-server configurations from adapter tests to servers/app-server module

This commit is contained in:
Tomas Kyjovsky 2016-03-24 11:24:21 +01:00
parent 8f1292494f
commit a9c7bbd44c
285 changed files with 5916 additions and 5684 deletions

View file

@ -1,20 +1,20 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
~ ~
~ Licensed under the Apache License, Version 2.0 (the "License"); ~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License. ~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at ~ You may obtain a copy of the License at
~ ~
~ http://www.apache.org/licenses/LICENSE-2.0 ~ http://www.apache.org/licenses/LICENSE-2.0
~ ~
~ Unless required by applicable law or agreed to in writing, software ~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS, ~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ 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" <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"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
@ -34,10 +34,52 @@
<name>Keycloak Arquillian Integration TestSuite</name> <name>Keycloak Arquillian Integration TestSuite</name>
<modules> <properties>
<module>servers</module>
<module>tests</module> <containers.home>${project.build.directory}/containers</containers.home>
</modules> <auth.server.java.home>${java.home}</auth.server.java.home>
<app.server.java.home>${java.home}</app.server.java.home>
<!--component versions-->
<arquillian-core.version>1.1.11.Final</arquillian-core.version>
<selenium.version>2.52.0</selenium.version>
<arquillian-drone.version>2.0.0.Beta1</arquillian-drone.version>
<arquillian-graphene.version>2.1.0.Alpha3</arquillian-graphene.version>
<arquillian-wildfly-container.version>8.2.0.Final</arquillian-wildfly-container.version>
<version.shrinkwrap.resolvers>2.2.2</version.shrinkwrap.resolvers>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.selenium</groupId>
<artifactId>selenium-bom</artifactId>
<version>${selenium.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>${arquillian-core.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-drone-bom</artifactId>
<version>${arquillian-drone.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
<version>${arquillian-wildfly-container.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build> <build>
<pluginManagement> <pluginManagement>
@ -52,13 +94,13 @@
<artifactId>xml-maven-plugin</artifactId> <artifactId>xml-maven-plugin</artifactId>
<version>1.0.1</version> <version>1.0.1</version>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
</build> </build>
<modules>
<module>servers</module>
<module>tests</module>
</modules>
</project> </project>

View file

@ -0,0 +1,38 @@
# Keycloak Arquillian Integration TestSuite
[Keycloak Arquillian Integration TestSuite](../README.md)
## Test Servers
A set of modules that build test-server artifacts preconfigured for various test scenarios.
The artifacts are used by the Arquillian TestSuite.
### Auth Server
- JBoss
- Wildfly 10
- EAP 7
- Undertow
[Details...](auth-server/README.md)
### App Server
- JBoss
- JBossAS 7
- Wildfly 8, 9, 10
- EAP 6, 7
- Relative (Wildfly 10 / EAP 7)
- Karaf / Fuse
- Karaf 3
- Fuse 6.1, 6.2
- Tomcat
- Tomcat 7, 8
[Details...](app-server/README.md)
### Load Balancer
- Wildfly + mod_cluster

View file

@ -0,0 +1,49 @@
# Keycloak Arquillian Integration TestSuite - Test Servers
[Up...](../README.md)
## App Server - JBoss
JBoss-based container with installed and configured Keycloak adapter.
Submodules are enabled with profiles: `-Papp-server-MODULE`
### Modules
* __`as7` JBossAS 7__
* __`wildfly8` Wildfly 8__
* __`wildfly9` Wildfly 9__
* __`wildfly` Wildfly 10__
* __`eap6` EAP 6__ Requires access to EAP product repo, or setting `-Deap6.version` to public EAP 6 Alpha.
* __`eap` EAP 7__ Requires access to EAP product repo.
* __`relative`__ Activate with `-Papp-server-relative`.
* __`wildfly` Relative Wildfly 10__ Based on [`auth-server/jboss/wildfly`](../auth-server/README.md). Activate with `-Pauth-server-wildfly`.
* __`eap` Relative EAP 7__ Based on [`auth-server/jboss/eap`](../auth-server/README.md). Activate with `-Pauth-server-eap`.
### Adapter Libs Location
* __Provided__ (in container) - Default.
* __Bundled__ (in war) `-Dadapter.libs.bundled=true`
### Adapter Configs Location
* __Provided__ (in standalone.xml as secure-deployment) _Not implemented_
* __Bundled__ (in war) - Default.
### SSL
Configures SSL in `standalone.xml`. See profile `ssl`.
## App Server - Karaf
Submodules are enabled with profiles: `-Papp-server-MODULE`
### Modules
* __`karaf3` Karaf 3__
* __`fuse61` JBoss Fuse 6.1__
* __`fuse62` JBoss Fuse 6.2__
## App Server - Tomcat
Submodules are enabled with profiles: `-Papp-server-MODULE`
### Modules
* __`tomcat7` Tomcat 7__
* __`tomcat8` Tomcat 8__

View file

@ -0,0 +1,73 @@
<?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-servers-app-server-jboss</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-as7</artifactId>
<packaging>pom</packaging>
<name>App Server - JBoss - JBossAS 7</name>
<properties>
<!-- NOTE: AS7 doesn't work with JDK 8. Use: -Dapp.server.java.home=PATH_TO_JDK_7_HOME -->
<!-- NOTE: SSL configuration doesn't work for AS 7.1.1. See: https://issues.jboss.org/browse/AS7-4698 -->
<app.server.jboss>as7</app.server.jboss>
<app.server.jboss.groupId>org.jboss.as</app.server.jboss.groupId>
<app.server.jboss.artifactId>jboss-as-dist</app.server.jboss.artifactId>
<app.server.jboss.version>${jboss.as.version}</app.server.jboss.version>
<app.server.jboss.unpacked.folder.name>jboss-as-${jboss.as.version}</app.server.jboss.unpacked.folder.name>
<app.server.oidc.adapter.artifactId>keycloak-as7-adapter-dist</app.server.oidc.adapter.artifactId>
<app.server.saml.adapter.artifactId>keycloak-saml-as7-adapter-dist</app.server.saml.adapter.artifactId>
<app.server.java.home>${java7.home}</app.server.java.home>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>java7.home</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,46 @@
<!--
~ 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.
-->
<assembly>
<id>${app.server.jboss}</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${app.server.jboss.home}</directory>
<outputDirectory>app-server-${app.server.jboss}</outputDirectory>
<excludes>
<exclude>**/*.sh</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${app.server.jboss.home}</directory>
<outputDirectory>app-server-${app.server.jboss}</outputDirectory>
<includes>
<include>**/*.sh</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
</assembly>

View file

@ -17,22 +17,16 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan" xmlns:xalan="http://xml.apache.org/xalan"
xmlns:j="urn:jboss:domain:4.0"
xmlns:ds="urn:jboss:domain:datasources:4.0"
xmlns:k="urn:jboss:domain:keycloak:1.1"
xmlns:sec="urn:jboss:domain:security:1.2"
version="2.0" version="2.0"
exclude-result-prefixes="xalan j ds k sec"> exclude-result-prefixes="xalan">
<xsl:param name="config"/>
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
<xsl:strip-space elements="*"/> <xsl:strip-space elements="*"/>
<xsl:variable name="nsDS" select="'urn:jboss:domain:logging:'"/> <xsl:variable name="nsLogging" select="'urn:jboss:domain:logging:'"/>
<xsl:template match="//*[local-name()='subsystem' and starts-with(namespace-uri(), $nsDS)] <xsl:template match="//*[local-name()='subsystem' and starts-with(namespace-uri(), $nsLogging)]
/*[local-name()='root-logger' and starts-with(namespace-uri(), $nsDS)]"> /*[local-name()='root-logger' and starts-with(namespace-uri(), $nsLogging)]">
<logger category="org.keycloak.adapters"> <logger category="org.keycloak.adapters">
<level name="DEBUG"/> <level name="DEBUG"/>
</logger> </logger>

View file

@ -0,0 +1,35 @@
set NOPAUSE=true
start "JBoss Server" /b cmd /c %JBOSS_HOME%\bin\standalone.bat
set ERROR=0
set TIMEOUT=10
set I=0
ping 127.0.0.1 -n 3 > nul
:wait_for_jboss
call %JBOSS_HOME%\bin\jboss-cli.bat -c --command=":read-attribute(name=server-state)" | findstr "running"
if %ERRORLEVEL% equ 0 goto install_adapters
ping 127.0.0.1 -n 1 > nul
set /a I=%I%+1
if %I% gtr %TIMEOUT% (
set ERROR=1
goto shutdown_jboss
)
goto wait_for_jboss
:install_adapters
call %JBOSS_HOME%\bin\jboss-cli.bat -c --file="%JBOSS_HOME%\bin\adapter-install.cli"
if %ERRORLEVEL% neq 0 set ERROR=%ERRORLEVEL%
if "%SAML_SUPPORTED%" == "true" (
call %JBOSS_HOME%\bin\jboss-cli.bat -c --file="%JBOSS_HOME%\bin\adapter-install-saml.cli"
if %ERRORLEVEL% neq 0 set ERROR=%ERRORLEVEL%
)
:shutdown_jboss
call %JBOSS_HOME%\bin\jboss-cli.bat -c --command=":shutdown"
exit /b %ERROR%

View file

@ -0,0 +1,44 @@
#!/bin/bash
echo "JBOSS_HOME=$JBOSS_HOME"
if [ ! -d "$JBOSS_HOME/bin" ] ; then
>&2 echo "JBOSS_HOME/bin doesn't exist"
exit 1
fi
cd $JBOSS_HOME/bin
./standalone.sh &
sleep 3
TIMEOUT=10
DELAY=1
T=0
RESULT=0
until [ $T -gt $TIMEOUT ]
do
if ./jboss-cli.sh -c --command=":read-attribute(name=server-state)" | grep -q "running" ; then
echo "Server is running. Installing adapter."
./jboss-cli.sh -c --file="adapter-install.cli"
if [ $? -ne 0 ]; then RESULT=1; fi
if [ "$SAML_SUPPORTED" = true ]; then
./jboss-cli.sh -c --file="adapter-install-saml.cli"
if [ $? -ne 0 ]; then RESULT=1; fi
fi
./jboss-cli.sh -c --command=":shutdown"
rm -rf $JBOSS_HOME/standalone/data
rm -rf $JBOSS_HOME/standalone/log
exit $RESULT
fi
echo "Server is not running."
sleep $DELAY
let T=$T+$DELAY
done
exit 1

View file

@ -16,20 +16,13 @@
--> -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan" xmlns:xalan="http://xml.apache.org/xalan"
xmlns:j="urn:jboss:domain:4.1"
xmlns:ds="urn:jboss:domain:datasources:4.0"
xmlns:k="urn:jboss:domain:keycloak:1.1"
xmlns:sec="urn:jboss:domain:security:1.2"
xmlns:u="urn:jboss:domain:undertow:3.1"
version="2.0" version="2.0"
exclude-result-prefixes="xalan j ds k sec"> exclude-result-prefixes="xalan">
<xsl:param name="config"/>
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
<xsl:strip-space elements="*"/> <xsl:strip-space elements="*"/>
<xsl:template match="//j:security-realms"> <xsl:template match="//*[local-name()='security-realms']">
<xsl:copy> <xsl:copy>
<xsl:apply-templates select="node()[name(.)='security-realm']"/> <xsl:apply-templates select="node()[name(.)='security-realm']"/>
<security-realm name="UndertowRealm"> <security-realm name="UndertowRealm">
@ -41,20 +34,20 @@
</security-realm> </security-realm>
</xsl:copy> </xsl:copy>
</xsl:template> </xsl:template>
<xsl:template match="//u:http-listener"> <xsl:template match="//*[local-name()='http-listener']">
<http-listener name="default" socket-binding="http" redirect-socket="proxy-https" proxy-address-forwarding="true"/> <http-listener name="default" socket-binding="http" redirect-socket="proxy-https" proxy-address-forwarding="true"/>
</xsl:template> </xsl:template>
<xsl:template match="//u:host"> <xsl:template match="//*[local-name()='host']">
<https-listener name="https" socket-binding="proxy-https" security-realm="UndertowRealm"/> <https-listener name="https" socket-binding="proxy-https" security-realm="UndertowRealm"/>
<xsl:copy-of select="."/> <xsl:copy-of select="."/>
</xsl:template> </xsl:template>
<xsl:template match="//j:socket-binding[@name='http']"> <xsl:template match="//*[local-name()='socket-binding' and @name='http']">
<xsl:copy-of select="."/> <xsl:copy-of select="."/>
<socket-binding name="proxy-https" port="8443"/> <socket-binding name="proxy-https" port="8443"/>
</xsl:template> </xsl:template>
<xsl:template match="//j:extensions"> <xsl:template match="//*[local-name()='extensions']">
<xsl:copy-of select="."/> <xsl:copy-of select="."/>
<system-properties> <system-properties>
<property name="javax.net.ssl.trustStore" value="${{jboss.server.config.dir}}/keycloak.truststore"/> <property name="javax.net.ssl.trustStore" value="${{jboss.server.config.dir}}/keycloak.truststore"/>

View file

@ -0,0 +1,44 @@
<?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-servers-app-server-jboss</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-eap</artifactId>
<packaging>pom</packaging>
<name>App Server - JBoss - EAP</name>
<properties>
<app.server.jboss>eap</app.server.jboss>
<app.server.jboss.groupId>org.jboss.eap</app.server.jboss.groupId>
<app.server.jboss.artifactId>wildfly-dist</app.server.jboss.artifactId>
<app.server.jboss.version>${eap.version}</app.server.jboss.version>
<app.server.jboss.unpacked.folder.name>jboss-eap-7.0</app.server.jboss.unpacked.folder.name>
<app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
<app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
</properties>
</project>

View file

@ -0,0 +1,68 @@
<?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-servers-app-server-jboss</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-eap6</artifactId>
<packaging>pom</packaging>
<name>App Server - JBoss - EAP 6</name>
<properties>
<app.server.jboss>eap6</app.server.jboss>
<app.server.jboss.groupId>org.jboss.as</app.server.jboss.groupId>
<app.server.jboss.artifactId>jboss-as-dist</app.server.jboss.artifactId>
<app.server.jboss.version>${eap6.version}</app.server.jboss.version>
<app.server.jboss.unpacked.folder.name>jboss-eap-6.4</app.server.jboss.unpacked.folder.name>
<app.server.oidc.adapter.artifactId>keycloak-eap6-adapter-dist</app.server.oidc.adapter.artifactId>
<app.server.saml.adapter.artifactId>keycloak-saml-eap6-adapter-dist</app.server.saml.adapter.artifactId>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-auth-server-jboss-profile</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>eap6.version</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,370 @@
<?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-servers-app-server</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-jboss</artifactId>
<packaging>pom</packaging>
<name>App Server - JBoss</name>
<properties>
<common.resources>${project.parent.basedir}/common</common.resources>
<assembly.xml>${project.parent.basedir}/assembly.xml</assembly.xml>
<app.server.jboss.home>${containers.home}/${app.server.jboss.unpacked.folder.name}</app.server.jboss.home>
</properties>
<profiles>
<profile>
<id>app-server-jboss-submodules</id>
<activation>
<file>
<exists>src</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>app.server.jboss</property>
<property>app.server.jboss.groupId</property>
<property>app.server.jboss.artifactId</property>
<property>app.server.jboss.version</property>
<property>app.server.jboss.unpacked.folder.name</property>
<property>app.server.oidc.adapter.artifactId</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-wildfly-and-oidc-adapter</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${app.server.jboss.groupId}</groupId>
<artifactId>${app.server.jboss.artifactId}</artifactId>
<version>${app.server.jboss.version}</version>
<type>zip</type>
<outputDirectory>${containers.home}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>${app.server.oidc.adapter.artifactId}</artifactId>
<version>${project.version}</version>
<type>zip</type>
<outputDirectory>${app.server.jboss.home}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-adapter-debug-log</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${app.server.jboss.home}/standalone/configuration</dir>
<includes>
<include>standalone.xml</include>
</includes>
<stylesheet>${common.resources}/add-adapter-log-level.xsl</stylesheet>
<outputDir>${app.server.jboss.home}/standalone/configuration</outputDir>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>create-zip</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${assembly.xml}</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>app-server-saml-supported</id>
<activation>
<file>
<exists>src/saml-adapter-supported</exists>
</file>
</activation>
<properties>
<app.server.saml.adapter.supported>true</app.server.saml.adapter.supported>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>app.server.saml.adapter.artifactId</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-saml-adapter</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>${app.server.saml.adapter.artifactId}</artifactId>
<version>${project.version}</version>
<type>zip</type>
<outputDirectory>${app.server.jboss.home}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>adapter-libs-provided</id>
<activation>
<property>
<name>!adapter.libs.bundled</name>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>install-adapters</id>
<phase>process-test-resources</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>${common.resources}/install-adapters.${script.suffix}</executable>
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
<environmentVariables>
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
<JBOSS_HOME>${app.server.jboss.home}</JBOSS_HOME>
<SAML_SUPPORTED>${app.server.saml.adapter.supported}</SAML_SUPPORTED>
</environmentVariables>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>ssl</id>
<activation>
<property>
<name>app.server.ssl.required</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-adapter-subsystem-security</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${app.server.jboss.home}/standalone/configuration</dir>
<includes>
<include>standalone.xml</include>
</includes>
<stylesheet>${common.resources}/security.xsl</stylesheet>
<outputDir>${app.server.jboss.home}/standalone/configuration</outputDir>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-keystore</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${app.server.jboss.home}/standalone/configuration</outputDirectory>
<resources>
<resource>
<directory>${common.resources}/keystore</directory>
<includes>
<include>adapter.jks</include>
<include>keycloak.truststore</include>
</includes>
</resource>
</resources>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>jks</nonFilteredFileExtension>
<nonFilteredFileExtension>truststore</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>app-server-as7</id>
<modules>
<module>as7</module>
</modules>
</profile>
<profile>
<id>app-server-eap</id>
<modules>
<module>eap</module>
</modules>
</profile>
<profile>
<id>app-server-eap6</id>
<modules>
<module>eap6</module>
</modules>
</profile>
<profile>
<id>app-server-wildfly</id>
<modules>
<module>wildfly</module>
</modules>
</profile>
<profile>
<id>app-server-wildfly8</id>
<modules>
<module>wildfly8</module>
</modules>
</profile>
<profile>
<id>app-server-wildfly9</id>
<modules>
<module>wildfly9</module>
</modules>
</profile>
<profile>
<id>app-server-relative</id>
<modules>
<module>relative</module>
</modules>
</profile>
</profiles>
</project>

View file

@ -0,0 +1,37 @@
<?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-servers-app-server-jboss-relative</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-relative-eap</artifactId>
<packaging>pom</packaging>
<name>App Server - JBoss - Relative EAP</name>
<properties>
<auth.server.jboss>eap</auth.server.jboss>
<app.server.jboss.artifactId>integration-arquillian-servers-auth-server-eap</app.server.jboss.artifactId>
</properties>
</project>

View file

@ -0,0 +1,61 @@
<?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-servers-app-server-jboss</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-jboss-relative</artifactId>
<packaging>pom</packaging>
<name>App Server - JBoss - Relative</name>
<properties>
<common.resources>${project.parent.parent.basedir}/common</common.resources>
<assembly.xml>${project.parent.parent.basedir}/assembly.xml</assembly.xml>
<app.server.jboss>relative-${auth.server.jboss}</app.server.jboss>
<app.server.jboss.groupId>org.keycloak.testsuite</app.server.jboss.groupId>
<app.server.jboss.version>${project.version}</app.server.jboss.version>
<app.server.jboss.unpacked.folder.name>auth-server-${auth.server.jboss}</app.server.jboss.unpacked.folder.name>
<app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
<app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
</properties>
<profiles>
<profile>
<id>auth-server-wildfly</id>
<modules>
<module>wildfly</module>
</modules>
</profile>
<profile>
<id>auth-server-eap</id>
<modules>
<module>eap</module>
</modules>
</profile>
</profiles>
</project>

View file

@ -0,0 +1,37 @@
<?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-servers-app-server-jboss-relative</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-relative-wildfly</artifactId>
<packaging>pom</packaging>
<name>App Server - JBoss - Relative Wildfly</name>
<properties>
<auth.server.jboss>wildfly</auth.server.jboss>
<app.server.jboss.artifactId>integration-arquillian-servers-auth-server-wildfly</app.server.jboss.artifactId>
</properties>
</project>

View file

@ -0,0 +1,44 @@
<?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-servers-app-server-jboss</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-wildfly</artifactId>
<packaging>pom</packaging>
<name>App Server - JBoss - Wildfly</name>
<properties>
<app.server.jboss>wildfly</app.server.jboss>
<app.server.jboss.groupId>org.wildfly</app.server.jboss.groupId>
<app.server.jboss.artifactId>wildfly-dist</app.server.jboss.artifactId>
<app.server.jboss.version>${wildfly.version}</app.server.jboss.version>
<app.server.jboss.unpacked.folder.name>wildfly-${wildfly.version}</app.server.jboss.unpacked.folder.name>
<app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
<app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
</properties>
</project>

View file

@ -0,0 +1,44 @@
<?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-servers-app-server-jboss</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-wildfly8</artifactId>
<packaging>pom</packaging>
<name>App Server - JBoss - Wildfly 8</name>
<properties>
<app.server.jboss>wildfly8</app.server.jboss>
<app.server.jboss.groupId>org.wildfly</app.server.jboss.groupId>
<app.server.jboss.artifactId>wildfly-dist</app.server.jboss.artifactId>
<app.server.jboss.version>${wildfly8.version}</app.server.jboss.version>
<app.server.jboss.unpacked.folder.name>wildfly-${wildfly8.version}</app.server.jboss.unpacked.folder.name>
<app.server.oidc.adapter.artifactId>keycloak-wf8-adapter-dist</app.server.oidc.adapter.artifactId>
<app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
</properties>
</project>

View file

@ -0,0 +1,44 @@
<?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-servers-app-server-jboss</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-wildfly9</artifactId>
<packaging>pom</packaging>
<name>App Server - JBoss - Wildfly 9</name>
<properties>
<app.server.jboss>wildfly9</app.server.jboss>
<app.server.jboss.groupId>org.wildfly</app.server.jboss.groupId>
<app.server.jboss.artifactId>wildfly-dist</app.server.jboss.artifactId>
<app.server.jboss.version>${wildfly9.version}</app.server.jboss.version>
<app.server.jboss.unpacked.folder.name>wildfly-${wildfly9.version}</app.server.jboss.unpacked.folder.name>
<app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
<app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
</properties>
</project>

View file

@ -0,0 +1,46 @@
<!--
~ 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.
-->
<assembly>
<id>${app.server.karaf}</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${app.server.karaf.home}</directory>
<outputDirectory>app-server-${app.server.karaf}</outputDirectory>
<excludes>
<exclude>**/*.sh</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${app.server.karaf.home}</directory>
<outputDirectory>app-server-${app.server.karaf}</outputDirectory>
<includes>
<include>**/*.sh</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
</assembly>

View file

@ -0,0 +1,38 @@
set NOPAUSE=true
echo "JAVA_HOME=%JAVA_HOME%"
start "Karaf" /b cmd /c start.bat
echo "Karaf container starting"
ping 127.0.0.1 -n 5 > nul
set ERROR=0
set TIMEOUT=10
set I=0
:wait_for_karaf
call client.bat %CLIENT_AUTH% info
if %ERRORLEVEL% equ 0 goto install_features
echo "Server is not reachable. Waiting."
ping 127.0.0.1 -n 2 > nul
set /a I=%I%+1
if %I% gtr %TIMEOUT% (
set ERROR=1
goto shutdown_karaf
)
goto wait_for_karaf
:install_features
echo "Server is reachable. Installing features."
if "%UNINSTALL_PAX%" == "true" (
call client.bat %CLIENT_AUTH% -f uninstall-pax.cli
if %ERRORLEVEL% neq 0 set ERROR=%ERRORLEVEL%
)
call client.bat %CLIENT_AUTH% -f install-features.cli
if %ERRORLEVEL% neq 0 set ERROR=%ERRORLEVEL%
:shutdown_karaf
call stop.bat
ping 127.0.0.1 -n 5 > nul
exit /b %ERROR%

View file

@ -0,0 +1,44 @@
#!/bin/bash
echo "JAVA_HOME=$JAVA_HOME"
./start
echo "Karaf container starting"
sleep 5
TIMEOUT=10
DELAY=1
T=0
RESULT=0
until [ $T -gt $TIMEOUT ]
do
if ./client $CLIENT_AUTH info; then
echo "Server is reachable."
if "$UNINSTALL_PAX" == "true"; then
echo "Uninstalling PAX"
./client $CLIENT_AUTH -f uninstall-pax.cli
if [ $? -ne 0 ]; then RESULT=1; fi
fi
echo "Installing features."
./client $CLIENT_AUTH -f install-features.cli
if [ $? -ne 0 ]; then RESULT=1; fi
./stop
rm -rf ../data/log
rm -rf ../data/tmp
sleep 5
exit $RESULT
else
echo "Server is not reachable. Waiting."
sleep $DELAY
let T=$T+$DELAY
fi
done
./stop
exit 1

View file

@ -0,0 +1,64 @@
<?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-servers-app-server-karaf</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-fuse61</artifactId>
<packaging>pom</packaging>
<name>App Server - Karaf - JBoss Fuse 6.1</name>
<properties>
<app.server.karaf>fuse61</app.server.karaf>
<app.server.karaf.groupId>org.jboss.fuse</app.server.karaf.groupId>
<app.server.karaf.artifactId>jboss-fuse-full</app.server.karaf.artifactId>
<app.server.karaf.version>${fuse61.version}</app.server.karaf.version>
<app.server.karaf.unpacked.folder.name>jboss-fuse-${fuse61.version}</app.server.karaf.unpacked.folder.name>
<app.server.karaf.client.auth>-u admin -p admin</app.server.karaf.client.auth>
<app.server.karaf.uninstall.pax>true</app.server.karaf.uninstall.pax>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>fuse61.version</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,6 @@
features:addurl mvn:org.ops4j.pax.web/pax-web-features/3.1.2/xml/features
features:addurl mvn:org.keycloak/keycloak-osgi-features/${project.version}/xml/features
features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/${project.version}/xml/features
features:install keycloak-pax-web-upgrade
features:install pax-http-whiteboard/3.1.2
features:install pax-war/3.1.2

View file

@ -0,0 +1,5 @@
features:uninstall pax-war
features:uninstall pax-http-whiteboard
features:uninstall pax-http
features:uninstall pax-jetty
features:removeurl mvn:org.ops4j.pax.web/pax-web-features/3.0.6/xml/features

View file

@ -0,0 +1,63 @@
<?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-servers-app-server-karaf</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-fuse62</artifactId>
<packaging>pom</packaging>
<name>App Server - Karaf - JBoss Fuse 6.2</name>
<properties>
<app.server.karaf>fuse62</app.server.karaf>
<app.server.karaf.groupId>org.jboss.fuse</app.server.karaf.groupId>
<app.server.karaf.artifactId>jboss-fuse-full</app.server.karaf.artifactId>
<app.server.karaf.version>${fuse62.version}</app.server.karaf.version>
<app.server.karaf.unpacked.folder.name>jboss-fuse-${fuse62.version}</app.server.karaf.unpacked.folder.name>
<app.server.karaf.client.auth>-u admin -p admin</app.server.karaf.client.auth>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>fuse62.version</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,3 @@
features:addurl mvn:org.keycloak/keycloak-osgi-features/${project.version}/xml/features
features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/${project.version}/xml/features
features:install keycloak-fuse-example

View file

@ -0,0 +1 @@
admin=admin,admin,manager,viewer,Monitor, Operator, Maintainer, Deployer, Auditor, Administrator, SuperUser

View file

@ -0,0 +1,40 @@
<?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-servers-app-server-karaf</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-karaf3</artifactId>
<packaging>pom</packaging>
<name>App Server - Karaf - Karaf 3</name>
<properties>
<app.server.karaf>karaf3</app.server.karaf>
<app.server.karaf.groupId>org.apache.karaf</app.server.karaf.groupId>
<app.server.karaf.artifactId>apache-karaf-minimal</app.server.karaf.artifactId>
<app.server.karaf.version>${karaf3.version}</app.server.karaf.version>
<app.server.karaf.unpacked.folder.name>apache-karaf-minimal-${karaf3.version}</app.server.karaf.unpacked.folder.name>
</properties>
</project>

View file

@ -0,0 +1,5 @@
feature:repo-add mvn:org.apache.camel.karaf/apache-camel/2.15.1/xml/features
feature:repo-add mvn:org.apache.cxf.karaf/apache-cxf/3.0.4/xml/features
feature:repo-add mvn:org.keycloak/keycloak-osgi-features/${project.version}/xml/features
feature:repo-add mvn:org.keycloak.example.demo/keycloak-fuse-example-features/${project.version}/xml/features
feature:install keycloak-fuse-example

View file

@ -0,0 +1,2 @@
karaf = karaf,_g_:admingroup
_g_\:admingroup = group,admin,manager,viewer,webconsole

View file

@ -0,0 +1,210 @@
<?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-servers-app-server</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-karaf</artifactId>
<packaging>pom</packaging>
<name>App Server - Karaf</name>
<properties>
<common.resources>${project.parent.basedir}/common</common.resources>
<assembly.xml>${project.parent.basedir}/assembly.xml</assembly.xml>
<app.server.karaf.home>${containers.home}/${app.server.karaf.unpacked.folder.name}</app.server.karaf.home>
<app.server.karaf.client.auth>-u karaf</app.server.karaf.client.auth>
<app.server.karaf.uninstall.pax>false</app.server.karaf.uninstall.pax>
</properties>
<profiles>
<profile>
<id>app-server-karaf-submodules</id>
<activation>
<file>
<exists>src</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>app.server.karaf</property>
<property>app.server.karaf.groupId</property>
<property>app.server.karaf.artifactId</property>
<property>app.server.karaf.version</property>
<property>app.server.karaf.unpacked.folder.name</property>
</requireProperty>
<requireOS>
<family>!windows</family>
<message>Automated Kara/Fuse adapter configuration currently doesn't work on Windows.</message>
</requireOS>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-karaf</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${app.server.karaf.groupId}</groupId>
<artifactId>${app.server.karaf.artifactId}</artifactId>
<version>${app.server.karaf.version}</version>
<type>zip</type>
<outputDirectory>${containers.home}</outputDirectory>
</artifactItem>
</artifactItems>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-features-clie</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${app.server.karaf.home}/bin</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>install-features.cli</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-users-properties</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${app.server.karaf.home}/etc</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>users.properties</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>install-features</id>
<phase>process-test-resources</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>${common.resources}/install-features.${script.suffix}</executable>
<workingDirectory>${app.server.karaf.home}/bin</workingDirectory>
<environmentVariables>
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
<CLIENT_AUTH>${app.server.karaf.client.auth}</CLIENT_AUTH>
<UNINSTALL_PAX>${app.server.karaf.uninstall.pax}</UNINSTALL_PAX>
</environmentVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>create-zip</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${assembly.xml}</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>app-server-karaf3</id>
<modules>
<module>karaf3</module>
</modules>
</profile>
<profile>
<id>app-server-fuse61</id>
<modules>
<module>fuse61</module>
</modules>
</profile>
<profile>
<id>app-server-fuse62</id>
<modules>
<module>fuse62</module>
</modules>
</profile>
</profiles>
</project>

View file

@ -0,0 +1,42 @@
<?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-servers</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server</artifactId>
<packaging>pom</packaging>
<name>App Server</name>
<properties>
<app.server.saml.adapter.supported>false</app.server.saml.adapter.supported>
</properties>
<modules>
<module>jboss</module>
<module>karaf</module>
<module>tomcat</module>
</modules>
</project>

View file

@ -17,7 +17,7 @@
<assembly> <assembly>
<id>auth-server-eap7</id> <id>${app.server.tomcat}</id>
<formats> <formats>
<format>zip</format> <format>zip</format>
@ -27,15 +27,15 @@
<fileSets> <fileSets>
<fileSet> <fileSet>
<directory>${keycloak.server.home}</directory> <directory>${app.server.tomcat.home}</directory>
<outputDirectory>keycloak-${version.server.dist}</outputDirectory> <outputDirectory>app-server-${app.server.tomcat}</outputDirectory>
<excludes> <excludes>
<exclude>**/*.sh</exclude> <exclude>**/*.sh</exclude>
</excludes> </excludes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>${keycloak.server.home}</directory> <directory>${app.server.tomcat.home}</directory>
<outputDirectory>keycloak-${version.server.dist}</outputDirectory> <outputDirectory>app-server-${app.server.tomcat}</outputDirectory>
<includes> <includes>
<include>**/*.sh</include> <include>**/*.sh</include>
</includes> </includes>

View file

@ -17,14 +17,13 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan" xmlns:xalan="http://xml.apache.org/xalan"
xmlns:tu="http://tomcat.apache.org/xml"
version="2.0" version="2.0"
exclude-result-prefixes="xalan tu"> exclude-result-prefixes="xalan">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no" /> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no" />
<xsl:strip-space elements="*"/> <xsl:strip-space elements="*"/>
<xsl:template match="//tu:tomcat-users"> <xsl:template match="//*[local-name()='tomcat-users']">
<xsl:copy> <xsl:copy>
<xsl:apply-templates select="node()|@*"/> <xsl:apply-templates select="node()|@*"/>
<user username="manager" password="arquillian" roles="manager-script"/> <user username="manager" password="arquillian" roles="manager-script"/>

View file

@ -0,0 +1,302 @@
<?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-servers-app-server</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-tomcat</artifactId>
<packaging>pom</packaging>
<name>App Server - Tomcat</name>
<properties>
<common.resources>${project.parent.basedir}/common</common.resources>
<assembly.xml>${project.parent.basedir}/assembly.xml</assembly.xml>
<app.server.tomcat.home>${containers.home}/${app.server.tomcat.unpacked.folder.name}</app.server.tomcat.home>
</properties>
<profiles>
<profile>
<id>app-server-tomcat-submodules</id>
<activation>
<file>
<exists>src</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>app.server.tomcat</property>
<property>app.server.tomcat.groupId</property>
<property>app.server.tomcat.artifactId</property>
<property>app.server.tomcat.version</property>
<property>app.server.tomcat.unpacked.folder.name</property>
<property>app.server.oidc.adapter.artifactId</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-tomcat-and-adapter</id>
<phase>generate-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${app.server.tomcat.groupId}</groupId>
<artifactId>${app.server.tomcat.artifactId}</artifactId>
<version>${app.server.tomcat.version}</version>
<type>zip</type>
<outputDirectory>${containers.home}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>${app.server.oidc.adapter.artifactId}</artifactId>
<version>${project.version}</version>
<type>zip</type>
<outputDirectory>${app.server.tomcat.home}/lib</outputDirectory>
</artifactItem>
</artifactItems>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
<execution>
<id>libs-for-tomcat</id>
<phase>generate-test-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
</artifactItem>
<artifactItem>
<groupId>org.jboss.spec.javax.ws.rs</groupId>
<artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
</artifactItem>
<artifactItem>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
</artifactItem>
<artifactItem>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
</artifactItem>
</artifactItems>
<outputDirectory>${app.server.tomcat.home}/lib</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>add-tomcat-manager-user</id>
<phase>process-test-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${app.server.tomcat.home}/conf</dir>
<stylesheet>${common.resources}/tomcat-users.xsl</stylesheet>
<includes>
<include>tomcat-users.xml</include>
</includes>
<outputDir>${app.server.tomcat.home}/conf</outputDir>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>parametrize-server-ports</id>
<phase>process-test-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<replace file="${app.server.tomcat.home}/conf/server.xml">
<replacetoken>8005</replacetoken>
<replacevalue>${tomcat.server.port}</replacevalue>
</replace>
<replace file="${app.server.tomcat.home}/conf/server.xml">
<replacetoken>8080</replacetoken>
<replacevalue>${tomcat.http.port}</replacevalue>
</replace>
<replace file="${app.server.tomcat.home}/conf/server.xml">
<replacetoken>8443</replacetoken>
<replacevalue>${tomcat.server.port}</replacevalue>
</replace>
<replace file="${app.server.tomcat.home}/conf/server.xml">
<replacetoken>8009</replacetoken>
<replacevalue>${tomcat.ajp.port}</replacevalue>
</replace>
<propertyfile
file="${app.server.tomcat.home}/conf/catalina.properties"
comment="Parametrized Tomcat Ports in server.xml">
<entry key="tomcat.server.port" value="8005"/>
<entry key="tomcat.http.port" value="8080"/>
<entry key="tomcat.https.port" value="8443"/>
<entry key="tomcat.ajp.port" value="8009"/>
</propertyfile>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>create-zip</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${assembly.xml}</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>app-server-saml-supported</id>
<activation>
<file>
<exists>src/saml-adapter-supported</exists>
</file>
</activation>
<properties>
<app.server.saml.adapter.supported>true</app.server.saml.adapter.supported>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>app.server.saml.adapter.artifactId</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-saml-adapter</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>${app.server.saml.adapter.artifactId}</artifactId>
<version>${project.version}</version>
<type>zip</type>
<outputDirectory>${app.server.tomcat.home}/lib</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>app-server-tomcat7</id>
<modules>
<module>tomcat7</module>
</modules>
</profile>
<profile>
<id>app-server-tomcat8</id>
<modules>
<module>tomcat8</module>
</modules>
</profile>
<profile>
<id>app-server-tomcat9</id>
<modules>
<module>tomcat9</module>
</modules>
</profile>
</profiles>
</project>

View file

@ -0,0 +1,44 @@
<?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-servers-app-server-tomcat</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-tomcat7</artifactId>
<packaging>pom</packaging>
<name>App Server - Tomcat - Tomcat 7</name>
<properties>
<app.server.tomcat>tomcat7</app.server.tomcat>
<app.server.tomcat.groupId>org.apache.tomcat</app.server.tomcat.groupId>
<app.server.tomcat.artifactId>tomcat</app.server.tomcat.artifactId>
<app.server.tomcat.version>${tomcat7.version}</app.server.tomcat.version>
<app.server.tomcat.unpacked.folder.name>apache-tomcat-${tomcat7.version}</app.server.tomcat.unpacked.folder.name>
<app.server.oidc.adapter.artifactId>keycloak-tomcat7-adapter-dist</app.server.oidc.adapter.artifactId>
<app.server.saml.adapter.artifactId>keycloak-saml-tomcat7-adapter-dist</app.server.saml.adapter.artifactId>
</properties>
</project>

View file

@ -0,0 +1,44 @@
<?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-servers-app-server-tomcat</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-tomcat8</artifactId>
<packaging>pom</packaging>
<name>App Server - Tomcat - Tomcat 8</name>
<properties>
<app.server.tomcat>tomcat8</app.server.tomcat>
<app.server.tomcat.groupId>org.apache.tomcat</app.server.tomcat.groupId>
<app.server.tomcat.artifactId>tomcat</app.server.tomcat.artifactId>
<app.server.tomcat.version>${tomcat8.version}</app.server.tomcat.version>
<app.server.tomcat.unpacked.folder.name>apache-tomcat-${tomcat8.version}</app.server.tomcat.unpacked.folder.name>
<app.server.oidc.adapter.artifactId>keycloak-tomcat8-adapter-dist</app.server.oidc.adapter.artifactId>
<app.server.saml.adapter.artifactId>keycloak-saml-tomcat8-adapter-dist</app.server.saml.adapter.artifactId>
</properties>
</project>

View file

@ -0,0 +1,44 @@
<?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-servers-app-server-tomcat</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-tomcat9</artifactId>
<packaging>pom</packaging>
<name>App Server - Tomcat - Tomcat 9</name>
<properties>
<app.server.tomcat>tomcat9</app.server.tomcat>
<app.server.tomcat.groupId>org.apache.tomcat</app.server.tomcat.groupId>
<app.server.tomcat.artifactId>tomcat</app.server.tomcat.artifactId>
<app.server.tomcat.version>${tomcat9.version}</app.server.tomcat.version>
<app.server.tomcat.unpacked.folder.name>apache-tomcat-${tomcat9.version}</app.server.tomcat.unpacked.folder.name>
<app.server.oidc.adapter.artifactId>keycloak-tomcat8-adapter-dist</app.server.oidc.adapter.artifactId>
<app.server.saml.adapter.artifactId>keycloak-saml-tomcat8-adapter-dist</app.server.saml.adapter.artifactId>
</properties>
</project>

View file

@ -0,0 +1,44 @@
# Keycloak Arquillian Integration TestSuite - Test Servers
[Up...](../README.md)
## Auth Server - JBoss `auth-server/jboss`
### Modules
* __`wildfly` Wildfly 10__
- Builds keycloak server on top of latest Wildfly.
- Activated by __`-Pauth-server-wildfly`__
* __`eap` EAP 7__
- Builds keycloak server on top of latest EAP.
- Activated by __`-Pauth-server-eap`__
- Requires access to product repo.
- Requires additional properties:
- `product.version`
- `product.unpacked.folder.name`
### Server dist vs overlay
By default `keycloak-server-dist` artifact is used for the build.
By setting `-Dserver-overlay=true` you can switch to server overlay instead. See profile `server-overlay`.
### JPA
Configures Keycloak JDBC datasource in `standalone.xml`. See profile `jpa`.
### SSL
Configures SSL in `standalone.xml`. See profile `ssl`.
### Cluster
Configures in `standalone-ha.xml`:
- h2 datasource over TCP
- parameters of Keycloak Infinispan caches
See profile `auth-server-cluster`.
## Auth Server - Undertow `auth-server/undertow`
Arquillian extension for running Keycloak server in embedded Undertow.

View file

@ -17,7 +17,7 @@
<assembly> <assembly>
<id>auth-server-wildfly</id> <id>${auth.server.jboss}</id>
<formats> <formats>
<format>zip</format> <format>zip</format>
@ -27,15 +27,15 @@
<fileSets> <fileSets>
<fileSet> <fileSet>
<directory>${keycloak.server.home}</directory> <directory>${auth.server.home}</directory>
<outputDirectory>keycloak-${project.version}</outputDirectory> <outputDirectory>auth-server-${auth.server.jboss}</outputDirectory>
<excludes> <excludes>
<exclude>**/*.sh</exclude> <exclude>**/*.sh</exclude>
</excludes> </excludes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>${keycloak.server.home}</directory> <directory>${auth.server.home}</directory>
<outputDirectory>keycloak-${project.version}</outputDirectory> <outputDirectory>auth-server-${auth.server.jboss}</outputDirectory>
<includes> <includes>
<include>**/*.sh</include> <include>**/*.sh</include>
</includes> </includes>

View file

@ -0,0 +1,74 @@
<?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-servers-auth-server-jboss</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<artifactId>integration-arquillian-servers-auth-server-eap</artifactId>
<name>Auth Server - JBoss - EAP</name>
<properties>
<auth.server.jboss>eap</auth.server.jboss>
<!--server-dist-->
<auth.server.dist.version>${product.version}</auth.server.dist.version>
<auth.server.dist.unpacked.folder.name>${product.unpacked.folder.name}</auth.server.dist.unpacked.folder.name>
<!--server-overlay-->
<auth.server.overlay.version>${product.version}</auth.server.overlay.version>
<overlaid.container.groupId>org.jboss.eap</overlaid.container.groupId>
<overlaid.container.version>${eap.version}</overlaid.container.version>
<overlaid.container.unpacked.folder.name>jboss-eap-7.0</overlaid.container.unpacked.folder.name>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-auth-server-jboss-profile</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>product.version</property>
</requireProperty>
<requireProperty>
<property>product.unpacked.folder.name</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,496 @@
<?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-servers-auth-server</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<artifactId>integration-arquillian-servers-auth-server-jboss</artifactId>
<name>Auth Server - JBoss</name>
<properties>
<common.resources>${project.parent.basedir}/common</common.resources>
<assembly.xml>${project.parent.basedir}/assembly.xml</assembly.xml>
<!--server-dist-->
<auth.server.dist.groupId>org.keycloak</auth.server.dist.groupId>
<auth.server.dist.artifactId>keycloak-server-dist</auth.server.dist.artifactId>
<auth.server.dist.version>${project.version}</auth.server.dist.version>
<auth.server.dist.unpacked.folder.name>keycloak-${auth.server.dist.version}</auth.server.dist.unpacked.folder.name>
<!--server-overlay-->
<auth.server.overlay.groupId>org.keycloak</auth.server.overlay.groupId>
<auth.server.overlay.artifactId>keycloak-server-overlay</auth.server.overlay.artifactId>
<auth.server.overlay.version>${project.version}</auth.server.overlay.version>
<overlaid.container.groupId>org.wildfly</overlaid.container.groupId>
<overlaid.container.artifactId>wildfly-dist</overlaid.container.artifactId>
<overlaid.container.version>${wildfly.version}</overlaid.container.version>
<overlaid.container.unpacked.folder.name>wildfly-${overlaid.container.version}</overlaid.container.unpacked.folder.name>
<!--actual unpacked artifact: server-dist by default, overriden in server-overlay profile-->
<unpacked.artifact.groupId>${auth.server.dist.groupId}</unpacked.artifact.groupId>
<unpacked.artifact.artifactId>${auth.server.dist.artifactId}</unpacked.artifact.artifactId>
<unpacked.artifact.version>${auth.server.dist.version}</unpacked.artifact.version>
<auth.server.home>${project.build.directory}/unpacked/${auth.server.dist.unpacked.folder.name}</auth.server.home>
</properties>
<profiles>
<profile>
<id>auth-server-jboss-submodules</id>
<activation>
<file>
<exists>src</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-server-or-overlay</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${unpacked.artifact.groupId}</groupId>
<artifactId>${unpacked.artifact.artifactId}</artifactId>
<version>${unpacked.artifact.version}</version>
<type>zip</type>
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>create-zip</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${assembly.xml}</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- OPT-IN -->
<profile>
<id>server-overlay</id>
<activation>
<property>
<name>server-overlay</name>
</property>
</activation>
<properties>
<!--override default unpacked artifact with server-overlay-->
<unpacked.artifact.groupId>${auth.server.overlay.groupId}</unpacked.artifact.groupId>
<unpacked.artifact.artifactId>${auth.server.overlay.artifactId}</unpacked.artifact.artifactId>
<unpacked.artifact.version>${auth.server.overlay.version}</unpacked.artifact.version>
<auth.server.home>${project.build.directory}/unpacked/${overlaid.container.unpacked.folder.name}</auth.server.home>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-overlaid-container</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${overlaid.container.groupId}</groupId>
<artifactId>${overlaid.container.artifactId}</artifactId>
<version>${overlaid.container.version}</version>
<type>zip</type>
<outputDirectory>${auth.server.home}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>move-standalone-keycloak-xml</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<move file="${auth.server.home}/standalone/configuration/standalone-keycloak.xml"
tofile="${auth.server.home}/standalone/configuration/standalone.xml"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>ssl</id>
<activation>
<property>
<name>auth.server.ssl.required</name>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-adapter-subsystem-security</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${auth.server.home}/standalone/configuration</dir>
<includes>
<include>standalone.xml</include>
</includes>
<stylesheet>${common.resources}/security.xsl</stylesheet>
<outputDir>${auth.server.home}/standalone/configuration</outputDir>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-keystore</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${auth.server.home}/standalone/configuration</outputDirectory>
<resources>
<resource>
<directory>${common.resources}/keystore</directory>
<includes>
<include>keycloak.jks</include>
<include>keycloak.truststore</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>jpa</id>
<properties>
<jdbc.mvn.driver.deployment.dir>${auth.server.home}/modules/system/layers/base/com/${jdbc.mvn.artifactId}/main</jdbc.mvn.driver.deployment.dir>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-properties</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>jdbc.mvn.groupId</property>
</requireProperty>
<requireProperty>
<property>jdbc.mvn.artifactId</property>
</requireProperty>
<requireProperty>
<property>jdbc.mvn.version</property>
</requireProperty>
<requireProperty>
<property>keycloak.connectionsJpa.url</property>
</requireProperty>
<requireProperty>
<property>keycloak.connectionsJpa.user</property>
</requireProperty>
<requireProperty>
<property>keycloak.connectionsJpa.password</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>jdbc-driver</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${jdbc.mvn.groupId}</groupId>
<artifactId>${jdbc.mvn.artifactId}</artifactId>
<version>${jdbc.mvn.version}</version>
<type>jar</type>
</artifactItem>
</artifactItems>
<outputDirectory>${jdbc.mvn.driver.deployment.dir}</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-wildfly-datasource</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<!-- create module.xml in modules -->
<transformationSet>
<dir>${auth.server.home}/modules/system/layers/base/com/h2database/h2/main</dir>
<stylesheet>src/main/resources/module.xsl</stylesheet>
<includes>
<include>module.xml</include>
</includes>
<outputDir>${jdbc.mvn.driver.deployment.dir}</outputDir>
<parameters>
<parameter>
<name>database</name>
<value>${jdbc.mvn.artifactId}</value>
</parameter>
<parameter>
<name>version</name>
<value>${jdbc.mvn.version}</value>
</parameter>
</parameters>
</transformationSet>
<!-- add datasource to standalone.xml -->
<transformationSet>
<dir>${auth.server.home}/standalone/configuration</dir>
<stylesheet>${common.resources}/datasource.xsl</stylesheet>
<includes>
<include>standalone.xml</include>
</includes>
<outputDir>${auth.server.home}/standalone/configuration</outputDir>
<parameters>
<parameter>
<name>jdbc.url</name>
<value>${keycloak.connectionsJpa.url}</value>
</parameter>
<parameter>
<name>driver</name>
<value>${jdbc.mvn.artifactId}</value>
</parameter>
<parameter>
<name>username</name>
<value>${keycloak.connectionsJpa.user}</value>
</parameter>
<parameter>
<name>password</name>
<value>${keycloak.connectionsJpa.password}</value>
</parameter>
</parameters>
</transformationSet>
<!-- add logger for org.hibernate.dialect.Dialect -->
<transformationSet>
<dir>${auth.server.home}/standalone/configuration</dir>
<stylesheet>${common.resources}/add-dialect-logger.xsl</stylesheet>
<includes>
<include>standalone.xml</include>
</includes>
<outputDir>${auth.server.home}/standalone/configuration</outputDir>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>auth-server-cluster</id>
<properties>
<session.cache.owners>1</session.cache.owners>
<offline.session.cache.owners>1</offline.session.cache.owners>
<login.failure.cache.owners>1</login.failure.cache.owners>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-wildfly-datasource</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<!-- point KeycloakDS datasource to H2 running on TCP port -->
<transformationSet>
<dir>${auth.server.home}/standalone/configuration</dir>
<includes>
<include>standalone-ha.xml</include>
</includes>
<stylesheet>${common.resources}/datasource-jdbc-url.xsl</stylesheet>
<outputDir>${auth.server.home}/standalone/configuration</outputDir>
<parameters>
<parameter>
<name>pool.name</name>
<value>KeycloakDS</value>
</parameter>
<parameter>
<name>jdbc.url</name>
<value>jdbc:h2:tcp://${jboss.bind.address:localhost}:9092/mem:keycloak;DB_CLOSE_DELAY=-1</value>
</parameter>
</parameters>
</transformationSet>
<transformationSet>
<dir>${auth.server.home}/standalone/configuration</dir>
<includes>
<include>standalone-ha.xml</include>
</includes>
<stylesheet>${common.resources}/ispn-cache-owners.xsl</stylesheet>
<outputDir>${auth.server.home}/standalone/configuration</outputDir>
<parameters>
<parameter>
<name>sessionCacheOwners</name>
<value>${session.cache.owners}</value>
</parameter>
<parameter>
<name>offlineSessionCacheOwners</name>
<value>${offline.session.cache.owners}</value>
</parameter>
<parameter>
<name>loginFailureCacheOwners</name>
<value>${login.failure.cache.owners}</value>
</parameter>
</parameters>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>auth-server-wildfly</id>
<modules>
<module>wildfly</module>
</modules>
</profile>
<profile>
<id>auth-server-eap</id>
<modules>
<module>eap</module>
</modules>
</profile>
</profiles>
</project>

View file

@ -0,0 +1,38 @@
<?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-servers-auth-server-jboss</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<artifactId>integration-arquillian-servers-auth-server-wildfly</artifactId>
<name>Auth Server - JBoss - Wildfly</name>
<properties>
<auth.server.jboss>wildfly</auth.server.jboss>
</properties>
</project>

View file

@ -0,0 +1,37 @@
<?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-servers</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-auth-server</artifactId>
<packaging>pom</packaging>
<name>Auth Server</name>
<modules>
<module>jboss</module>
<module>undertow</module>
</modules>
</project>

View file

@ -0,0 +1,71 @@
<?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-servers-auth-server</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-auth-server-undertow</artifactId>
<name>Auth Server - Undertow</name>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>undertow-embedded</artifactId>
<version>1.0.0.Alpha1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-undertow</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-dependencies-server-all</artifactId>
<type>pom</type>
</dependency>
</dependencies>
</project>

View file

@ -43,12 +43,12 @@ import javax.servlet.DispatcherType;
import java.util.Collection; import java.util.Collection;
import java.util.Map; import java.util.Map;
public class CustomUndertowContainer implements DeployableContainer<CustomUndertowContainerConfiguration> { public class KeycloakOnUndertow implements DeployableContainer<KeycloakOnUndertowConfiguration> {
protected final Logger log = Logger.getLogger(this.getClass()); protected final Logger log = Logger.getLogger(this.getClass());
private UndertowJaxrsServer undertow; private UndertowJaxrsServer undertow;
private CustomUndertowContainerConfiguration configuration; private KeycloakOnUndertowConfiguration configuration;
private DeploymentInfo createAuthServerDeploymentInfo() { private DeploymentInfo createAuthServerDeploymentInfo() {
ResteasyDeployment deployment = new ResteasyDeployment(); ResteasyDeployment deployment = new ResteasyDeployment();
@ -101,8 +101,8 @@ public class CustomUndertowContainer implements DeployableContainer<CustomUndert
} }
@Override @Override
public Class<CustomUndertowContainerConfiguration> getConfigurationClass() { public Class<KeycloakOnUndertowConfiguration> getConfigurationClass() {
return CustomUndertowContainerConfiguration.class; return KeycloakOnUndertowConfiguration.class;
} }
@Override @Override
@ -112,7 +112,7 @@ public class CustomUndertowContainer implements DeployableContainer<CustomUndert
@Override @Override
public void setup( public void setup(
CustomUndertowContainerConfiguration undertowContainerConfiguration) { KeycloakOnUndertowConfiguration undertowContainerConfiguration) {
this.configuration = undertowContainerConfiguration; this.configuration = undertowContainerConfiguration;
} }

View file

@ -1,4 +1,4 @@
package org.keycloak.testsuite.arquillian.karaf; package org.keycloak.testsuite.arquillian.undertow;
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; import org.jboss.arquillian.container.spi.client.container.DeployableContainer;
import org.jboss.arquillian.core.spi.LoadableExtension; import org.jboss.arquillian.core.spi.LoadableExtension;
@ -7,11 +7,11 @@ import org.jboss.arquillian.core.spi.LoadableExtension;
* *
* @author tkyjovsk * @author tkyjovsk
*/ */
public class CustomKarafContainerExtension implements LoadableExtension { public class KeycloakOnUndertowArquillianExtension implements LoadableExtension {
@Override @Override
public void register(ExtensionBuilder builder) { public void register(ExtensionBuilder builder) {
builder.service(DeployableContainer.class, CustomKarafContainer.class); builder.service(DeployableContainer.class, KeycloakOnUndertow.class);
} }
} }

View file

@ -20,7 +20,7 @@ package org.keycloak.testsuite.arquillian.undertow;
import org.arquillian.undertow.UndertowContainerConfiguration; import org.arquillian.undertow.UndertowContainerConfiguration;
import org.jboss.arquillian.container.spi.ConfigurationException; import org.jboss.arquillian.container.spi.ConfigurationException;
public class CustomUndertowContainerConfiguration extends UndertowContainerConfiguration { public class KeycloakOnUndertowConfiguration extends UndertowContainerConfiguration {
private int workerThreads = Math.max(Runtime.getRuntime().availableProcessors(), 2) * 8; private int workerThreads = Math.max(Runtime.getRuntime().availableProcessors(), 2) * 8;
private String resourcesHome; private String resourcesHome;

View file

@ -0,0 +1 @@
org.keycloak.testsuite.arquillian.undertow.KeycloakOnUndertowArquillianExtension

View file

@ -1,393 +0,0 @@
<?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-servers</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-server-eap7</artifactId>
<packaging>pom</packaging>
<name>Server on EAP 7</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>auth-server-eap7</id>
<properties>
<keycloak.server.home>${project.build.directory}/unpacked/${unpacked.container.folder.name}</keycloak.server.home>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-properties</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>version.server.dist</property>
</requireProperty>
<requireProperty>
<property>unpacked.container.folder.name</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-server</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server-dist</artifactId>
<version>${version.server.dist}</version>
<type>zip</type>
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>create-zip</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>ssl</id>
<activation>
<property>
<name>auth.server.ssl.required</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-adapter-subsystem-security</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${keycloak.server.home}/standalone/configuration</dir>
<includes>
<include>standalone.xml</include>
</includes>
<stylesheet>src/main/xslt/security.xsl</stylesheet>
<outputDir>${keycloak.server.home}/standalone/configuration</outputDir>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>copy-keystore</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${keycloak.server.home}/standalone/configuration</outputDirectory>
<resources>
<resource>
<directory>src/main/keystore</directory>
<includes>
<include>keycloak.jks</include>
<include>keycloak.truststore</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jpa</id>
<properties>
<jdbc.mvn.driver.deployment.dir>${keycloak.server.home}/modules/system/layers/base/com/${jdbc.mvn.artifactId}/main</jdbc.mvn.driver.deployment.dir>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-properties</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>jdbc.mvn.groupId</property>
</requireProperty>
<requireProperty>
<property>jdbc.mvn.artifactId</property>
</requireProperty>
<requireProperty>
<property>jdbc.mvn.version</property>
</requireProperty>
<requireProperty>
<property>keycloak.connectionsJpa.url</property>
</requireProperty>
<requireProperty>
<property>keycloak.connectionsJpa.user</property>
</requireProperty>
<requireProperty>
<property>keycloak.connectionsJpa.password</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>jdbc-driver</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${jdbc.mvn.groupId}</groupId>
<artifactId>${jdbc.mvn.artifactId}</artifactId>
<version>${jdbc.mvn.version}</version>
<type>jar</type>
</artifactItem>
</artifactItems>
<outputDirectory>${jdbc.mvn.driver.deployment.dir}</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-datasource</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${keycloak.server.home}/modules/system/layers/base/com/h2database/h2/main</dir>
<stylesheet>src/main/xslt/module.xsl</stylesheet>
<includes>
<include>module.xml</include>
</includes>
<outputDir>${jdbc.mvn.driver.deployment.dir}</outputDir>
<parameters>
<parameter>
<name>database</name>
<value>${jdbc.mvn.artifactId}</value>
</parameter>
<parameter>
<name>version</name>
<value>${jdbc.mvn.version}</value>
</parameter>
</parameters>
</transformationSet>
<transformationSet>
<dir>${keycloak.server.home}/standalone/configuration</dir>
<stylesheet>src/main/xslt/datasource.xsl</stylesheet>
<includes>
<include>standalone.xml</include>
</includes>
<outputDir>${keycloak.server.home}/standalone/configuration</outputDir>
<parameters>
<parameter>
<name>jdbc.url</name>
<value>${keycloak.connectionsJpa.url}</value>
</parameter>
<parameter>
<name>driver</name>
<value>${jdbc.mvn.artifactId}</value>
</parameter>
<parameter>
<name>username</name>
<value>${keycloak.connectionsJpa.user}</value>
</parameter>
<parameter>
<name>password</name>
<value>${keycloak.connectionsJpa.password}</value>
</parameter>
</parameters>
</transformationSet>
<transformationSet>
<dir>${keycloak.server.home}/standalone/configuration</dir>
<stylesheet>src/main/xslt/add-dialect-logger.xsl</stylesheet>
<includes>
<include>standalone.xml</include>
</includes>
<outputDir>${keycloak.server.home}/standalone/configuration</outputDir>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>auth-server-eap7-cluster</id>
<properties>
<session.cache.owners>1</session.cache.owners>
<offline.session.cache.owners>1</offline.session.cache.owners>
<login.failure.cache.owners>1</login.failure.cache.owners>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-wildfly-datasource</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<!-- point KeycloakDS datasource to H2 running on TCP port -->
<transformationSet>
<dir>${keycloak.server.home}/standalone/configuration</dir>
<includes>
<include>standalone-ha.xml</include>
</includes>
<stylesheet>src/main/xslt/datasource-jdbc-url.xsl</stylesheet>
<outputDir>${keycloak.server.home}/standalone/configuration</outputDir>
<parameters>
<parameter>
<name>pool.name</name>
<value>KeycloakDS</value>
</parameter>
<parameter>
<name>jdbc.url</name>
<value>jdbc:h2:tcp://${jboss.bind.address:localhost}:9092/mem:keycloak;DB_CLOSE_DELAY=-1</value>
</parameter>
</parameters>
</transformationSet>
<transformationSet>
<dir>${keycloak.server.home}/standalone/configuration</dir>
<includes>
<include>standalone-ha.xml</include>
</includes>
<stylesheet>src/main/xslt/ispn-cache-owners.xsl</stylesheet>
<outputDir>${keycloak.server.home}/standalone/configuration</outputDir>
<parameters>
<parameter>
<name>sessionCacheOwners</name>
<value>${session.cache.owners}</value>
</parameter>
<parameter>
<name>offlineSessionCacheOwners</name>
<value>${offline.session.cache.owners}</value>
</parameter>
<parameter>
<name>loginFailureCacheOwners</name>
<value>${login.failure.cache.owners}</value>
</parameter>
</parameters>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View file

@ -1,107 +0,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.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
version="2.0"
exclude-result-prefixes="xalan">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
<xsl:strip-space elements="*"/>
<xsl:variable name="nsDS" select="'urn:jboss:domain:datasources:'"/>
<!-- Remove keycloak datasource definition. -->
<xsl:template match="//*[local-name()='subsystem' and starts-with(namespace-uri(), $nsDS)]
/*[local-name()='datasources' and starts-with(namespace-uri(), $nsDS)]
/*[local-name()='datasource' and starts-with(namespace-uri(), $nsDS) and @pool-name='KeycloakDS']">
</xsl:template>
<xsl:param name="jdbc.url" select="'jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE'"/>
<xsl:param name="driver" select="'h2'"/>
<xsl:param name="username" select="'sa'"/>
<xsl:param name="password" select="'sa'"/>
<xsl:param name="min.poolsize" select="'10'"/>
<xsl:param name="max.poolsize" select="'50'"/>
<xsl:param name="pool.prefill" select="'true'"/>
<xsl:variable name="newDatasourceDefinition">
<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" use-java-context="true">
<connection-url>
<xsl:value-of select="$jdbc.url"/>
</connection-url>
<driver>
<xsl:value-of select="$driver"/>
</driver>
<security>
<user-name>
<xsl:value-of select="$username"/>
</user-name>
<password>
<xsl:value-of select="$password"/>
</password>
</security>
<pool>
<min-pool-size>
<xsl:value-of select="$min.poolsize"/>
</min-pool-size>
<max-pool-size>
<xsl:value-of select="$max.poolsize"/>
</max-pool-size>
<prefill>
<xsl:value-of select="$pool.prefill"/>
</prefill>
</pool>
</datasource>
</xsl:variable>
<xsl:variable name="newDriverDefinition">
<xsl:if test="$driver != 'h2'">
<driver name="{$driver}" module="com.{$driver}" />
</xsl:if>
</xsl:variable>
<!-- Add new datasource definition. -->
<xsl:template match="//*[local-name()='subsystem' and starts-with(namespace-uri(), $nsDS)]
/*[local-name()='datasources' and starts-with(namespace-uri(), $nsDS)]">
<xsl:copy>
<xsl:copy-of select="$newDatasourceDefinition"/>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<!-- Add new driver definition. -->
<xsl:template match="//*[local-name()='subsystem' and starts-with(namespace-uri(), $nsDS)]
/*[local-name()='datasources' and starts-with(namespace-uri(), $nsDS)]
/*[local-name()='drivers' and starts-with(namespace-uri(), $nsDS)]">
<xsl:copy>
<xsl:copy-of select="$newDriverDefinition"/>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<!-- Copy everything else. -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View file

@ -1,72 +0,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.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:j="urn:jboss:domain:4.0"
xmlns:ds="urn:jboss:domain:datasources:4.0"
xmlns:k="urn:jboss:domain:keycloak:1.1"
xmlns:sec="urn:jboss:domain:security:1.2"
xmlns:u="urn:jboss:domain:undertow:3.1"
version="2.0"
exclude-result-prefixes="xalan j ds k sec">
<xsl:param name="config"/>
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
<xsl:strip-space elements="*"/>
<xsl:template match="//j:security-realms">
<xsl:copy>
<xsl:apply-templates select="node()[name(.)='security-realm']"/>
<security-realm name="UndertowRealm">
<server-identities>
<ssl>
<keystore path="keycloak.jks" relative-to="jboss.server.config.dir" keystore-password="secret"/>
</ssl>
</server-identities>
</security-realm>
</xsl:copy>
</xsl:template>
<xsl:template match="//u:http-listener">
<http-listener name="default" socket-binding="http" redirect-socket="proxy-https" proxy-address-forwarding="true"/>
</xsl:template>
<xsl:template match="//u:host">
<https-listener name="https" socket-binding="proxy-https" security-realm="UndertowRealm"/>
<xsl:copy-of select="."/>
</xsl:template>
<xsl:template match="//j:socket-binding[@name='http']">
<xsl:copy-of select="."/>
<socket-binding name="proxy-https" port="8443"/>
</xsl:template>
<xsl:template match="//j:extensions">
<xsl:copy-of select="."/>
<system-properties>
<property name="javax.net.ssl.trustStore" value="${{jboss.server.config.dir}}/keycloak.truststore"/>
<property name="javax.net.ssl.trustStorePassword" value="secret"/>
</system-properties>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View file

@ -21,7 +21,7 @@
<parent> <parent>
<groupId>org.keycloak.testsuite</groupId> <groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-servers</artifactId> <artifactId>integration-arquillian-servers</artifactId>
<version>1.9.0.CR1-SNAPSHOT</version> <version>2.0.0.CR1-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View file

@ -17,7 +17,7 @@
<assembly> <assembly>
<id>auth-server-wildfly-kc14</id> <id>auth-server-jboss-kc14</id>
<formats> <formats>
<format>zip</format> <format>zip</format>

View file

@ -21,7 +21,7 @@
<parent> <parent>
<groupId>org.keycloak.testsuite</groupId> <groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-migration-servers</artifactId> <artifactId>integration-arquillian-migration-servers</artifactId>
<version>1.9.0.CR1-SNAPSHOT</version> <version>2.0.0.CR1-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View file

@ -17,7 +17,7 @@
<assembly> <assembly>
<id>auth-server-wildfly-kc14</id> <id>auth-server-jboss-kc14</id>
<formats> <formats>
<format>zip</format> <format>zip</format>

View file

@ -21,7 +21,7 @@
<parent> <parent>
<groupId>org.keycloak.testsuite</groupId> <groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-migration-servers</artifactId> <artifactId>integration-arquillian-migration-servers</artifactId>
<version>1.9.0.CR1-SNAPSHOT</version> <version>2.0.0.CR1-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View file

@ -17,7 +17,7 @@
<assembly> <assembly>
<id>auth-server-wildfly-kc14</id> <id>auth-server-jboss-kc14</id>
<formats> <formats>
<format>zip</format> <format>zip</format>

View file

@ -21,7 +21,7 @@
<parent> <parent>
<groupId>org.keycloak.testsuite</groupId> <groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-migration-servers</artifactId> <artifactId>integration-arquillian-migration-servers</artifactId>
<version>1.9.0.CR1-SNAPSHOT</version> <version>2.0.0.CR1-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View file

@ -17,7 +17,7 @@
<assembly> <assembly>
<id>auth-server-wildfly-kc15</id> <id>auth-server-jboss-kc15</id>
<formats> <formats>
<format>zip</format> <format>zip</format>

View file

@ -21,7 +21,7 @@
<parent> <parent>
<groupId>org.keycloak.testsuite</groupId> <groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-migration-servers</artifactId> <artifactId>integration-arquillian-migration-servers</artifactId>
<version>1.9.0.CR1-SNAPSHOT</version> <version>2.0.0.CR1-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View file

@ -17,7 +17,7 @@
<assembly> <assembly>
<id>auth-server-wildfly-kc16</id> <id>auth-server-jboss-kc16</id>
<formats> <formats>
<format>zip</format> <format>zip</format>

View file

@ -21,7 +21,7 @@
<parent> <parent>
<groupId>org.keycloak.testsuite</groupId> <groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-migration-servers</artifactId> <artifactId>integration-arquillian-migration-servers</artifactId>
<version>1.9.0.CR1-SNAPSHOT</version> <version>2.0.0.CR1-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View file

@ -1,20 +1,20 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- <!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags. ~ and other contributors as indicated by the @author tags.
~ ~
~ Licensed under the Apache License, Version 2.0 (the "License"); ~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License. ~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at ~ You may obtain a copy of the License at
~ ~
~ http://www.apache.org/licenses/LICENSE-2.0 ~ http://www.apache.org/licenses/LICENSE-2.0
~ ~
~ Unless required by applicable law or agreed to in writing, software ~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS, ~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ 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" <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"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
@ -29,38 +29,51 @@
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Servers</name> <name>Servers</name>
<!--<modules>--> <properties>
<!--<module>migration</module>--> <script.suffix>sh</script.suffix>
<!--</modules>-->
<!--app container versions-->
<wildfly9.version>9.0.2.Final</wildfly9.version>
<wildfly8.version>8.2.1.Final</wildfly8.version>
<eap.version>7.0.0.ER6-redhat-1</eap.version>
<eap6.version>7.5.6.Final-redhat-2</eap6.version>
<jboss.as.version>7.1.1.Final</jboss.as.version>
<eap6.version>7.5.6.Final-redhat-2</eap6.version>
<tomcat7.version>7.0.68</tomcat7.version>
<tomcat8.version>8.0.32</tomcat8.version>
<tomcat9.version>9.0.0.M3</tomcat9.version>
<karaf3.version>3.0.3</karaf3.version>
<fuse61.version>6.1.0.redhat-379</fuse61.version>
<!--<fuse62.version>6.2.0.redhat-133</fuse62.version>-->
<fuse62.version>6.2.1.redhat-084</fuse62.version>
</properties>
<modules>
<module>auth-server</module>
<module>app-server</module>
</modules>
<profiles> <profiles>
<profile> <profile>
<id>auth-server-wildfly</id> <id>auth-server-cluster</id>
<modules> <modules>
<module>wildfly</module>
</modules>
</profile>
<profile>
<id>auth-server-wildfly-cluster</id>
<modules>
<module>wildfly</module>
<module>wildfly-balancer</module> <module>wildfly-balancer</module>
</modules> </modules>
</profile> </profile>
<profile> <profile>
<id>auth-server-eap7</id> <id>win</id>
<modules> <activation>
<module>eap7</module> <os>
</modules> <family>Windows</family>
</profile> </os>
<profile> </activation>
<id>auth-server-eap7-cluster</id> <properties>
<modules> <script.suffix>bat</script.suffix>
<module>eap7</module> </properties>
<module>wildfly-balancer</module>
</modules>
</profile> </profile>
</profiles> </profiles>
</project> </project>

View file

@ -17,7 +17,7 @@
<assembly> <assembly>
<id>wildfly-balancer</id> <id>balancer-wildfly</id>
<formats> <formats>
<format>zip</format> <format>zip</format>
@ -28,14 +28,14 @@
<fileSets> <fileSets>
<fileSet> <fileSet>
<directory>${wildfly.balancer.home}</directory> <directory>${wildfly.balancer.home}</directory>
<outputDirectory>wildfly-balancer-${project.version}</outputDirectory> <outputDirectory>balancer-wildfly</outputDirectory>
<excludes> <excludes>
<exclude>**/*.sh</exclude> <exclude>**/*.sh</exclude>
</excludes> </excludes>
</fileSet> </fileSet>
<fileSet> <fileSet>
<directory>${wildfly.balancer.home}</directory> <directory>${wildfly.balancer.home}</directory>
<outputDirectory>wildfly-balancer-${project.version}</outputDirectory> <outputDirectory>balancer-wildfly</outputDirectory>
<includes> <includes>
<include>**/*.sh</include> <include>**/*.sh</include>
</includes> </includes>

View file

@ -36,7 +36,6 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId> <artifactId>maven-deploy-plugin</artifactId>
<configuration> <configuration>
<skip>true</skip> <skip>true</skip>
@ -44,7 +43,6 @@
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<executions> <executions>
<execution> <execution>

View file

@ -60,7 +60,7 @@
<xsl:template match="//s:socket-binding-group[@name='standard-sockets']"> <xsl:template match="//s:socket-binding-group[@name='standard-sockets']">
<xsl:copy> <xsl:copy>
<xsl:apply-templates select="node()|@*"/> <xsl:apply-templates select="node()|@*"/>
<socket-binding name="modcluster" port="23364" multicast-address="224.0.1.105"/> <socket-binding name="modcluster" port="${{modcluster.port:23364}}" multicast-address="${{modcluster.multicast-address:224.0.1.105}}"/>
</xsl:copy> </xsl:copy>
</xsl:template> </xsl:template>

View file

@ -1,488 +0,0 @@
<?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-servers</artifactId>
<version>2.0.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-server-wildfly</artifactId>
<packaging>pom</packaging>
<name>Server on Wildfly</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>create-zip</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>server-overlay</id>
<activation>
<property>
<name>server-overlay</name>
</property>
</activation>
<properties>
<keycloak.server.home>${project.build.directory}/unpacked/wildfly-${wildfly.version}</keycloak.server.home>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-wildfly-and-server-overlay</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-dist</artifactId>
<version>${wildfly.version}</version>
<type>zip</type>
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server-overlay</artifactId>
<version>${project.version}</version>
<type>zip</type>
<outputDirectory>${keycloak.server.home}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>move-standalone-keycloak-xml</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<move file="${keycloak.server.home}/standalone/configuration/standalone-keycloak.xml"
tofile="${keycloak.server.home}/standalone/configuration/standalone.xml"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>server-dist</id>
<activation>
<property>
<name>!server-overlay</name>
</property>
</activation>
<properties>
<keycloak.server.home>${project.build.directory}/unpacked/keycloak-${project.version}</keycloak.server.home>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-server</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server-dist</artifactId>
<version>${project.version}</version>
<type>zip</type>
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>adapter-libs-provided</id>
<activation>
<property>
<name>!adapter.libs.bundled</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-adapter</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-wildfly-adapter-dist</artifactId>
<version>${project.version}</version>
<type>zip</type>
<outputDirectory>${keycloak.server.home}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-saml-wildfly-adapter-dist</artifactId>
<version>${project.version}</version>
<type>zip</type>
<outputDirectory>${keycloak.server.home}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>ssl</id>
<activation>
<property>
<name>auth.server.ssl.required</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-adapter-subsystem-security</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${keycloak.server.home}/standalone/configuration</dir>
<includes>
<include>standalone.xml</include>
</includes>
<stylesheet>src/main/xslt/security.xsl</stylesheet>
<outputDir>${keycloak.server.home}/standalone/configuration</outputDir>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-keystore</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${keycloak.server.home}/standalone/configuration</outputDirectory>
<resources>
<resource>
<directory>src/main/keystore</directory>
<includes>
<include>keycloak.jks</include>
<include>keycloak.truststore</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jpa</id>
<properties>
<jdbc.mvn.driver.deployment.dir>${keycloak.server.home}/modules/system/layers/base/com/${jdbc.mvn.artifactId}/main</jdbc.mvn.driver.deployment.dir>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-properties</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>jdbc.mvn.groupId</property>
</requireProperty>
<requireProperty>
<property>jdbc.mvn.artifactId</property>
</requireProperty>
<requireProperty>
<property>jdbc.mvn.version</property>
</requireProperty>
<requireProperty>
<property>keycloak.connectionsJpa.url</property>
</requireProperty>
<requireProperty>
<property>keycloak.connectionsJpa.user</property>
</requireProperty>
<requireProperty>
<property>keycloak.connectionsJpa.password</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>jdbc-driver</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${jdbc.mvn.groupId}</groupId>
<artifactId>${jdbc.mvn.artifactId}</artifactId>
<version>${jdbc.mvn.version}</version>
<type>jar</type>
</artifactItem>
</artifactItems>
<outputDirectory>${jdbc.mvn.driver.deployment.dir}</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-wildfly-datasource</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<!-- create module.xml in modules -->
<transformationSet>
<dir>${keycloak.server.home}/modules/system/layers/base/com/h2database/h2/main</dir>
<stylesheet>src/main/xslt/module.xsl</stylesheet>
<includes>
<include>module.xml</include>
</includes>
<outputDir>${jdbc.mvn.driver.deployment.dir}</outputDir>
<parameters>
<parameter>
<name>database</name>
<value>${jdbc.mvn.artifactId}</value>
</parameter>
<parameter>
<name>version</name>
<value>${jdbc.mvn.version}</value>
</parameter>
</parameters>
</transformationSet>
<!-- add datasource to standalone.xml -->
<transformationSet>
<dir>${keycloak.server.home}/standalone/configuration</dir>
<stylesheet>src/main/xslt/datasource.xsl</stylesheet>
<includes>
<include>standalone.xml</include>
</includes>
<outputDir>${keycloak.server.home}/standalone/configuration</outputDir>
<parameters>
<parameter>
<name>jdbc.url</name>
<value>${keycloak.connectionsJpa.url}</value>
</parameter>
<parameter>
<name>driver</name>
<value>${jdbc.mvn.artifactId}</value>
</parameter>
<parameter>
<name>username</name>
<value>${keycloak.connectionsJpa.user}</value>
</parameter>
<parameter>
<name>password</name>
<value>${keycloak.connectionsJpa.password}</value>
</parameter>
</parameters>
</transformationSet>
<!-- add logger for org.hibernate.dialect.Dialect -->
<transformationSet>
<dir>${keycloak.server.home}/standalone/configuration</dir>
<stylesheet>src/main/xslt/add-dialect-logger.xsl</stylesheet>
<includes>
<include>standalone.xml</include>
</includes>
<outputDir>${keycloak.server.home}/standalone/configuration</outputDir>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>auth-server-wildfly-cluster</id>
<properties>
<session.cache.owners>1</session.cache.owners>
<offline.session.cache.owners>1</offline.session.cache.owners>
<login.failure.cache.owners>1</login.failure.cache.owners>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>configure-wildfly-datasource</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<!-- point KeycloakDS datasource to H2 running on TCP port -->
<transformationSet>
<dir>${keycloak.server.home}/standalone/configuration</dir>
<includes>
<include>standalone-ha.xml</include>
</includes>
<stylesheet>src/main/xslt/datasource-jdbc-url.xsl</stylesheet>
<outputDir>${keycloak.server.home}/standalone/configuration</outputDir>
<parameters>
<parameter>
<name>pool.name</name>
<value>KeycloakDS</value>
</parameter>
<parameter>
<name>jdbc.url</name>
<value>jdbc:h2:tcp://${jboss.bind.address:localhost}:9092/mem:keycloak;DB_CLOSE_DELAY=-1</value>
</parameter>
</parameters>
</transformationSet>
<transformationSet>
<dir>${keycloak.server.home}/standalone/configuration</dir>
<includes>
<include>standalone-ha.xml</include>
</includes>
<stylesheet>src/main/xslt/ispn-cache-owners.xsl</stylesheet>
<outputDir>${keycloak.server.home}/standalone/configuration</outputDir>
<parameters>
<parameter>
<name>sessionCacheOwners</name>
<value>${session.cache.owners}</value>
</parameter>
<parameter>
<name>offlineSessionCacheOwners</name>
<value>${offline.session.cache.owners}</value>
</parameter>
<parameter>
<name>loginFailureCacheOwners</name>
<value>${login.failure.cache.owners}</value>
</parameter>
</parameters>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View file

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
version="2.0"
exclude-result-prefixes="xalan">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
<xsl:variable name="nsDS" select="'urn:jboss:domain:logging:'"/>
<xsl:template match="//*[local-name()='subsystem' and starts-with(namespace-uri(), $nsDS)]
/*[local-name()='root-logger' and starts-with(namespace-uri(), $nsDS)]">
<logger category="org.hibernate.dialect.Dialect">
<level name="ALL"/>
</logger>
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<!-- Copy everything else. -->
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View file

@ -1,36 +0,0 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:j="urn:jboss:domain:4.0"
xmlns:ds="urn:jboss:domain:datasources:4.0"
xmlns:k="urn:jboss:domain:keycloak:1.1"
xmlns:sec="urn:jboss:domain:security:1.2"
version="2.0"
exclude-result-prefixes="xalan j ds k sec">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
<xsl:strip-space elements="*"/>
<xsl:variable name="nsDS" select="'urn:jboss:domain:datasources:'"/>
<xsl:param name="pool.name" select="'KeycloakDS'"/>
<xsl:param name="jdbc.url" />
<!-- replace JDBC URL -->
<xsl:template match="//*[local-name()='subsystem' and starts-with(namespace-uri(), $nsDS)]
/*[local-name()='datasources' and starts-with(namespace-uri(), $nsDS)]
/*[local-name()='datasource' and starts-with(namespace-uri(), $nsDS) and @pool-name=$pool.name]
/*[local-name()='connection-url' and starts-with(namespace-uri(), $nsDS)]">
<connection-url>
<xsl:value-of select="$jdbc.url"/>
</connection-url>
</xsl:template>
<!-- Copy everything else. -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View file

@ -1,40 +0,0 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:j="urn:jboss:domain:4.0"
xmlns:i="urn:jboss:domain:infinispan:4.0"
version="2.0"
exclude-result-prefixes="xalan i">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
<xsl:strip-space elements="*"/>
<xsl:variable name="nsDS" select="'urn:jboss:domain:datasources:'"/>
<xsl:param name="sessionCacheOwners" select="'1'"/>
<xsl:param name="offlineSessionCacheOwners" select="'1'"/>
<xsl:param name="loginFailureCacheOwners" select="'1'"/>
<xsl:template match="//i:cache-container/i:distributed-cache[@name='sessions']/@owners">
<xsl:attribute name="owners">
<xsl:value-of select="$sessionCacheOwners"/>
</xsl:attribute>
</xsl:template>
<xsl:template match="//i:cache-container/i:distributed-cache[@name='offlineSessions']/@owners">
<xsl:attribute name="owners">
<xsl:value-of select="$offlineSessionCacheOwners"/>
</xsl:attribute>
</xsl:template>
<xsl:template match="//i:cache-container/i:distributed-cache[@name='loginFailures']/@owners">
<xsl:attribute name="owners">
<xsl:value-of select="$loginFailureCacheOwners"/>
</xsl:attribute>
</xsl:template>
<!-- Copy everything else. -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View file

@ -62,7 +62,6 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<version>2.2</version> <version>2.2</version>
<executions> <executions>
@ -75,7 +74,6 @@
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<excludes> <excludes>
@ -91,6 +89,25 @@
<plugin> <plugin>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<executions> <executions>
<execution>
<id>copy-arquillian-xml</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>
</includes>
<!--<filtering>true</filtering>-->
</resource>
</resources>
</configuration>
</execution>
<execution> <execution>
<id>copy-admin-user-json-file</id> <id>copy-admin-user-json-file</id>
<phase>process-resources</phase> <phase>process-resources</phase>
@ -98,7 +115,7 @@
<goal>copy-resources</goal> <goal>copy-resources</goal>
</goals> </goals>
<configuration> <configuration>
<outputDirectory>${jboss.server.config.dir}</outputDirectory> <outputDirectory>${auth.server.config.dir}</outputDirectory>
<resources> <resources>
<resource> <resource>
<directory>src/test/resources</directory> <directory>src/test/resources</directory>

View file

@ -1,6 +1,5 @@
package org.keycloak.testsuite.arquillian; package org.keycloak.testsuite.arquillian;
import org.jboss.arquillian.container.spi.event.container.BeforeDeploy;
import org.jboss.arquillian.container.test.api.ContainerController; import org.jboss.arquillian.container.test.api.ContainerController;
import org.jboss.arquillian.core.api.Instance; import org.jboss.arquillian.core.api.Instance;
import org.jboss.arquillian.core.api.InstanceProducer; import org.jboss.arquillian.core.api.InstanceProducer;
@ -18,10 +17,9 @@ import java.io.IOException;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import static org.keycloak.testsuite.arquillian.AuthServerTestEnricher.getAuthServerContextRoot;
import static org.keycloak.testsuite.arquillian.AuthServerTestEnricher.getAuthServerQualifier;
import static org.keycloak.testsuite.util.IOUtil.execCommand; import static org.keycloak.testsuite.util.IOUtil.execCommand;
import static org.keycloak.testsuite.util.WaitUtils.pause; import static org.keycloak.testsuite.util.WaitUtils.pause;
import static org.keycloak.testsuite.arquillian.AuthServerTestEnricher.getAuthServerContextRoot;
/** /**
* *
@ -44,7 +42,7 @@ public class AppServerTestEnricher {
return annotatedClass == null ? null // no @AppServerContainer annotation --> no adapter test return annotatedClass == null ? null // no @AppServerContainer annotation --> no adapter test
: (appServerQ == null || appServerQ.isEmpty() // @AppServerContainer annotation present but qualifier not set --> relative adapter test : (appServerQ == null || appServerQ.isEmpty() // @AppServerContainer annotation present but qualifier not set --> relative adapter test
? getAuthServerQualifier() // app server == auth server ? AuthServerTestEnricher.AUTH_SERVER_CONTAINER // app server == auth server
: appServerQ); : appServerQ);
} }
@ -100,28 +98,28 @@ public class AppServerTestEnricher {
private Instance<ContainerController> containerConrollerInstance; private Instance<ContainerController> containerConrollerInstance;
public void startAppServer(@Observes(precedence = -1) BeforeClass event) throws MalformedURLException, InterruptedException, IOException { public void startAppServer(@Observes(precedence = -1) BeforeClass event) throws MalformedURLException, InterruptedException, IOException {
if (testContext.isAdapterTest()) { if (testContext.isAdapterTest() && !testContext.isRelativeAdapterTest()) {
ContainerController controller = containerConrollerInstance.get(); ContainerController controller = containerConrollerInstance.get();
if (!controller.isStarted(testContext.getAppServerInfo().getQualifier())) { if (!controller.isStarted(testContext.getAppServerInfo().getQualifier())) {
log.info("Starting app server: " + testContext.getAppServerInfo().getQualifier());
controller.start(testContext.getAppServerInfo().getQualifier()); controller.start(testContext.getAppServerInfo().getQualifier());
} }
} }
} }
public void installAdapterLibs(@Observes BeforeDeploy event) { // public void installAdapterLibs(@Observes BeforeDeploy event) {
log.debug("BEFORE DEPLOY - INSTALL ADAPTER LIBS"); // log.debug("BEFORE DEPLOY - INSTALL ADAPTER LIBS");
if (testContext.isAdapterTest()) { // if (testContext.isAdapterTest()) {
// install adapter libs on JBoss-based container via CLI // // install adapter libs on JBoss-based container via CLI
if (testContext.getAppServerInfo().isJBossBased()) { // if (testContext.getAppServerInfo().isJBossBased()) {
try { // try {
installAdapterLibsUsingJBossCLIClient(testContext.getAppServerInfo()); // installAdapterLibsUsingJBossCLIClient(testContext.getAppServerInfo());
} catch (InterruptedException | IOException ex) { // } catch (InterruptedException | IOException ex) {
throw new RuntimeException("Failed to install adapter libs.", ex); // throw new RuntimeException("Failed to install adapter libs.", ex);
} // }
} // }
} // }
} // }
private void installAdapterLibsUsingJBossCLIClient(ContainerInfo appServerInfo) throws InterruptedException, IOException { private void installAdapterLibsUsingJBossCLIClient(ContainerInfo appServerInfo) throws InterruptedException, IOException {
if (!appServerInfo.isAdapterLibsInstalled()) { if (!appServerInfo.isAdapterLibsInstalled()) {
@ -160,7 +158,7 @@ public class AppServerTestEnricher {
execCommand(command + " --connect --command=reload" + controllerArg, bin); execCommand(command + " --connect --command=reload" + controllerArg, bin);
log.info("Container restarted"); log.info("Container restarted");
pause(5000); pause(5000);
if (System.getProperty("app.server.log.check","true").equals("true")) { if (System.getProperty("app.server.log.check", "true").equals("true")) {
LogChecker.checkJBossServerLog(jbossHomePath); LogChecker.checkJBossServerLog(jbossHomePath);
} }
} }
@ -179,7 +177,7 @@ public class AppServerTestEnricher {
public static Class getNearestSuperclassWithAnnotation(Class testClass, Class annotationClass) { public static Class getNearestSuperclassWithAnnotation(Class testClass, Class annotationClass) {
return testClass.isAnnotationPresent(annotationClass) ? testClass return testClass.isAnnotationPresent(annotationClass) ? testClass
: (testClass.getSuperclass().equals(Object.class) ? null // stop recursion : (testClass.getSuperclass().equals(Object.class) ? null // stop recursion
: getNearestSuperclassWithAnnotation(testClass.getSuperclass(), annotationClass)); // continue recursion : getNearestSuperclassWithAnnotation(testClass.getSuperclass(), annotationClass)); // continue recursion
} }
public static boolean hasAppServerContainerAnnotation(Class testClass) { public static boolean hasAppServerContainerAnnotation(Class testClass) {
@ -187,12 +185,12 @@ public class AppServerTestEnricher {
} }
public static boolean isRelative(Class testClass) { public static boolean isRelative(Class testClass) {
return getAppServerQualifier(testClass).equals(getAuthServerQualifier()); return getAppServerQualifier(testClass).equals(AuthServerTestEnricher.AUTH_SERVER_CONTAINER);
} }
public static String getAdapterLibsLocationProperty(Class testClass) { public static String getAdapterLibsLocationProperty(Class testClass) {
Class<? extends AuthServerTestEnricher> annotatedClass = getNearestSuperclassWithAnnotation(testClass, AdapterLibsLocationProperty.class); Class<? extends AuthServerTestEnricher> annotatedClass = getNearestSuperclassWithAnnotation(testClass, AdapterLibsLocationProperty.class);
return (annotatedClass == null ? null return (annotatedClass == null ? "adapter.libs.home"
: annotatedClass.getAnnotation(AdapterLibsLocationProperty.class).value()); : annotatedClass.getAnnotation(AdapterLibsLocationProperty.class).value());
} }

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