KEYCLOAK-13757 update JDG version to 8.1 - testsuite updates
This commit is contained in:
parent
cbd4288205
commit
2802740101
36 changed files with 1611 additions and 129 deletions
|
@ -800,17 +800,39 @@ land by adjusting load balancer configuration (e.g. to direct the traffic to onl
|
|||
|
||||
For an example of a test, see [org.keycloak.testsuite.crossdc.ActionTokenCrossDCTest](tests/base/src/test/java/org/keycloak/testsuite/crossdc/ActionTokenCrossDCTest.java).
|
||||
|
||||
The cross DC requires setting a profile specifying used cache server by specifying
|
||||
`cache-server-infinispan` or `cache-server-jdg` profile in maven.
|
||||
The cross DC requires setting a profile specifying the used cache server.
|
||||
Use `cache-server-infinispan` Maven profile for Infinispan 10 or higher, or `cache-server-legacy-infinispan` profile for Infinispan 9 and lower.
|
||||
Use `cache-server-datagrid` Maven profile for Datagrid 8 or higher, or `cache-server-legacy-datagrid` profile for Datagrid 7 and lower.
|
||||
|
||||
Since JDG does not distribute `infinispan-server` zip artifact anymore, for `cache-server-jdg` profile it is
|
||||
necessary to download the artifact and install it to local Maven repository. For JDG 7.3.8, the command is the following:
|
||||
To specify a custom Java platform to run the cache server it is possible to set parameter: `-Dcache.server.java.home=<PATH_TO_JDK>`.
|
||||
|
||||
### Cache Authentication
|
||||
|
||||
With WildFLy/EAP based auth server option it is possible to enable authentication for the HotRod protocol by enabling profile `cache-auth`.
|
||||
|
||||
It is possible to specify additional parameters:
|
||||
- `-Dhotrod.sasl.mechanism`: SASL mechanism used by the hotrod protocol. Default value is `DIGEST-MD5`.
|
||||
- `-Dkeycloak.connectionsInfinispan.hotrodProtocolVersion`: Version of the hotrod protocol.
|
||||
|
||||
Example: `-Pauth-server-wildfly,cache-server-infinispan,cache-auth -Dhotrod.sasl.mechanism=SCRAM-SHA-512`
|
||||
|
||||
Note: The `cache-auth` profile currently doesn't work with the legacy Infinispan/Datagrid modules. See: [KEYCLOAK-18336](https://issues.redhat.com/browse/KEYCLOAK-18336).
|
||||
|
||||
### Data Grid
|
||||
|
||||
Since Datagrid does not distribute `infinispan-server` zip artifact, for `cache-server-datagrid` profile it is
|
||||
necessary to download the artifact and install it to local Maven repository. For Red Hat Data Grid 8 and above, the command is the following:
|
||||
|
||||
mvn install:install-file \
|
||||
-DgroupId=org.infinispan.server -DartifactId=infinispan-server -Dpackaging=zip -Dclassifier=bin -DgeneratePom=true \
|
||||
-Dversion=9.4.21.Final-redhat-00002 -Dfile=jboss-datagrid-7.3.8-server.zip
|
||||
-DgroupId=com.redhat -DartifactId=datagrid -Dpackaging=zip -Dclassifier=bin -DgeneratePom=true \
|
||||
-Dversion=${DATAGRID_VERSION} -Dfile=redhat-datagrid-${DATAGRID_VERSION}-server.zip
|
||||
|
||||
#### Run Cross-DC Tests from Maven
|
||||
For Data Grid 7 and older use: `-Dfile=jboss-datagrid-${DATAGRID_VERSION}-server.zip`.
|
||||
|
||||
### Run Cross-DC Tests from Maven
|
||||
|
||||
Note: Profile `auth-servers-crossdc-undertow` currently doesn't work (see [KEYCLOAK-18335](https://issues.redhat.com/browse/KEYCLOAK-18335)).
|
||||
Use `-Pauth-servers-crossdc-jboss,auth-server-wildfly` instead.
|
||||
|
||||
a) Prepare the environment. Compile the infinispan server and eventually Keycloak on JBoss server.
|
||||
|
||||
|
@ -819,14 +841,14 @@ Infinispan/JDG test server via the following command:
|
|||
|
||||
`mvn -Pcache-server-infinispan,auth-servers-crossdc-undertow -f testsuite/integration-arquillian -DskipTests clean install`
|
||||
|
||||
*note: 'cache-server-infinispan' can be replaced by 'cache-server-jdg'*
|
||||
*note: 'cache-server-infinispan' can be replaced by 'cache-server-datagrid'*
|
||||
|
||||
a2) If you want to use **JBoss-based** Keycloak backend containers instead of containers on Embedded Undertow,
|
||||
you need to prepare both the Infinispan/JDG test server and the Keycloak server on Wildfly/EAP. Run following command:
|
||||
|
||||
`mvn -Pcache-server-infinispan,auth-servers-crossdc-jboss,auth-server-wildfly -f testsuite/integration-arquillian -DskipTests clean install`
|
||||
|
||||
*note: 'cache-server-infinispan' can be replaced by 'cache-server-jdg'*
|
||||
*note: 'cache-server-infinispan' can be replaced by 'cache-server-datagrid'*
|
||||
|
||||
*note: 'auth-server-wildfly' can be replaced by 'auth-server-eap'*
|
||||
|
||||
|
@ -838,7 +860,7 @@ b1) For **Undertow** Keycloak backend containers, you can run the tests using th
|
|||
|
||||
`mvn -Pcache-server-infinispan,auth-servers-crossdc-undertow -Dtest=org.keycloak.testsuite.crossdc.**.*Test -pl testsuite/integration-arquillian/tests/base clean install`
|
||||
|
||||
*note: 'cache-server-infinispan' can be replaced by 'cache-server-jdg'*
|
||||
*note: 'cache-server-infinispan' can be replaced by 'cache-server-datagrid'*
|
||||
|
||||
*note: It can be useful to add additional system property to enable logging:*
|
||||
|
||||
|
@ -848,7 +870,7 @@ b2) For **JBoss-based** Keycloak backend containers, you can run the tests like
|
|||
|
||||
`mvn -Pcache-server-infinispan,auth-servers-crossdc-jboss,auth-server-wildfly -Dtest=org.keycloak.testsuite.crossdc.**.*Test -pl testsuite/integration-arquillian/tests/base clean install`
|
||||
|
||||
*note: 'cache-server-infinispan' can be replaced by 'cache-server-jdg'*
|
||||
*note: 'cache-server-infinispan' can be replaced by 'cache-server-datagrid'*
|
||||
|
||||
*note: 'auth-server-wildfly can be replaced by auth-server-eap'*
|
||||
|
||||
|
@ -858,7 +880,9 @@ For **JBoss-based** Keycloak backend containers on real DB, the previous command
|
|||
`mvn -f testsuite/integration-arquillian -Dtest=org.keycloak.testsuite.crossdc.**.*Test -Pcache-server-infinispan,auth-servers-crossdc-jboss,auth-server-wildfly,jpa,db-mariadb clean install`
|
||||
|
||||
|
||||
#### Run Cross-DC Tests from Intellij IDEA
|
||||
### Run Cross-DC Tests from Intellij IDEA
|
||||
|
||||
Note: Profile `auth-servers-crossdc-undertow` which is required in step (3) currently doesn't work (see [KEYCLOAK-18335](https://issues.redhat.com/browse/KEYCLOAK-18335)).
|
||||
|
||||
First we will manually download, configure and run infinispan servers. Then we can run the tests from IDE against the servers.
|
||||
It's more effective during development as there is no need to restart infinispan server(s) among test runs.
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
<auth.server.java.home>${java.home}</auth.server.java.home>
|
||||
<app.server.java.home>${java.home}</app.server.java.home>
|
||||
<app.server>undertow</app.server>
|
||||
<cache.server.java.home>${java.home}</cache.server.java.home>
|
||||
|
||||
<!-- Wildfly deprecated versions -->
|
||||
<wildfly.deprecated.version>21.0.2.Final</wildfly.deprecated.version>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<project>
|
||||
<project xmlns:if="ant:if">
|
||||
|
||||
<property name="cli.tmp.dir" value="${project.build.directory}/cli" />
|
||||
|
||||
|
@ -227,6 +227,15 @@
|
|||
<copy todir="${cli.tmp.dir}">
|
||||
<resources>
|
||||
<file file="${common.resources}/jboss-cli/cross-dc-setup.cli"/>
|
||||
<file file="${common.resources}/jboss-cli/cross-dc-setup_cache-auth.cli" if:true="${crossdc.cache.auth}" />
|
||||
</resources>
|
||||
<filterset>
|
||||
<filter token="HOTROD_SASL_MECHANISM" value="${hotrod.sasl.mechanism}"/>
|
||||
</filterset>
|
||||
</copy>
|
||||
<copy todir="${auth.server.home}/standalone/configuration">
|
||||
<resources>
|
||||
<file file="${common.resources}/keystore/hotrod-client-truststore.jks"/>
|
||||
</resources>
|
||||
</copy>
|
||||
</target>
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
echo ** Update replicated-cache work element **
|
||||
/subsystem=infinispan/cache-container=keycloak/replicated-cache=work/store=remote:write-attribute( \
|
||||
name=properties, \
|
||||
value={ \
|
||||
infinispan.client.hotrod.auth_username=myuser, \
|
||||
infinispan.client.hotrod.auth_password=qwer1234!, \
|
||||
infinispan.client.hotrod.auth_realm=default, \
|
||||
infinispan.client.hotrod.auth_server_name=infinispan, \
|
||||
infinispan.client.hotrod.sasl_mechanism=@HOTROD_SASL_MECHANISM@, \
|
||||
infinispan.client.hotrod.trust_store_file_name=${jboss.server.config.dir}/hotrod-client-truststore.jks, \
|
||||
infinispan.client.hotrod.trust_store_type=JKS, \
|
||||
infinispan.client.hotrod.trust_store_password=password, \
|
||||
rawValues=true, \
|
||||
marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, \
|
||||
protocolVersion=${keycloak.connectionsInfinispan.hotrodProtocolVersion} \
|
||||
} \
|
||||
)
|
||||
|
||||
echo ** Update distributed-cache sessions element **
|
||||
/subsystem=infinispan/cache-container=keycloak/distributed-cache=sessions/store=remote:write-attribute( \
|
||||
name=properties, \
|
||||
value={ \
|
||||
infinispan.client.hotrod.auth_username=myuser, \
|
||||
infinispan.client.hotrod.auth_password=qwer1234!, \
|
||||
infinispan.client.hotrod.auth_realm=default, \
|
||||
infinispan.client.hotrod.auth_server_name=infinispan, \
|
||||
infinispan.client.hotrod.sasl_mechanism=@HOTROD_SASL_MECHANISM@, \
|
||||
infinispan.client.hotrod.trust_store_file_name=${jboss.server.config.dir}/hotrod-client-truststore.jks, \
|
||||
infinispan.client.hotrod.trust_store_type=JKS, \
|
||||
infinispan.client.hotrod.trust_store_password=password, \
|
||||
rawValues=true, \
|
||||
marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, \
|
||||
protocolVersion=${keycloak.connectionsInfinispan.hotrodProtocolVersion} \
|
||||
} \
|
||||
)
|
||||
|
||||
echo ** Update distributed-cache offlineSessions element **
|
||||
/subsystem=infinispan/cache-container=keycloak/distributed-cache=offlineSessions/store=remote:write-attribute( \
|
||||
name=properties, \
|
||||
value={ \
|
||||
infinispan.client.hotrod.auth_username=myuser, \
|
||||
infinispan.client.hotrod.auth_password=qwer1234!, \
|
||||
infinispan.client.hotrod.auth_realm=default, \
|
||||
infinispan.client.hotrod.auth_server_name=infinispan, \
|
||||
infinispan.client.hotrod.sasl_mechanism=@HOTROD_SASL_MECHANISM@, \
|
||||
infinispan.client.hotrod.trust_store_file_name=${jboss.server.config.dir}/hotrod-client-truststore.jks, \
|
||||
infinispan.client.hotrod.trust_store_type=JKS, \
|
||||
infinispan.client.hotrod.trust_store_password=password, \
|
||||
rawValues=true, \
|
||||
marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, \
|
||||
protocolVersion=${keycloak.connectionsInfinispan.hotrodProtocolVersion} \
|
||||
} \
|
||||
)
|
||||
|
||||
echo ** Update distributed-cache clientSessions element **
|
||||
/subsystem=infinispan/cache-container=keycloak/distributed-cache=clientSessions/store=remote:write-attribute( \
|
||||
name=properties, \
|
||||
value={ \
|
||||
infinispan.client.hotrod.auth_username=myuser, \
|
||||
infinispan.client.hotrod.auth_password=qwer1234!, \
|
||||
infinispan.client.hotrod.auth_realm=default, \
|
||||
infinispan.client.hotrod.auth_server_name=infinispan, \
|
||||
infinispan.client.hotrod.sasl_mechanism=@HOTROD_SASL_MECHANISM@, \
|
||||
infinispan.client.hotrod.trust_store_file_name=${jboss.server.config.dir}/hotrod-client-truststore.jks, \
|
||||
infinispan.client.hotrod.trust_store_type=JKS, \
|
||||
infinispan.client.hotrod.trust_store_password=password, \
|
||||
rawValues=true, \
|
||||
marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, \
|
||||
protocolVersion=${keycloak.connectionsInfinispan.hotrodProtocolVersion} \
|
||||
} \
|
||||
)
|
||||
|
||||
echo ** Update distributed-cache offlineClientSessions element **
|
||||
/subsystem=infinispan/cache-container=keycloak/distributed-cache=offlineClientSessions/store=remote:write-attribute( \
|
||||
name=properties, \
|
||||
value={ \
|
||||
infinispan.client.hotrod.auth_username=myuser, \
|
||||
infinispan.client.hotrod.auth_password=qwer1234!, \
|
||||
infinispan.client.hotrod.auth_realm=default, \
|
||||
infinispan.client.hotrod.auth_server_name=infinispan, \
|
||||
infinispan.client.hotrod.sasl_mechanism=@HOTROD_SASL_MECHANISM@, \
|
||||
infinispan.client.hotrod.trust_store_file_name=${jboss.server.config.dir}/hotrod-client-truststore.jks, \
|
||||
infinispan.client.hotrod.trust_store_type=JKS, \
|
||||
infinispan.client.hotrod.trust_store_password=password, \
|
||||
rawValues=true, \
|
||||
marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, \
|
||||
protocolVersion=${keycloak.connectionsInfinispan.hotrodProtocolVersion} \
|
||||
} \
|
||||
)
|
||||
|
||||
echo ** Update distributed-cache loginFailures element **
|
||||
/subsystem=infinispan/cache-container=keycloak/distributed-cache=loginFailures/store=remote:write-attribute( \
|
||||
name=properties, \
|
||||
value={ \
|
||||
infinispan.client.hotrod.auth_username=myuser, \
|
||||
infinispan.client.hotrod.auth_password=qwer1234!, \
|
||||
infinispan.client.hotrod.auth_realm=default, \
|
||||
infinispan.client.hotrod.auth_server_name=infinispan, \
|
||||
infinispan.client.hotrod.sasl_mechanism=@HOTROD_SASL_MECHANISM@, \
|
||||
infinispan.client.hotrod.trust_store_file_name=${jboss.server.config.dir}/hotrod-client-truststore.jks, \
|
||||
infinispan.client.hotrod.trust_store_type=JKS, \
|
||||
infinispan.client.hotrod.trust_store_password=password, \
|
||||
rawValues=true, \
|
||||
marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, \
|
||||
protocolVersion=${keycloak.connectionsInfinispan.hotrodProtocolVersion} \
|
||||
} \
|
||||
)
|
||||
|
||||
echo ** Update distributed-cache actionTokens element **
|
||||
/subsystem=infinispan/cache-container=keycloak/distributed-cache=actionTokens/store=remote:write-attribute( \
|
||||
name=properties, \
|
||||
value={ \
|
||||
infinispan.client.hotrod.auth_username=myuser, \
|
||||
infinispan.client.hotrod.auth_password=qwer1234!, \
|
||||
infinispan.client.hotrod.auth_realm=default, \
|
||||
infinispan.client.hotrod.auth_server_name=infinispan, \
|
||||
infinispan.client.hotrod.sasl_mechanism=@HOTROD_SASL_MECHANISM@, \
|
||||
infinispan.client.hotrod.trust_store_file_name=${jboss.server.config.dir}/hotrod-client-truststore.jks, \
|
||||
infinispan.client.hotrod.trust_store_type=JKS, \
|
||||
infinispan.client.hotrod.trust_store_password=password, \
|
||||
rawValues=true, \
|
||||
marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, \
|
||||
protocolVersion=${keycloak.connectionsInfinispan.hotrodProtocolVersion} \
|
||||
} \
|
||||
)
|
Binary file not shown.
|
@ -70,6 +70,8 @@
|
|||
|
||||
<!-- Path to testsuite/test resources : Themes-->
|
||||
<keycloak.base.test.resource>${project.parent.basedir}/../../../tests/base/src/test/resources</keycloak.base.test.resource>
|
||||
|
||||
<crossdc.cache.auth>false</crossdc.cache.auth>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
|
@ -270,9 +272,12 @@
|
|||
There's also another case, when we have a dynamic property (like "keycloak.connectionsJpa.url")
|
||||
that can change in the runtime. In such cases, we CAN NOT put is as a property (or
|
||||
Ant will see outdated values, not the dynamic ones). -->
|
||||
<property name="auth.server.home">${auth.server.home}</property>
|
||||
<property name="session.cache.owners" value="${session.cache.owners}" />
|
||||
<property name="offline.session.cache.owners" value="${offline.session.cache.owners}" />
|
||||
<property name="login.failure.cache.owners" value="${login.failure.cache.owners}" />
|
||||
<property name="crossdc.cache.auth" value="${crossdc.cache.auth}" />
|
||||
<property name="hotrod.sasl.mechanism" value="${hotrod.sasl.mechanism}" />
|
||||
</ant>
|
||||
</target>
|
||||
</configuration>
|
||||
|
@ -698,5 +703,12 @@
|
|||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>cache-auth</id>
|
||||
<properties>
|
||||
<crossdc.cache.auth>true</crossdc.cache.auth>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
<!--
|
||||
~ 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>cache-server-${cache.server}</id>
|
||||
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${cache.server.infinispan.home}</directory>
|
||||
<outputDirectory>cache-server-${cache.server}</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>**/*.sh</exclude>
|
||||
<exclude>**/clustered.xml</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${cache.server.infinispan.home}</directory>
|
||||
<outputDirectory>cache-server-${cache.server}</outputDirectory>
|
||||
<includes>
|
||||
<include>**/*.sh</include>
|
||||
</includes>
|
||||
<fileMode>0755</fileMode>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
|
||||
</assembly>
|
|
@ -0,0 +1,80 @@
|
|||
<!--
|
||||
~ 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:param name="local.site" />
|
||||
<xsl:param name="remote.site" />
|
||||
<xsl:param name="transactions.enabled" />
|
||||
|
||||
<!-- Configuration of infinispan caches -->
|
||||
<xsl:template match="//*[local-name()='infinispan']/*[local-name()='cache-container' and @name='default']">
|
||||
<xsl:copy copy-namespaces="no">
|
||||
<xsl:apply-templates select="@* | node()" />
|
||||
|
||||
<jmx enabled="true" />
|
||||
|
||||
<!--<replicated-cache-configuration name="sessions-cfg" mode="SYNC" start="EAGER" batching="false">-->
|
||||
<replicated-cache-configuration name="sessions-cfg" mode="SYNC" start="EAGER" statistics="true" >
|
||||
<xsl:if test="$transactions.enabled='true'">
|
||||
<transaction mode="NON_DURABLE_XA" locking="PESSIMISTIC"/>
|
||||
</xsl:if>
|
||||
<locking acquire-timeout="0" />
|
||||
<backups>
|
||||
<backup site="{$remote.site}" failure-policy="FAIL" strategy="SYNC" enabled="true">
|
||||
<take-offline min-wait="60000" after-failures="3" />
|
||||
</backup>
|
||||
</backups>
|
||||
</replicated-cache-configuration>
|
||||
|
||||
<replicated-cache name="sessions" configuration="sessions-cfg" />
|
||||
<replicated-cache name="offlineSessions" configuration="sessions-cfg" />
|
||||
<replicated-cache name="clientSessions" configuration="sessions-cfg" />
|
||||
<replicated-cache name="offlineClientSessions" configuration="sessions-cfg" />
|
||||
<replicated-cache name="loginFailures" configuration="sessions-cfg" />
|
||||
<replicated-cache name="actionTokens" configuration="sessions-cfg" />
|
||||
<replicated-cache name="work" configuration="sessions-cfg" />
|
||||
<replicated-cache name="employee-distributable-cache.ssoCache" configuration="sessions-cfg" />
|
||||
<replicated-cache name="employee-distributable-cache" configuration="sessions-cfg" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Configure `xsite` stack. -->
|
||||
<xsl:template match="//*[local-name()='infinispan']/*[local-name()='jgroups']
|
||||
/*[local-name()='stack' and @name='xsite']">
|
||||
<stack name="xsite" extends="udp">
|
||||
<relay.RELAY2 xmlns="urn:org:jgroups" site="{$local.site}"/>
|
||||
<remote-sites default-stack="tcp">
|
||||
<remote-site name="{$local.site}"/>
|
||||
<remote-site name="{$remote.site}"/>
|
||||
</remote-sites>
|
||||
</stack>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@*|node()">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,35 @@
|
|||
<!--
|
||||
~ 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 #all">
|
||||
|
||||
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
|
||||
<xsl:strip-space elements="*"/>
|
||||
|
||||
<!--remove security-realm attribute of endpoints element-->
|
||||
<xsl:template match="//*[local-name()='endpoints']/@security-realm"/>
|
||||
|
||||
<xsl:template match="@*|node()">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,77 @@
|
|||
<!--
|
||||
~ 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 #all">
|
||||
|
||||
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
|
||||
<xsl:strip-space elements="*"/>
|
||||
|
||||
<xsl:param name="hotrod.sasl.mechanism" />
|
||||
|
||||
<xsl:template match="//*[local-name()='infinispan']/*[local-name()='cache-container' and @name='default']">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@* | node()" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="//*[local-name()='hotrod-connector' and @name='hotrod']">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@* | node()" />
|
||||
<!-- Add "authentication" into HotRod connector configuration -->
|
||||
<authentication security-realm="default">
|
||||
<!--qop="auth"-->
|
||||
<!--<sasl mechanisms="SCRAM-SHA-512 SCRAM-SHA-384 SCRAM-SHA-256 SCRAM-SHA-1 DIGEST-SHA-512 DIGEST-SHA-384 DIGEST-SHA-256 DIGEST-SHA DIGEST-MD5 PLAIN"-->
|
||||
<sasl mechanisms="{$hotrod.sasl.mechanism}"
|
||||
server-name="infinispan">
|
||||
<policy>
|
||||
<no-anonymous value="false" />
|
||||
</policy>
|
||||
</sasl>
|
||||
</authentication>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Configure SSL -->
|
||||
<xsl:template match="//*[local-name()='infinispan']
|
||||
/*[local-name()='server']
|
||||
//*[local-name()='security-realm' and @name='default']">
|
||||
<xsl:copy copy-namespaces="no">
|
||||
<xsl:apply-templates select="@*" />
|
||||
<server-identities>
|
||||
<ssl>
|
||||
<keystore
|
||||
path="server.jks" relative-to="infinispan.server.config.path"
|
||||
keystore-password="password"
|
||||
alias="server"
|
||||
key-password="password"
|
||||
/>
|
||||
</ssl>
|
||||
</server-identities>
|
||||
<xsl:apply-templates select="node()" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@*|node()">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
Binary file not shown.
|
@ -0,0 +1,69 @@
|
|||
<?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-cache-server-infinispan</artifactId>
|
||||
<version>14.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>integration-arquillian-servers-cache-server-infinispan-datagrid</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Keycloak Arquillian Integration TestSuite - Cache Server - Infinispan - Datagrid</name>
|
||||
|
||||
<properties>
|
||||
<cache.server>datagrid</cache.server>
|
||||
|
||||
<cache.server.infinispan.groupId>com.redhat</cache.server.infinispan.groupId>
|
||||
<cache.server.infinispan.artifactId>datagrid</cache.server.infinispan.artifactId>
|
||||
<cache.server.infinispan.version>8.1.0</cache.server.infinispan.version>
|
||||
<cache.server.infinispan.unpacked.folder.name>redhat-datagrid-${cache.server.infinispan.version}-server</cache.server.infinispan.unpacked.folder.name>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-cache-server</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>${cache.server.infinispan.groupId}</groupId>
|
||||
<artifactId>${cache.server.infinispan.artifactId}</artifactId>
|
||||
<version>${cache.server.infinispan.version}</version>
|
||||
<type>zip</type>
|
||||
<classifier>bin</classifier>
|
||||
<outputDirectory>${containers.home}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -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-cache-server-infinispan</artifactId>
|
||||
<version>14.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>integration-arquillian-servers-cache-server-infinispan-infinispan</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Keycloak Arquillian Integration TestSuite - Cache Server - Infinispan - Infinispan</name>
|
||||
|
||||
<properties>
|
||||
<cache.server>infinispan</cache.server>
|
||||
|
||||
<cache.server.infinispan.groupId>org.infinispan.server</cache.server.infinispan.groupId>
|
||||
<cache.server.infinispan.artifactId>infinispan-server</cache.server.infinispan.artifactId>
|
||||
<cache.server.infinispan.version>${infinispan.version}</cache.server.infinispan.version>
|
||||
<cache.server.infinispan.unpacked.folder.name>${cache.server.infinispan.artifactId}-${cache.server.infinispan.version}</cache.server.infinispan.unpacked.folder.name>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.googlecode.maven-download-plugin</groupId>
|
||||
<artifactId>download-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>download-infinispan-server</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>wget</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<url>http://downloads.jboss.org/infinispan/${cache.server.infinispan.version}/infinispan-server-${cache.server.infinispan.version}.zip</url>
|
||||
<unpack>true</unpack>
|
||||
<outputDirectory>${containers.home}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -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">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-servers-cache-server</artifactId>
|
||||
<version>14.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
<artifactId>integration-arquillian-servers-cache-server-infinispan</artifactId>
|
||||
<name>Keycloak Arquillian Integration TestSuite - Cache Server - Infinispan</name>
|
||||
|
||||
<properties>
|
||||
<common.resources>${project.parent.basedir}/common</common.resources>
|
||||
<assembly.xml>${project.parent.basedir}/assembly.xml</assembly.xml>
|
||||
|
||||
<cache.server.infinispan.home>${containers.home}/${cache.server.infinispan.unpacked.folder.name}</cache.server.infinispan.home>
|
||||
<cache.server.infinispan.jdg-transactions-enabled>true</cache.server.infinispan.jdg-transactions-enabled>
|
||||
<cache.server.infinispan.config.dir>${cache.server.infinispan.home}/server/conf</cache.server.infinispan.config.dir>
|
||||
|
||||
<cache.server.cache-auth-xsl>cache-authentication-disabled.xsl</cache.server.cache-auth-xsl>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
|
||||
<profile>
|
||||
<id>cache-auth</id>
|
||||
<properties>
|
||||
<cache.server.cache-auth-xsl>cache-authentication-enabled.xsl</cache.server.cache-auth-xsl>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>cache-server-infinispan-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>cache.server.infinispan.groupId</property>
|
||||
<property>cache.server.infinispan.artifactId</property>
|
||||
<property>cache.server.infinispan.version</property>
|
||||
<property>cache.server.infinispan.unpacked.folder.name</property>
|
||||
</requireProperty>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>xml-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>configure-keycloak-caches</id>
|
||||
<phase>process-test-resources</phase>
|
||||
<goals>
|
||||
<goal>transform</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformationSets>
|
||||
|
||||
<!-- Configure dc-0 site in file clustered-1.xml -->
|
||||
<transformationSet>
|
||||
<dir>${cache.server.infinispan.config.dir}</dir>
|
||||
<includes>
|
||||
<include>infinispan-xsite.xml</include>
|
||||
</includes>
|
||||
<stylesheet>${common.resources}/add-keycloak-caches.xsl</stylesheet>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>local.site</name>
|
||||
<value>dc-0</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>remote.site</name>
|
||||
<value>dc-1</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>transactions.enabled</name>
|
||||
<value>${cache.server.infinispan.jdg-transactions-enabled}</value>
|
||||
</parameter>
|
||||
</parameters>
|
||||
<outputDir>${cache.server.infinispan.config.dir}</outputDir>
|
||||
<fileMappers>
|
||||
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
|
||||
<pattern>^(.*)\.xml$</pattern>
|
||||
<replacement>$1-1.xml</replacement>
|
||||
</fileMapper>
|
||||
</fileMappers>
|
||||
</transformationSet>
|
||||
|
||||
<!-- Configure dc-1 site in file clustered-2.xml -->
|
||||
<transformationSet>
|
||||
<dir>${cache.server.infinispan.config.dir}</dir>
|
||||
<includes>
|
||||
<include>infinispan-xsite.xml</include>
|
||||
</includes>
|
||||
<stylesheet>${common.resources}/add-keycloak-caches.xsl</stylesheet>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>local.site</name>
|
||||
<value>dc-1</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>remote.site</name>
|
||||
<value>dc-0</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>transactions.enabled</name>
|
||||
<value>${cache.server.infinispan.jdg-transactions-enabled}</value>
|
||||
</parameter>
|
||||
</parameters>
|
||||
<outputDir>${cache.server.infinispan.config.dir}</outputDir>
|
||||
<fileMappers>
|
||||
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
|
||||
<pattern>^(.*)\.xml$</pattern>
|
||||
<replacement>$1-2.xml</replacement>
|
||||
</fileMapper>
|
||||
</fileMappers>
|
||||
</transformationSet>
|
||||
|
||||
</transformationSets>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>configure-keycloak-authorization</id>
|
||||
<phase>process-test-resources</phase>
|
||||
<goals>
|
||||
<goal>transform</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformationSets>
|
||||
<!-- Configure authorization in files clustered-__dc__.xml -->
|
||||
<transformationSet>
|
||||
<dir>${cache.server.infinispan.config.dir}</dir>
|
||||
<includes>
|
||||
<include>infinispan-xsite-1.xml</include>
|
||||
<include>infinispan-xsite-2.xml</include>
|
||||
</includes>
|
||||
<stylesheet>${common.resources}/${cache.server.cache-auth-xsl}</stylesheet>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>hotrod.sasl.mechanism</name>
|
||||
<value>${hotrod.sasl.mechanism}</value>
|
||||
</parameter>
|
||||
</parameters>
|
||||
<outputDir>${cache.server.infinispan.config.dir}</outputDir>
|
||||
</transformationSet>
|
||||
</transformationSets>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-server-keystore</id>
|
||||
<phase>process-test-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${cache.server.infinispan.config.dir}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${common.resources}</directory>
|
||||
<includes>
|
||||
<include>server.jks</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<overwrite>true</overwrite>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>remove-empty-xmlns</id>
|
||||
<phase>process-test-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<replace file="${cache.server.infinispan.config.dir}/infinispan-xsite-1.xml" token="xmlns=""" value=""/>
|
||||
<replace file="${cache.server.infinispan.config.dir}/infinispan-xsite-2.xml" token="xmlns=""" value=""/>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>create-infinispan-user</id>
|
||||
<phase>process-test-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>${cache.server.infinispan.home}/bin/cli.sh</executable>
|
||||
<workingDirectory>${cache.server.infinispan.home}/bin</workingDirectory>
|
||||
<arguments>
|
||||
<argument>user</argument>
|
||||
<argument>create</argument>
|
||||
<argument>myuser</argument>
|
||||
<argument>-p</argument>
|
||||
<argument>"qwer1234!"</argument>
|
||||
</arguments>
|
||||
</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>cache-server-infinispan</id>
|
||||
<modules>
|
||||
<module>infinispan</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>cache-server-datagrid</id>
|
||||
<modules>
|
||||
<module>datagrid</module>
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
|
||||
</project>
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<assembly>
|
||||
|
||||
<id>${cache.server.jboss}</id>
|
||||
<id>cache-server-${cache.server}</id>
|
||||
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
|
@ -27,7 +27,7 @@
|
|||
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${cache.server.jboss.home}</directory>
|
||||
<directory>${cache.server.legacy.home}</directory>
|
||||
<outputDirectory>cache-server-${cache.server}</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>**/*.sh</exclude>
|
||||
|
@ -35,7 +35,7 @@
|
|||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${cache.server.jboss.home}</directory>
|
||||
<directory>${cache.server.legacy.home}</directory>
|
||||
<outputDirectory>cache-server-${cache.server}</outputDirectory>
|
||||
<includes>
|
||||
<include>**/*.sh</include>
|
|
@ -81,6 +81,11 @@
|
|||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Configure SSL -->
|
||||
<xsl:template match="//*[local-name()='keystore' and @path='application.keystore']">
|
||||
<keystore path="server.jks" relative-to="jboss.server.config.dir" keystore-password="password" alias="server" key-password="password" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@*|node()">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()" />
|
Binary file not shown.
|
@ -20,27 +20,25 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<parent>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-jboss</artifactId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-legacy</artifactId>
|
||||
<version>14.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>integration-arquillian-servers-cache-server-jdg</artifactId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-legacy-datagrid</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Cache Server - JDG</name>
|
||||
<name>Keycloak Arquillian Integration TestSuite - Cache Server - Legacy Datagrid</name>
|
||||
|
||||
<properties>
|
||||
<cache.server>jdg</cache.server>
|
||||
<cache.server.container>cache-server-${cache.server}</cache.server.container>
|
||||
<cache.server.home>${containers.home}/${cache.server.container}</cache.server.home>
|
||||
<cache.server>legacy-datagrid</cache.server>
|
||||
|
||||
<cache.server.jboss.cache-authorization-disabled>true</cache.server.jboss.cache-authorization-disabled>
|
||||
<cache.server.jboss.jdg-transactions-enabled>true</cache.server.jboss.jdg-transactions-enabled>
|
||||
<cache.server.jboss.groupId>org.infinispan.server</cache.server.jboss.groupId>
|
||||
<cache.server.jboss.artifactId>infinispan-server</cache.server.jboss.artifactId>
|
||||
<cache.server.jboss.version>${jdg.version}</cache.server.jboss.version>
|
||||
<cache.server.jboss.unpacked.folder.name>${cache.server.jboss.artifactId}-${jdg.version}</cache.server.jboss.unpacked.folder.name>
|
||||
<cache.server.legacy.groupId>com.redhat</cache.server.legacy.groupId>
|
||||
<cache.server.legacy.artifactId>datagrid</cache.server.legacy.artifactId>
|
||||
<cache.server.legacy.version>7.3.8</cache.server.legacy.version><!--9.4.18.Final-redhat-00001-->
|
||||
<cache.server.legacy.unpacked.folder.name>jboss-datagrid-${cache.server.legacy.version}-server</cache.server.legacy.unpacked.folder.name>
|
||||
|
||||
<cache.server.legacy.cache-authorization-disabled>true</cache.server.legacy.cache-authorization-disabled>
|
||||
<cache.server.legacy.jdg-transactions-enabled>true</cache.server.legacy.jdg-transactions-enabled>
|
||||
<cache.server.worker.io-threads>${cache.default.worker.io-threads}</cache.server.worker.io-threads>
|
||||
<cache.server.worker.task-max-threads>${cache.default.worker.task-max-threads}</cache.server.worker.task-max-threads>
|
||||
</properties>
|
||||
|
@ -59,9 +57,9 @@
|
|||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>${cache.server.jboss.groupId}</groupId>
|
||||
<artifactId>${cache.server.jboss.artifactId}</artifactId>
|
||||
<version>${cache.server.jboss.version}</version>
|
||||
<groupId>${cache.server.legacy.groupId}</groupId>
|
||||
<artifactId>${cache.server.legacy.artifactId}</artifactId>
|
||||
<version>${cache.server.legacy.version}</version>
|
||||
<type>zip</type>
|
||||
<classifier>bin</classifier>
|
||||
<outputDirectory>${containers.home}</outputDirectory>
|
|
@ -0,0 +1 @@
|
|||
This file is to mark this Maven project as a valid option for building cache server artifact
|
|
@ -20,29 +20,25 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<parent>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-jboss</artifactId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-legacy</artifactId>
|
||||
<version>14.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>integration-arquillian-servers-cache-server-infinispan</artifactId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-legacy-infinispan</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Cache Server - JBoss - Infinispan</name>
|
||||
<name>Keycloak Arquillian Integration TestSuite - Cache Server - Legacy Infinispan</name>
|
||||
|
||||
<properties>
|
||||
<cache.server>infinispan</cache.server>
|
||||
<cache.server.container>cache-server-${cache.server}</cache.server.container>
|
||||
<cache.server.home>${containers.home}/${cache.server.container}</cache.server.home>
|
||||
<cache.server>legacy-infinispan</cache.server>
|
||||
|
||||
<cache.server.jboss.cache-authorization-disabled>true</cache.server.jboss.cache-authorization-disabled>
|
||||
<cache.server.jboss.jdg-transactions-enabled>false</cache.server.jboss.jdg-transactions-enabled>
|
||||
<cache.server.jboss.groupId>org.infinispan.server</cache.server.jboss.groupId>
|
||||
<cache.server.jboss.artifactId>infinispan-server</cache.server.jboss.artifactId>
|
||||
<!-- This version is here temporarily. It should be updated to use the ${infinispan.version}, however latest infinispan-server
|
||||
is not based on Wildfly (and does not work with Arquillian ManagedDeployableContainer) -->
|
||||
<cache.server.jboss.version>9.4.18.Final</cache.server.jboss.version>
|
||||
<cache.server.jboss.unpacked.folder.name>${cache.server.jboss.artifactId}-${cache.server.jboss.version}</cache.server.jboss.unpacked.folder.name>
|
||||
<cache.server.legacy.groupId>org.infinispan.server</cache.server.legacy.groupId>
|
||||
<cache.server.legacy.artifactId>infinispan-server</cache.server.legacy.artifactId>
|
||||
<cache.server.legacy.version>9.4.21.Final</cache.server.legacy.version>
|
||||
<cache.server.legacy.unpacked.folder.name>${cache.server.legacy.artifactId}-${cache.server.legacy.version}</cache.server.legacy.unpacked.folder.name>
|
||||
|
||||
<cache.server.legacy.cache-authorization-disabled>true</cache.server.legacy.cache-authorization-disabled>
|
||||
<cache.server.legacy.jdg-transactions-enabled>false</cache.server.legacy.jdg-transactions-enabled>
|
||||
<cache.server.worker.io-threads>${cache.default.worker.io-threads}</cache.server.worker.io-threads>
|
||||
<cache.server.worker.task-max-threads>${cache.default.worker.task-max-threads}</cache.server.worker.task-max-threads>
|
||||
</properties>
|
||||
|
@ -60,7 +56,7 @@
|
|||
<goal>wget</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<url>http://downloads.jboss.org/infinispan/${cache.server.jboss.version}/infinispan-server-${cache.server.jboss.version}.zip</url>
|
||||
<url>https://downloads.jboss.org/infinispan/${cache.server.legacy.version}/infinispan-server-${cache.server.legacy.version}.zip</url>
|
||||
<unpack>true</unpack>
|
||||
<outputDirectory>${containers.home}</outputDirectory>
|
||||
</configuration>
|
|
@ -0,0 +1 @@
|
|||
This file is to mark this Maven project as a valid option for building cache server artifact
|
|
@ -25,22 +25,25 @@
|
|||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>integration-arquillian-servers-cache-server-jboss</artifactId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-legacy</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Cache Server - JBoss Family</name>
|
||||
<name>Keycloak Arquillian Integration TestSuite - Cache Server - Legacy</name>
|
||||
|
||||
<properties>
|
||||
<common.resources>${project.parent.basedir}/common</common.resources>
|
||||
<assembly.xml>${project.parent.basedir}/assembly.xml</assembly.xml>
|
||||
<cache.server.jboss.home>${containers.home}/${cache.server.jboss.unpacked.folder.name}</cache.server.jboss.home>
|
||||
<cache.server.jboss.cache-authorization-disabled>true</cache.server.jboss.cache-authorization-disabled>
|
||||
<cache.server.jboss.jdg-transactions-enabled>true</cache.server.jboss.jdg-transactions-enabled>
|
||||
|
||||
<cache.server.legacy.home>${containers.home}/${cache.server.legacy.unpacked.folder.name}</cache.server.legacy.home>
|
||||
|
||||
<cache.server.legacy.cache-authorization-disabled>true</cache.server.legacy.cache-authorization-disabled>
|
||||
<cache.server.legacy.jdg-transactions-enabled>true</cache.server.legacy.jdg-transactions-enabled>
|
||||
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
|
||||
<profile>
|
||||
<id>cache-server-jboss-submodules</id>
|
||||
<id>cache-server-legacy-submodules</id>
|
||||
<activation>
|
||||
<file>
|
||||
<exists>src</exists>
|
||||
|
@ -59,12 +62,11 @@
|
|||
<configuration>
|
||||
<rules>
|
||||
<requireProperty>
|
||||
<property>cache.server</property>
|
||||
<property>cache.server.jboss.cache-authorization-enabled</property>
|
||||
<property>cache.server.jboss.groupId</property>
|
||||
<property>cache.server.jboss.artifactId</property>
|
||||
<property>cache.server.jboss.version</property>
|
||||
<property>cache.server.jboss.unpacked.folder.name</property>
|
||||
<property>cache.server.legacy.cache-authorization-enabled</property>
|
||||
<property>cache.server.legacy.groupId</property>
|
||||
<property>cache.server.legacy.artifactId</property>
|
||||
<property>cache.server.legacy.version</property>
|
||||
<property>cache.server.legacy.unpacked.folder.name</property>
|
||||
</requireProperty>
|
||||
</rules>
|
||||
</configuration>
|
||||
|
@ -87,7 +89,7 @@
|
|||
|
||||
<!-- Configure dc-0 site in file clustered-1.xml -->
|
||||
<transformationSet>
|
||||
<dir>${cache.server.jboss.home}/standalone/configuration</dir>
|
||||
<dir>${cache.server.legacy.home}/standalone/configuration</dir>
|
||||
<includes>
|
||||
<include>clustered.xml</include>
|
||||
</includes>
|
||||
|
@ -103,10 +105,10 @@
|
|||
</parameter>
|
||||
<parameter>
|
||||
<name>transactions.enabled</name>
|
||||
<value>${cache.server.jboss.jdg-transactions-enabled}</value>
|
||||
<value>${cache.server.legacy.jdg-transactions-enabled}</value>
|
||||
</parameter>
|
||||
</parameters>
|
||||
<outputDir>${cache.server.jboss.home}/standalone/configuration</outputDir>
|
||||
<outputDir>${cache.server.legacy.home}/standalone/configuration</outputDir>
|
||||
<fileMappers>
|
||||
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
|
||||
<pattern>^(.*)\.xml$</pattern>
|
||||
|
@ -117,7 +119,7 @@
|
|||
|
||||
<!-- Configure dc-1 site in file clustered-2.xml -->
|
||||
<transformationSet>
|
||||
<dir>${cache.server.jboss.home}/standalone/configuration</dir>
|
||||
<dir>${cache.server.legacy.home}/standalone/configuration</dir>
|
||||
<includes>
|
||||
<include>clustered.xml</include>
|
||||
</includes>
|
||||
|
@ -133,10 +135,10 @@
|
|||
</parameter>
|
||||
<parameter>
|
||||
<name>transactions.enabled</name>
|
||||
<value>${cache.server.jboss.jdg-transactions-enabled}</value>
|
||||
<value>${cache.server.legacy.jdg-transactions-enabled}</value>
|
||||
</parameter>
|
||||
</parameters>
|
||||
<outputDir>${cache.server.jboss.home}/standalone/configuration</outputDir>
|
||||
<outputDir>${cache.server.legacy.home}/standalone/configuration</outputDir>
|
||||
<fileMappers>
|
||||
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
|
||||
<pattern>^(.*)\.xml$</pattern>
|
||||
|
@ -156,17 +158,17 @@
|
|||
<goal>transform</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${cache.server.jboss.cache-authorization-disabled}</skip>
|
||||
<skip>${cache.server.legacy.cache-authorization-disabled}</skip>
|
||||
<transformationSets>
|
||||
<!-- Configure authorization in files clustered-__dc__.xml -->
|
||||
<transformationSet>
|
||||
<dir>${cache.server.jboss.home}/standalone/configuration</dir>
|
||||
<dir>${cache.server.legacy.home}/standalone/configuration</dir>
|
||||
<includes>
|
||||
<include>clustered-1.xml</include>
|
||||
<include>clustered-2.xml</include>
|
||||
</includes>
|
||||
<stylesheet>${common.resources}/cache-authorization.xsl</stylesheet>
|
||||
<outputDir>${cache.server.jboss.home}/standalone/configuration</outputDir>
|
||||
<outputDir>${cache.server.legacy.home}/standalone/configuration</outputDir>
|
||||
</transformationSet>
|
||||
</transformationSets>
|
||||
</configuration>
|
||||
|
@ -181,13 +183,13 @@
|
|||
<configuration>
|
||||
<transformationSets>
|
||||
<transformationSet>
|
||||
<dir>${cache.server.jboss.home}/standalone/configuration</dir>
|
||||
<dir>${cache.server.legacy.home}/standalone/configuration</dir>
|
||||
<includes>
|
||||
<include>standalone.xml</include>
|
||||
<include>standalone-ha.xml</include>
|
||||
</includes>
|
||||
<stylesheet>${common.resources}/io.xsl</stylesheet>
|
||||
<outputDir>${cache.server.jboss.home}/standalone/configuration</outputDir>
|
||||
<outputDir>${cache.server.legacy.home}/standalone/configuration</outputDir>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>worker.io-threads</name>
|
||||
|
@ -215,7 +217,7 @@
|
|||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${cache.server.jboss.home}/standalone/configuration</outputDirectory>
|
||||
<outputDirectory>${cache.server.legacy.home}/standalone/configuration</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${common.resources}</directory>
|
||||
|
@ -234,11 +236,30 @@
|
|||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${cache.server.jboss.home}/standalone-dc-2/deployments</outputDirectory>
|
||||
<outputDirectory>${cache.server.legacy.home}/standalone-dc-2/deployments</outputDirectory>
|
||||
<includeEmptyDirs>true</includeEmptyDirs>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${cache.server.jboss.home}/standalone/deployments</directory>
|
||||
<directory>${cache.server.legacy.home}/standalone/deployments</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<overwrite>true</overwrite>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-server-keystore</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${cache.server.legacy.home}/standalone/configuration</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${common.resources}</directory>
|
||||
<includes>
|
||||
<include>server.jks</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<overwrite>true</overwrite>
|
||||
|
@ -271,17 +292,18 @@
|
|||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>cache-server-infinispan</id>
|
||||
<id>cache-server-legacy-infinispan</id>
|
||||
<modules>
|
||||
<module>infinispan</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>cache-server-jdg</id>
|
||||
<id>cache-server-legacy-datagrid</id>
|
||||
<modules>
|
||||
<module>jdg</module>
|
||||
<module>datagrid</module>
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
|
||||
</project>
|
|
@ -27,15 +27,11 @@
|
|||
|
||||
<artifactId>integration-arquillian-servers-cache-server</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Cache Server</name>
|
||||
|
||||
<properties>
|
||||
<auth.server.worker.io-threads>${jboss.default.worker.io-threads}</auth.server.worker.io-threads>
|
||||
<auth.server.worker.task-max-threads>${jboss.default.worker.task-max-threads}</auth.server.worker.task-max-threads>
|
||||
</properties>
|
||||
<name>Keycloak Arquillian Integration TestSuite - Cache Server</name>
|
||||
|
||||
<modules>
|
||||
<module>jboss</module>
|
||||
<module>infinispan</module>
|
||||
<module>legacy</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -37,15 +37,13 @@
|
|||
<eap71.version>7.1.5.GA-redhat-00002</eap71.version>
|
||||
<jboss.as.version>7.1.1.Final</jboss.as.version>
|
||||
|
||||
<!-- cache server versions -->
|
||||
<jdg.version>9.4.6.Final-redhat-00002</jdg.version><!-- JDG 7.3.0 -->
|
||||
|
||||
<jboss.default.worker.io-threads>16</jboss.default.worker.io-threads>
|
||||
<jboss.default.worker.task-max-threads>128</jboss.default.worker.task-max-threads>
|
||||
<jboss.default.http.max-connections>500</jboss.default.http.max-connections>
|
||||
|
||||
<cache.default.worker.io-threads>2</cache.default.worker.io-threads>
|
||||
<cache.default.worker.task-max-threads>4</cache.default.worker.task-max-threads>
|
||||
<hotrod.sasl.mechanism>DIGEST-MD5</hotrod.sasl.mechanism>
|
||||
|
||||
<jboss.cli.executable>jboss-cli.sh</jboss.cli.executable>
|
||||
|
||||
|
|
|
@ -259,11 +259,15 @@ public class AuthServerTestEnricher {
|
|||
});
|
||||
|
||||
containers.stream()
|
||||
.filter(c -> c.getQualifier().startsWith("cache-server-cross-dc-"))
|
||||
.filter(c -> c.getQualifier().startsWith("cache-server-"))
|
||||
.sorted((a, b) -> a.getQualifier().compareTo(b.getQualifier()))
|
||||
.forEach(containerInfo -> {
|
||||
int prefixSize = "cache-server-cross-dc-".length();
|
||||
|
||||
log.info(String.format("cache container: %s", containerInfo.getQualifier()));
|
||||
|
||||
int prefixSize = containerInfo.getQualifier().lastIndexOf("-") + 1;
|
||||
int dcIndex = Integer.parseInt(containerInfo.getQualifier().substring(prefixSize)) - 1;
|
||||
|
||||
suiteContext.addCacheServerInfo(dcIndex, containerInfo);
|
||||
});
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.lang.reflect.Field;
|
|||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Parameter;
|
||||
import java.net.MalformedURLException;
|
||||
import java.rmi.UnmarshalException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
|
@ -41,6 +42,7 @@ import org.keycloak.connections.infinispan.InfinispanConnectionProvider;
|
|||
import org.keycloak.common.util.Retry;
|
||||
import org.keycloak.testsuite.arquillian.annotation.JmxInfinispanCacheStatistics;
|
||||
import org.keycloak.testsuite.arquillian.annotation.JmxInfinispanChannelStatistics;
|
||||
import org.keycloak.testsuite.arquillian.containers.InfinispanServerDeployableContainer;
|
||||
import org.keycloak.testsuite.arquillian.jmx.JmxConnectorRegistry;
|
||||
import org.keycloak.testsuite.arquillian.undertow.KeycloakOnUndertow;
|
||||
import org.keycloak.testsuite.crossdc.DC;
|
||||
|
@ -123,8 +125,9 @@ public class CacheStatisticsControllerEnricher implements TestEnricher {
|
|||
|
||||
private InfinispanStatistics getJGroupsChannelStatistics(JmxInfinispanChannelStatistics annotation) throws MalformedObjectNameException, IOException, MalformedURLException {
|
||||
ObjectName mbeanName = new ObjectName(String.format(
|
||||
"%s:type=%s,cluster=\"%s\"",
|
||||
"%s:%stype=%s,cluster=\"%s\"",
|
||||
annotation.domain().isEmpty() ? getDefaultDomain(annotation.dc().getDcIndex(), annotation.dcNodeIndex()) : InfinispanConnectionProvider.JMX_DOMAIN,
|
||||
isLegacyInfinispan() ? "" : "manager=\"default\",",
|
||||
annotation.type(),
|
||||
annotation.cluster()
|
||||
));
|
||||
|
@ -182,7 +185,11 @@ public class CacheStatisticsControllerEnricher implements TestEnricher {
|
|||
}
|
||||
|
||||
//cache-server
|
||||
return InfinispanConnectionProvider.JMX_DOMAIN;
|
||||
return isLegacyInfinispan() ? "jboss.datagrid-infinispan" : "org.infinispan";
|
||||
}
|
||||
|
||||
private boolean isLegacyInfinispan() { // infinispan 9 or lower
|
||||
return Boolean.parseBoolean(System.getProperty("cache.server.legacy", "false"));
|
||||
}
|
||||
|
||||
private Supplier<MBeanServerConnection> getJmxServerConnection(JmxInfinispanCacheStatistics annotation) throws MalformedURLException {
|
||||
|
@ -200,6 +207,19 @@ public class CacheStatisticsControllerEnricher implements TestEnricher {
|
|||
? Integer.valueOf(container.getContainerConfiguration().getContainerProperties().get("managementPort"))
|
||||
: 9990;
|
||||
} else {
|
||||
Container container = suiteContext.get().getCacheServersInfo().get(0).getArquillianContainer();
|
||||
if (container.getDeployableContainer() instanceof InfinispanServerDeployableContainer) {
|
||||
// jmx connection to infinispan server
|
||||
return () -> {
|
||||
try {
|
||||
return jmxConnectorRegistry.get().getConnection(
|
||||
((InfinispanServerDeployableContainer) container.getDeployableContainer()).getJMXServiceURL()
|
||||
).getMBeanServerConnection();
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
};
|
||||
}
|
||||
host = annotation.host().isEmpty()
|
||||
? System.getProperty((annotation.hostProperty().isEmpty()
|
||||
? "keycloak.connectionsInfinispan.remoteStoreServer"
|
||||
|
@ -239,6 +259,19 @@ public class CacheStatisticsControllerEnricher implements TestEnricher {
|
|||
? Integer.valueOf(container.getContainerConfiguration().getContainerProperties().get("managementPort"))
|
||||
: 9990;
|
||||
} else {
|
||||
Container container = suiteContext.get().getCacheServersInfo().get(0).getArquillianContainer();
|
||||
if (container.getDeployableContainer() instanceof InfinispanServerDeployableContainer) {
|
||||
// jmx connection to infinispan server
|
||||
return () -> {
|
||||
try {
|
||||
return jmxConnectorRegistry.get().getConnection(
|
||||
((InfinispanServerDeployableContainer) container.getDeployableContainer()).getJMXServiceURL()
|
||||
).getMBeanServerConnection();
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
};
|
||||
}
|
||||
host = annotation.host().isEmpty()
|
||||
? System.getProperty((annotation.hostProperty().isEmpty()
|
||||
? "keycloak.connectionsInfinispan.remoteStoreServer"
|
||||
|
@ -384,7 +417,7 @@ public class CacheStatisticsControllerEnricher implements TestEnricher {
|
|||
public void reset() {
|
||||
try {
|
||||
getConnection().invoke(getMbeanName(), "resetStats", new Object[] {}, new String[] {});
|
||||
} catch (NotSerializableException ex) {
|
||||
} catch (NotSerializableException | UnmarshalException ex) {
|
||||
// Ignore return value not serializable, the invocation has already done its job
|
||||
} catch (IOException | InstanceNotFoundException | MBeanException | ReflectionException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
* Copyright 2019 Red Hat, Inc. and/or its affiliates
|
||||
* and other contributors as indicated by the @author tags.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.arquillian.containers;
|
||||
|
||||
import java.io.File;
|
||||
import org.apache.commons.validator.routines.IntegerValidator;
|
||||
import org.jboss.arquillian.container.spi.ConfigurationException;
|
||||
import org.jboss.arquillian.container.spi.client.container.ContainerConfiguration;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author tkyjovsk
|
||||
*/
|
||||
public class InfinispanServerConfiguration implements ContainerConfiguration {
|
||||
|
||||
private String infinispanHome;
|
||||
private String serverConfig;
|
||||
private Integer portOffset;
|
||||
private Integer managementPort;
|
||||
private String additionalParameters;
|
||||
|
||||
@Override
|
||||
public void validate() throws ConfigurationException {
|
||||
if (infinispanHome == null) {
|
||||
throw new ConfigurationException("`infinispanHome` cannot be null");
|
||||
}
|
||||
if (!new File(infinispanHome).isDirectory()) {
|
||||
throw new ConfigurationException(String.format("`infinispanHome` is not a valid directory: '%s'", infinispanHome));
|
||||
}
|
||||
|
||||
if (portOffset == null) {
|
||||
portOffset = 0;
|
||||
}
|
||||
if (!IntegerValidator.getInstance().isInRange(portOffset, 1000, 64535)) {
|
||||
throw new ConfigurationException(String.format("Invalid portOffset: %s", portOffset));
|
||||
}
|
||||
|
||||
if (managementPort == null) {
|
||||
managementPort = 9990 + portOffset;
|
||||
}
|
||||
if (!IntegerValidator.getInstance().isInRange(managementPort, 1000, 65535)) {
|
||||
throw new ConfigurationException(String.format("Invalid managementPort: %s", managementPort));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public String getInfinispanHome() {
|
||||
return infinispanHome;
|
||||
}
|
||||
|
||||
public void setInfinispanHome(String infinispanHome) {
|
||||
this.infinispanHome = infinispanHome;
|
||||
}
|
||||
|
||||
public String getServerConfig() {
|
||||
return serverConfig;
|
||||
}
|
||||
|
||||
public void setServerConfig(String serverConfig) {
|
||||
this.serverConfig = serverConfig;
|
||||
}
|
||||
|
||||
public Integer getPortOffset() {
|
||||
return portOffset;
|
||||
}
|
||||
|
||||
public void setPortOffset(Integer portOffset) {
|
||||
this.portOffset = portOffset;
|
||||
}
|
||||
|
||||
public String getAdditionalParameters() {
|
||||
return additionalParameters;
|
||||
}
|
||||
|
||||
public void setAdditionalParameters(String additionalParameters) {
|
||||
this.additionalParameters = additionalParameters;
|
||||
}
|
||||
|
||||
public Integer getManagementPort() {
|
||||
return managementPort;
|
||||
}
|
||||
|
||||
public void setManagementPort(Integer managementPort) {
|
||||
this.managementPort = managementPort;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,246 @@
|
|||
/*
|
||||
* Copyright 2019 Red Hat, Inc. and/or its affiliates
|
||||
* and other contributors as indicated by the @author tags.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.arquillian.containers;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.ConnectException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.management.remote.JMXServiceURL;
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSession;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
import org.jboss.arquillian.container.spi.client.container.DeployableContainer;
|
||||
import org.jboss.arquillian.container.spi.client.container.DeploymentException;
|
||||
import org.jboss.arquillian.container.spi.client.container.LifecycleException;
|
||||
import org.jboss.arquillian.container.spi.client.protocol.ProtocolDescription;
|
||||
import org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData;
|
||||
import org.jboss.logging.Logger;
|
||||
import org.jboss.shrinkwrap.api.Archive;
|
||||
import org.jboss.shrinkwrap.descriptor.api.Descriptor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author tkyjovsk
|
||||
*/
|
||||
public class InfinispanServerDeployableContainer implements DeployableContainer<InfinispanServerConfiguration> {
|
||||
|
||||
protected static final Logger log = Logger.getLogger(InfinispanServerDeployableContainer.class);
|
||||
|
||||
InfinispanServerConfiguration configuration;
|
||||
private Process infinispanServerProcess;
|
||||
|
||||
private File pidFile;
|
||||
private JMXServiceURL jmxServiceURL;
|
||||
|
||||
private static final Boolean CACHE_SERVER_AUTH = Boolean.parseBoolean(System.getProperty("cache.server.auth", "false"));
|
||||
|
||||
@Override
|
||||
public Class<InfinispanServerConfiguration> getConfigurationClass() {
|
||||
return InfinispanServerConfiguration.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup(InfinispanServerConfiguration configuration) {
|
||||
this.configuration = configuration;
|
||||
pidFile = new File(configuration.getInfinispanHome(), "bin/server.pid");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() throws LifecycleException {
|
||||
List<String> commands = new ArrayList<>();
|
||||
commands.add("./server.sh");
|
||||
|
||||
if (configuration.getServerConfig() != null) {
|
||||
commands.add("-c");
|
||||
commands.add(configuration.getServerConfig());
|
||||
}
|
||||
|
||||
if (configuration.getPortOffset() != null && configuration.getPortOffset() > 0) {
|
||||
commands.add("-o");
|
||||
commands.add(configuration.getPortOffset().toString());
|
||||
}
|
||||
|
||||
commands.add(String.format("-Dcom.sun.management.jmxremote.port=%s", configuration.getManagementPort()));
|
||||
commands.add("-Dcom.sun.management.jmxremote.authenticate=false");
|
||||
commands.add("-Dcom.sun.management.jmxremote.ssl=false");
|
||||
|
||||
if (configuration.getAdditionalParameters() != null) {
|
||||
commands.addAll(Arrays.asList(configuration.getAdditionalParameters().split("\\s+")));
|
||||
}
|
||||
|
||||
ProcessBuilder pb = new ProcessBuilder(commands);
|
||||
pb = pb.directory(new File(configuration.getInfinispanHome(), "/bin")).inheritIO().redirectErrorStream(true);
|
||||
pb.environment().put("LAUNCH_ISPN_IN_BACKGROUND", "false");
|
||||
pb.environment().put("ISPN_PIDFILE", pidFile.getAbsolutePath());
|
||||
String javaHome = System.getProperty("cache.server.java.home");
|
||||
if (javaHome != null) {
|
||||
pb.environment().put("JAVA_HOME", javaHome);
|
||||
}
|
||||
try {
|
||||
log.info("Starting Infinispan server");
|
||||
log.info(configuration.getInfinispanHome());
|
||||
log.info(commands);
|
||||
infinispanServerProcess = pb.start();
|
||||
|
||||
trustAllCertificates();
|
||||
|
||||
long startTimeMillis = System.currentTimeMillis();
|
||||
long startupTimeoutMillis = 30 * 1000;
|
||||
URL consoleURL = new URL(String.format("%s://localhost:%s/console/",
|
||||
CACHE_SERVER_AUTH ? "https" : "http",
|
||||
11222 + configuration.getPortOffset()));
|
||||
|
||||
while (true) {
|
||||
Thread.sleep(1000);
|
||||
if (System.currentTimeMillis() > startTimeMillis + startupTimeoutMillis) {
|
||||
stop();
|
||||
throw new LifecycleException("Infinispan server startup timed out.");
|
||||
}
|
||||
|
||||
HttpURLConnection connection = (HttpURLConnection) consoleURL.openConnection();
|
||||
connection.setReadTimeout(1000);
|
||||
connection.setConnectTimeout(1000);
|
||||
try {
|
||||
connection.connect();
|
||||
if (connection.getResponseCode() == 200) {
|
||||
break;
|
||||
}
|
||||
connection.disconnect();
|
||||
} catch (ConnectException ex) {
|
||||
// ignoring
|
||||
}
|
||||
}
|
||||
|
||||
log.info("Infinispan server started.");
|
||||
|
||||
} catch (IOException ex) {
|
||||
throw new LifecycleException("Unable to start Infinispan server.", ex);
|
||||
} catch (InterruptedException ex) {
|
||||
log.error("Infinispan server startup process interupted.", ex);
|
||||
stop();
|
||||
}
|
||||
}
|
||||
|
||||
private void trustAllCertificates() {
|
||||
|
||||
TrustManager[] trustAllCerts;
|
||||
trustAllCerts = new TrustManager[]{
|
||||
new X509TrustManager() {
|
||||
@Override
|
||||
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkClientTrusted(
|
||||
java.security.cert.X509Certificate[] certs, String authType) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkServerTrusted(
|
||||
java.security.cert.X509Certificate[] certs, String authType) {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Install the all-trusting trust manager
|
||||
try {
|
||||
SSLContext sc = SSLContext.getInstance("SSL");
|
||||
sc.init(null, trustAllCerts, new java.security.SecureRandom());
|
||||
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
|
||||
HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
|
||||
@Override
|
||||
public boolean verify(String arg0, SSLSession arg1) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
} catch (KeyManagementException | NoSuchAlgorithmException e) {
|
||||
throw new RuntimeException("Unable to initialize a 'trust-all' trust manager.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() throws LifecycleException {
|
||||
log.info("Stopping Infinispan server");
|
||||
infinispanServerProcess.destroy();
|
||||
try {
|
||||
infinispanServerProcess.waitFor(10, TimeUnit.SECONDS);
|
||||
} catch (InterruptedException e) {
|
||||
log.info("Unable to stop Infinispan server within timeout. Stopping forcibly.");
|
||||
infinispanServerProcess.destroyForcibly();
|
||||
}
|
||||
log.info("Infinispan server stopped");
|
||||
}
|
||||
|
||||
private long getPID() throws IOException {
|
||||
if (pidFile == null) {
|
||||
throw new IllegalStateException(String.format("Unable to find PID file '%s'", pidFile));
|
||||
}
|
||||
return Long.parseLong(Files.readAllLines(pidFile.toPath()).get(0).trim());
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach to a local Infinispan JVM, launch a management-agent, and return
|
||||
* its JMXServiceURL.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public JMXServiceURL getJMXServiceURL() throws IOException {
|
||||
if (jmxServiceURL == null) {
|
||||
jmxServiceURL = new JMXServiceURL(String.format("service:jmx:rmi:///jndi/rmi://localhost:%s/jmxrmi", configuration.getManagementPort()));
|
||||
}
|
||||
return jmxServiceURL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProtocolDescription getDefaultProtocol() {
|
||||
return ProtocolDescription.DEFAULT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProtocolMetaData deploy(Archive<?> archv) throws DeploymentException {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undeploy(Archive<?> archv) throws DeploymentException {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deploy(Descriptor d) throws DeploymentException {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undeploy(Descriptor d) throws DeploymentException {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
}
|
|
@ -43,7 +43,8 @@ public class MultipleContainersExtension implements LoadableExtension {
|
|||
|
||||
logger.info("Multiple containers extension registering.");
|
||||
|
||||
builder.service(DeployableContainer.class, KeycloakQuarkusServerDeployableContainer.class);
|
||||
builder.service(DeployableContainer.class, KeycloakQuarkusServerDeployableContainer.class)
|
||||
.service(DeployableContainer.class, InfinispanServerDeployableContainer.class);
|
||||
|
||||
builder.context(ContainerContextImpl.class).context(DeploymentContextImpl.class);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.keycloak.testsuite.utils.arquillian.ContainerConstants;
|
|||
|
||||
import org.keycloak.testsuite.crossdc.ServerSetup;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.keycloak.testsuite.adapter.AbstractServletsAdapterTest.samlServletDeployment;
|
||||
|
||||
/**
|
||||
|
@ -46,7 +46,7 @@ public class SAMLAdapterCrossDCTest extends AbstractSAMLAdapterClusteredTest {
|
|||
|
||||
@BeforeClass
|
||||
public static void checkCrossDcTest() {
|
||||
Assume.assumeThat("Seems not to be running cross-DC tests", System.getProperty("cache.server"), not(is("undefined")));
|
||||
Assume.assumeThat("Seems not to be running cross-DC tests", System.getProperty("cache.server"), is(notNullValue()));
|
||||
}
|
||||
|
||||
private static final String SESSION_CACHE_NAME = EmployeeServletDistributable.DEPLOYMENT_NAME + "-cache";
|
||||
|
|
|
@ -302,9 +302,9 @@
|
|||
|
||||
<!-- Cross DC. Node numbering is [centre #].[node #] -->
|
||||
<group qualifier="auth-server-jboss-cross-dc">
|
||||
<container qualifier="cache-server-cross-dc-1" mode="manual" >
|
||||
<container qualifier="cache-server-legacy-cross-dc-1" mode="manual" >
|
||||
<configuration>
|
||||
<property name="enabled">${auth.server.crossdc} && ! ${cache.server.lifecycle.skip}</property>
|
||||
<property name="enabled">${auth.server.crossdc} && ! ${cache.server.lifecycle.skip} && ${cache.server.legacy}</property>
|
||||
<property name="adapterImplClass">org.jboss.as.arquillian.container.managed.ManagedDeployableContainer</property>
|
||||
<property name="jbossHome">${cache.server.home}</property>
|
||||
<property name="serverConfig">clustered-1.xml</property>
|
||||
|
@ -328,12 +328,13 @@
|
|||
<property name="outputToConsole">${cache.server.console.output}</property>
|
||||
<property name="managementPort">${cache.server.management.port}</property>
|
||||
<property name="startupTimeoutInSeconds">${auth.server.jboss.startup.timeout}</property>
|
||||
<property name="javaHome">${cache.server.java.home}</property>
|
||||
</configuration>
|
||||
</container>
|
||||
|
||||
<container qualifier="cache-server-cross-dc-2" mode="manual" >
|
||||
<container qualifier="cache-server-legacy-cross-dc-2" mode="manual" >
|
||||
<configuration>
|
||||
<property name="enabled">${auth.server.crossdc} && ! ${cache.server.lifecycle.skip}</property>
|
||||
<property name="enabled">${auth.server.crossdc} && ! ${cache.server.lifecycle.skip} && ${cache.server.legacy}</property>
|
||||
<property name="adapterImplClass">org.jboss.as.arquillian.container.managed.ManagedDeployableContainer</property>
|
||||
<property name="jbossHome">${cache.server.home}</property>
|
||||
<property name="setupCleanServerBaseDir">true</property>
|
||||
|
@ -359,6 +360,36 @@
|
|||
<property name="outputToConsole">${cache.server.console.output}</property>
|
||||
<property name="managementPort">${cache.server.2.management.port}</property>
|
||||
<property name="startupTimeoutInSeconds">${auth.server.jboss.startup.timeout}</property>
|
||||
<property name="javaHome">${cache.server.java.home}</property>
|
||||
</configuration>
|
||||
</container>
|
||||
|
||||
<container qualifier="cache-server-cross-dc-1" mode="manual" >
|
||||
<configuration>
|
||||
<property name="enabled">${auth.server.crossdc} && ! ${cache.server.lifecycle.skip} && ! ${cache.server.legacy}</property>
|
||||
<property name="adapterImplClass">org.keycloak.testsuite.arquillian.containers.InfinispanServerDeployableContainer</property>
|
||||
<property name="infinispanHome">${cache.server.home}-dc1</property>
|
||||
<property name="serverConfig">infinispan-xsite.xml</property>
|
||||
<property name="portOffset">${cache.server.1.port.offset}</property>
|
||||
<property name="managementPort">${cache.server.management.port}</property>
|
||||
<property name="additionalParameters">
|
||||
-Djgroups.udp.mcast_port=46698
|
||||
-Djgroups.tcpping.initial_hosts=127.0.0.1[8810],127.0.0.1[9810]
|
||||
</property>
|
||||
</configuration>
|
||||
</container>
|
||||
<container qualifier="cache-server-cross-dc-2" mode="manual" >
|
||||
<configuration>
|
||||
<property name="enabled">${auth.server.crossdc} && ! ${cache.server.lifecycle.skip} && ! ${cache.server.legacy}</property>
|
||||
<property name="adapterImplClass">org.keycloak.testsuite.arquillian.containers.InfinispanServerDeployableContainer</property>
|
||||
<property name="infinispanHome">${cache.server.home}-dc2</property>
|
||||
<property name="serverConfig">infinispan-xsite.xml</property>
|
||||
<property name="portOffset">${cache.server.2.port.offset}</property>
|
||||
<property name="managementPort">${cache.server.2.management.port}</property>
|
||||
<property name="additionalParameters">
|
||||
-Djgroups.udp.mcast_port=47698
|
||||
-Djgroups.tcpping.initial_hosts=127.0.0.1[8810],127.0.0.1[9810]
|
||||
</property>
|
||||
</configuration>
|
||||
</container>
|
||||
|
||||
|
|
|
@ -125,14 +125,14 @@
|
|||
<app.server.jvm.args.extra/>
|
||||
<tomcat.javax.net.ssl.properties/>
|
||||
|
||||
<cache.server>undefined</cache.server>
|
||||
<cache.server.container>cache-server-${cache.server}</cache.server.container>
|
||||
<cache.server.home>${containers.home}/${cache.server.container}</cache.server.home>
|
||||
<cache.server.legacy>false</cache.server.legacy>
|
||||
<cache.server.home>${containers.home}/cache-server-${cache.server}</cache.server.home>
|
||||
<cache.server.1.port.offset>1010</cache.server.1.port.offset>
|
||||
<cache.server.management.port>11000</cache.server.management.port>
|
||||
<cache.server.2.port.offset>2010</cache.server.2.port.offset>
|
||||
<cache.server.2.management.port>12000</cache.server.2.management.port>
|
||||
<cache.server.console.output>true</cache.server.console.output>
|
||||
<cache.server.auth>false</cache.server.auth>
|
||||
|
||||
<!--
|
||||
~ Definition of default JVM parameters for all modular JDKs. See:
|
||||
|
@ -651,13 +651,15 @@
|
|||
<cache.server.lifecycle.skip>${cache.server.lifecycle.skip}</cache.server.lifecycle.skip>
|
||||
|
||||
<cache.server>${cache.server}</cache.server>
|
||||
<cache.server.legacy>${cache.server.legacy}</cache.server.legacy>
|
||||
<cache.server.1.port.offset>${cache.server.1.port.offset}</cache.server.1.port.offset>
|
||||
<cache.server.container>${cache.server.container}</cache.server.container>
|
||||
<cache.server.home>${cache.server.home}</cache.server.home>
|
||||
<cache.server.console.output>${cache.server.console.output}</cache.server.console.output>
|
||||
<cache.server.management.port>${cache.server.management.port}</cache.server.management.port>
|
||||
<cache.server.2.port.offset>${cache.server.2.port.offset}</cache.server.2.port.offset>
|
||||
<cache.server.2.management.port>${cache.server.2.management.port}</cache.server.2.management.port>
|
||||
<cache.server.java.home>${cache.server.java.home}</cache.server.java.home>
|
||||
<cache.server.auth>${cache.server.auth}</cache.server.auth>
|
||||
|
||||
<keycloak.connectionsInfinispan.remoteStorePort>${keycloak.connectionsInfinispan.remoteStorePort}</keycloak.connectionsInfinispan.remoteStorePort>
|
||||
<keycloak.connectionsInfinispan.remoteStorePort.2>${keycloak.connectionsInfinispan.remoteStorePort.2}</keycloak.connectionsInfinispan.remoteStorePort.2>
|
||||
|
@ -885,9 +887,8 @@
|
|||
<configuration>
|
||||
<rules>
|
||||
<requireProperty>
|
||||
<property>cache.server.jboss</property>
|
||||
<message>Profile "auth-servers-crossdc-undertow" requires activation of another profile: either "cache-server-infinispan" or "cache-server-jdg".</message>
|
||||
<regex>true</regex>
|
||||
<property>cache.server</property>
|
||||
<message>Profile "auth-servers-crossdc-undertow" requires activation of one of the following profiles: "cache-server-infinispan", "cache-server-datagrid", "cache-server-legacy-infinispan", "cache-server-legacy-datagrid".</message>
|
||||
</requireProperty>
|
||||
</rules>
|
||||
</configuration>
|
||||
|
@ -994,9 +995,8 @@
|
|||
<configuration>
|
||||
<rules>
|
||||
<requireProperty>
|
||||
<property>cache.server.jboss</property>
|
||||
<message>Profile "auth-servers-crossdc-jboss" requires activation of another profile: either "cache-server-infinispan" or "cache-server-jdg".</message>
|
||||
<regex>true</regex>
|
||||
<property>cache.server</property>
|
||||
<message>Profile "auth-servers-crossdc-jboss" requires activation of one of the following profiles: "cache-server-infinispan", "cache-server-datagrid", "cache-server-legacy-infinispan", "cache-server-legacy-datagrid".</message>
|
||||
</requireProperty>
|
||||
<requireProperty>
|
||||
<property>auth.server.jboss</property>
|
||||
|
@ -1069,11 +1069,11 @@
|
|||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>cache-server-infinispan</id>
|
||||
<id>cache-server-legacy-infinispan</id>
|
||||
<properties>
|
||||
<cache.server>infinispan</cache.server>
|
||||
<cache.server>legacy-infinispan</cache.server>
|
||||
<cache.server.legacy>true</cache.server.legacy>
|
||||
<auth.server.crossdc>true</auth.server.crossdc>
|
||||
<cache.server.jboss>true</cache.server.jboss>
|
||||
<cache.server.config.dir>${cache.server.home}/standalone/configuration</cache.server.config.dir>
|
||||
<keycloak.testsuite.logging.pattern>%d{HH:mm:ss,SSS} [%t] %-5p [%c{1.}] %m%n</keycloak.testsuite.logging.pattern>
|
||||
<keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>false</keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>
|
||||
|
@ -1086,6 +1086,142 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-profile-activation</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireProperty>
|
||||
<property>auth.servers.crossdc</property>
|
||||
<message>Profile "cache-server-legacy-infinispan" requires activation of another profile: either "auth-servers-crossdc-undertow" or "auth-servers-crossdc-jboss".</message>
|
||||
</requireProperty>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-cache-server-infinispan</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-legacy-infinispan</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>zip</type>
|
||||
<outputDirectory>${containers.home}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<overWriteIfNewer>true</overWriteIfNewer>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>cache-server-legacy-datagrid</id>
|
||||
<properties>
|
||||
<cache.server>legacy-datagrid</cache.server>
|
||||
<auth.server.crossdc>true</auth.server.crossdc>
|
||||
<cache.server.legacy>true</cache.server.legacy>
|
||||
<cache.server.config.dir>${cache.server.home}/standalone/configuration</cache.server.config.dir>
|
||||
<keycloak.testsuite.logging.pattern>%d{HH:mm:ss,SSS} [%t] %-5p [%c{1.}] %m%n</keycloak.testsuite.logging.pattern>
|
||||
<keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>false</keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>
|
||||
<keycloak.connectionsInfinispan.hotrodProtocolVersion>2.9</keycloak.connectionsInfinispan.hotrodProtocolVersion>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.wildfly.arquillian</groupId>
|
||||
<artifactId>wildfly-arquillian-container-managed</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-profile-activation</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireProperty>
|
||||
<property>auth.servers.crossdc</property>
|
||||
<message>Profile "cache-server-legacy-datagrid" requires activation of another profile: either "auth-servers-crossdc-undertow" or "auth-servers-crossdc-jboss".</message>
|
||||
</requireProperty>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-cache-server-jdg</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-legacy-datagrid</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>zip</type>
|
||||
<outputDirectory>${containers.home}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<overWriteIfNewer>true</overWriteIfNewer>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
|
||||
|
||||
<profile>
|
||||
<id>cache-server-infinispan</id>
|
||||
<properties>
|
||||
<cache.server>infinispan</cache.server>
|
||||
<auth.server.crossdc>true</auth.server.crossdc>
|
||||
<keycloak.testsuite.logging.pattern>%d{HH:mm:ss,SSS} [%t] %-5p [%c{1.}] %m%n</keycloak.testsuite.logging.pattern>
|
||||
<keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>false</keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>
|
||||
<keycloak.connectionsInfinispan.hotrodProtocolVersion>2.9</keycloak.connectionsInfinispan.hotrodProtocolVersion>
|
||||
<skip.clean.second.cache>true</skip.clean.second.cache>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
@ -1114,7 +1250,7 @@
|
|||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-cache-server-infinispan</id>
|
||||
<id>unpack-cache-server-standalone-infinispan</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
|
@ -1123,7 +1259,7 @@
|
|||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-infinispan</artifactId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-infinispan-infinispan</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>zip</type>
|
||||
<outputDirectory>${containers.home}</outputDirectory>
|
||||
|
@ -1134,29 +1270,55 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-cache-server-standalone-infinispan-nodes</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.copy.cache.crossdc.nodes}</skip>
|
||||
<target>
|
||||
<move todir="${cache.server.home}-dc1">
|
||||
<fileset dir="${cache.server.home}"/>
|
||||
</move>
|
||||
<copy todir="${cache.server.home}-dc2">
|
||||
<fileset dir="${cache.server.home}-dc1"/>
|
||||
</copy>
|
||||
|
||||
<chmod dir="${cache.server.home}-dc1/bin" perm="ugo+rx" includes="**/*.sh"/>
|
||||
<chmod dir="${cache.server.home}-dc2/bin" perm="ugo+rx" includes="**/*.sh"/>
|
||||
|
||||
<move file="${cache.server.home}-dc1/server/conf/infinispan-xsite-1.xml"
|
||||
tofile="${cache.server.home}-dc1/server/conf/infinispan-xsite.xml" />
|
||||
<delete file="${cache.server.home}-dc1/server/conf/infinispan-xsite-2.xml"/>
|
||||
|
||||
<move file="${cache.server.home}-dc2/server/conf/infinispan-xsite-2.xml"
|
||||
tofile="${cache.server.home}-dc2/server/conf/infinispan-xsite.xml" />
|
||||
<delete file="${cache.server.home}-dc1/server/conf/infinispan-xsite-1.xml"/>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>cache-server-jdg</id>
|
||||
<id>cache-server-datagrid</id>
|
||||
<properties>
|
||||
<cache.server>jdg</cache.server>
|
||||
<cache.server>datagrid</cache.server>
|
||||
<auth.server.crossdc>true</auth.server.crossdc>
|
||||
<cache.server.jboss>true</cache.server.jboss>
|
||||
<cache.server.config.dir>${cache.server.home}/standalone/configuration</cache.server.config.dir>
|
||||
<keycloak.testsuite.logging.pattern>%d{HH:mm:ss,SSS} [%t] %-5p [%c{1.}] %m%n</keycloak.testsuite.logging.pattern>
|
||||
<keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>false</keycloak.connectionsInfinispan.default.remoteStoreSecurityEnabled>
|
||||
<keycloak.connectionsInfinispan.hotrodProtocolVersion>2.9</keycloak.connectionsInfinispan.hotrodProtocolVersion>
|
||||
<skip.clean.second.cache>true</skip.clean.second.cache>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.wildfly.arquillian</groupId>
|
||||
<artifactId>wildfly-arquillian-container-managed</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
@ -1171,7 +1333,7 @@
|
|||
<rules>
|
||||
<requireProperty>
|
||||
<property>auth.servers.crossdc</property>
|
||||
<message>Profile "cache-server-jdg" requires activation of another profile: either "auth-servers-crossdc-undertow" or "auth-servers-crossdc-jboss".</message>
|
||||
<message>Profile "cache-server-datagrid" requires activation of another profile: either "auth-servers-crossdc-undertow" or "auth-servers-crossdc-jboss".</message>
|
||||
</requireProperty>
|
||||
</rules>
|
||||
</configuration>
|
||||
|
@ -1185,7 +1347,7 @@
|
|||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-cache-server-jdg</id>
|
||||
<id>unpack-cache-server-standalone-jdg</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
|
@ -1194,7 +1356,7 @@
|
|||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-jdg</artifactId>
|
||||
<artifactId>integration-arquillian-servers-cache-server-infinispan-datagrid</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>zip</type>
|
||||
<outputDirectory>${containers.home}</outputDirectory>
|
||||
|
@ -1205,11 +1367,46 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-cache-server-standalone-infinispan-nodes</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.copy.cache.crossdc.nodes}</skip>
|
||||
<target>
|
||||
<move todir="${cache.server.home}-dc1">
|
||||
<fileset dir="${cache.server.home}"/>
|
||||
</move>
|
||||
<copy todir="${cache.server.home}-dc2">
|
||||
<fileset dir="${cache.server.home}-dc1"/>
|
||||
</copy>
|
||||
|
||||
<chmod dir="${cache.server.home}-dc1/bin" perm="ugo+rx" includes="**/*.sh"/>
|
||||
<chmod dir="${cache.server.home}-dc2/bin" perm="ugo+rx" includes="**/*.sh"/>
|
||||
|
||||
<move file="${cache.server.home}-dc1/server/conf/infinispan-xsite-1.xml"
|
||||
tofile="${cache.server.home}-dc1/server/conf/infinispan-xsite.xml" />
|
||||
<delete file="${cache.server.home}-dc1/server/conf/infinispan-xsite-2.xml"/>
|
||||
|
||||
<move file="${cache.server.home}-dc2/server/conf/infinispan-xsite-2.xml"
|
||||
tofile="${cache.server.home}-dc2/server/conf/infinispan-xsite.xml" />
|
||||
<delete file="${cache.server.home}-dc1/server/conf/infinispan-xsite-1.xml"/>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
|
||||
<profile>
|
||||
<id>auth-server-profile</id>
|
||||
<activation>
|
||||
|
@ -2038,6 +2235,14 @@
|
|||
<tomcat.javax.net.ssl.properties>-Djavax.net.ssl.trustStore=${app.server.home}/lib/keycloak.truststore -Djavax.net.ssl.trustStorePassword=secret</tomcat.javax.net.ssl.properties>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>cache-auth</id>
|
||||
<properties>
|
||||
<cache.server.auth>true</cache.server.auth>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
|
Loading…
Reference in a new issue