KEYCLOAK-7475 adapter tests - add Wildfly10 and Wildfly9 providers

This commit is contained in:
vramik 2018-06-20 12:47:36 +02:00 committed by Pavel Drozd
parent ca06043b00
commit 8fdadcc596
73 changed files with 702 additions and 1098 deletions

View file

@ -41,6 +41,7 @@
<app.server.saml.adapter.artifactId>keycloak-saml-eap6-adapter-dist</app.server.saml.adapter.artifactId> <app.server.saml.adapter.artifactId>keycloak-saml-eap6-adapter-dist</app.server.saml.adapter.artifactId>
<skip.apply.offline.cli>true</skip.apply.offline.cli> <skip.apply.offline.cli>true</skip.apply.offline.cli>
<skip.configure.clustered.scenario>true</skip.configure.clustered.scenario>
</properties> </properties>
<dependencies> <dependencies>

View file

@ -413,7 +413,7 @@
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<skip>${skip.apply.offline.cli}</skip><!--eap6--> <skip>${skip.configure.clustered.scenario}</skip><!--eap6, wildfly9-->
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory> <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
<executable>./jboss-cli.sh</executable> <executable>./jboss-cli.sh</executable>
<arguments> <arguments>
@ -429,7 +429,7 @@
<goal>exec</goal> <goal>exec</goal>
</goals> </goals>
<configuration> <configuration>
<skip>${skip.apply.offline.cli}</skip><!--eap6--> <skip>${skip.configure.clustered.scenario}</skip><!--eap6, wildfly9-->
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory> <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
<executable>./jboss-cli.sh</executable> <executable>./jboss-cli.sh</executable>
<arguments> <arguments>

View file

@ -26,8 +26,8 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-wildfly10</artifactId> <artifactId>integration-arquillian-servers-app-server-wildfly10</artifactId>
<packaging>pom</packaging> <packaging>jar</packaging>
<name>App Server - JBoss - Wildfly 10</name> <name>App Server - Wildfly 10</name>
<properties> <properties>
<app.server.jboss>wildfly10</app.server.jboss> <app.server.jboss>wildfly10</app.server.jboss>
@ -43,4 +43,20 @@
<skip.adapter.offline.installation>false</skip.adapter.offline.installation> <skip.adapter.offline.installation>false</skip.adapter.offline.installation>
</properties> </properties>
<dependencies>
<dependency>
<groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-servers-app-server-spi</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.wildfly.arquillian</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-util</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project> </project>

View file

@ -0,0 +1,34 @@
/*
* Copyright 2018 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.wildfly;
import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
import org.jboss.arquillian.core.spi.LoadableExtension;
import org.keycloak.testsuite.arquillian.wildfly.container.Wildfly10DeploymentArchiveProcessor;
/**
*
* @author <a href="mailto:vramik@redhat.com">Vlasta Ramik</a>
*/
public class Wildfly10AppServerArquillianExtension implements LoadableExtension {
@Override
public void register(ExtensionBuilder builder) {
builder.service(ApplicationArchiveProcessor.class, Wildfly10DeploymentArchiveProcessor.class);
}
}

View file

@ -0,0 +1,162 @@
/*
* Copyright 2018 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.wildfly.container;
import java.util.ArrayList;
import java.util.List;
import org.jboss.arquillian.core.spi.Validate;
import org.jboss.as.arquillian.container.managed.ManagedDeployableContainer;
import org.jboss.shrinkwrap.descriptor.spi.node.Node;
import org.keycloak.testsuite.arquillian.container.AppServerContainerProvider;
/**
* @author <a href="mailto:vramik@redhat.com">Vlasta Ramik</a>
*/
public class Wildfly10AppServerProvider implements AppServerContainerProvider {
private Node configuration;
private static final String containerName = "wildfly10";
private final String appServerHome;
private final String appServerJavaHome;
private final String appServerPortOffset;
private final String managementProtocol;
private final String managementPort;
private final String startupTimeoutInSeconds;
public Wildfly10AppServerProvider() {
appServerHome = System.getProperty("app.server.home");
appServerJavaHome = System.getProperty("app.server.java.home");
appServerPortOffset = System.getProperty("app.server.port.offset");
managementProtocol = System.getProperty("app.server.management.protocol");
managementPort = System.getProperty("app.server.management.port");
startupTimeoutInSeconds = System.getProperty("app.server.startup.timeout");
Validate.notNullOrEmpty(appServerHome, "app.server.home is not set.");
Validate.notNullOrEmpty(appServerJavaHome, "app.server.java.home is not set.");
Validate.notNullOrEmpty(appServerPortOffset, "app.server.port.offset is not set.");
Validate.notNullOrEmpty(managementProtocol, "app.server.management.protocol is not set.");
Validate.notNullOrEmpty(managementPort, "app.server.management.port is not set.");
Validate.notNullOrEmpty(startupTimeoutInSeconds, "app.server.startup.timeout is not set.");
}
@Override
public String getName() {
return containerName;
}
@Override
public List<Node> getContainers() {
List<Node> containers = new ArrayList<>();
containers.add(standaloneContainer());
containers.add(clusterGroup());
return containers;
}
private void createChild(String name, String text) {
configuration.createChild("property").attribute("name", name).text(text);
}
private Node standaloneContainer() {
Node container = new Node("container");
container.attribute("mode", "manual");
container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName);
configuration = container.createChild("configuration");
createChild("enabled", "true");
createChild("adapterImplClass", ManagedDeployableContainer.class.getName());
createChild("jbossHome", appServerHome);
createChild("javaHome", appServerJavaHome);
createChild("jbossArguments",
"-Djboss.socket.binding.port-offset=" + appServerPortOffset + " " +
System.getProperty("adapter.test.props", " ") +
System.getProperty("kie.maven.settings", " ")
);
createChild("javaVmArguments",
System.getProperty("app.server.jboss.jvm.debug.args", "") + " " +
System.getProperty("app.server.memory.settings", "") + " " +
"-Djava.net.preferIPv4Stack=true"
);
createChild("managementProtocol", managementProtocol);
createChild("managementPort", managementPort);
createChild("startupTimeoutInSeconds", startupTimeoutInSeconds);
return container;
}
private Node clusterGroup() {
Node group = new Node("group");
group.attribute("qualifier", "app-server-wildfly10-clustered");
addHaNodeContainer(group, 1);
addHaNodeContainer(group, 2);
return group;
}
private void addHaNodeContainer(Node group, int number) {
String portOffset = System.getProperty("app.server." + number + ".port.offset");
String managementPort = System.getProperty("app.server." + number + ".management.port");
Validate.notNullOrEmpty(portOffset, "app.server." + number + ".port.offset is not set.");
Validate.notNullOrEmpty(managementPort, "app.server." + number + ".management.port is not set.");
Node container = group.createChild("container");
container.attribute("mode", "manual");
container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName + "-ha-node-" + number);
configuration = container.createChild("configuration");
createChild("enabled", "true");
createChild("adapterImplClass", ManagedDeployableContainer.class.getName());
createChild("jbossHome", appServerHome);
createChild("javaHome", appServerJavaHome);
//cleanServerBaseDir cannot be used until WFARQ-44 is fixed
// createChild("cleanServerBaseDir", appServerHome + "/standalone-ha-node-" + number);
createChild("serverConfig", "standalone-ha.xml");
createChild("jbossArguments",
"-Djboss.server.base.dir=" + appServerHome + "/standalone-ha-node-" + number + " " +
"-Djboss.socket.binding.port-offset=" + portOffset + " " +
"-Djboss.node.name=ha-node-" + number + " " +
getCrossDCProperties(number, portOffset) +
System.getProperty("adapter.test.props", " ") +
System.getProperty("kie.maven.settings", " ")
);
createChild("javaVmArguments",
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=790" + number + " " +
System.getProperty("app.server.memory.settings", "") + " " +
"-Djava.net.preferIPv4Stack=true"
);
createChild("managementProtocol", managementProtocol);
createChild("managementPort", managementPort);
createChild("startupTimeoutInSeconds", startupTimeoutInSeconds);
}
private String getCrossDCProperties(int number, String portOffset) {
if (System.getProperty("cache.server") == null || System.getProperty("cache.server").equals("undefined")) {
return "";
}
String cacheHotrodPortString = System.getProperty("cache.server." + number + ".port.offset");
Validate.notNullOrEmpty(cacheHotrodPortString, "cache.server." + number + ".port.offset is not set.");
int tcppingPort = 7600 + Integer.parseInt(portOffset);
int cacheHotrodPort = 11222 + Integer.parseInt(cacheHotrodPortString);
//properties used in servers/app-server/jboss/common/cli/configure-crossdc-config.cli
return "-Dtcpping.port=" + tcppingPort + " -Dcache.hotrod.port=" + cacheHotrodPort + " ";
}
}

View file

@ -0,0 +1,71 @@
/*
* Copyright 2018 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.wildfly.container;
import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
import org.jboss.arquillian.test.spi.TestClass;
import org.jboss.logging.Logger;
import org.jboss.shrinkwrap.api.Archive;
import org.keycloak.testsuite.utils.annotation.UseServletFilter;
import org.keycloak.testsuite.utils.arquillian.DeploymentArchiveProcessorUtils;
/**
*
* @author <a href="mailto:vramik@redhat.com">Vlasta Ramik</a>
*/
public class Wildfly10DeploymentArchiveProcessor implements ApplicationArchiveProcessor {
private final Logger log = Logger.getLogger(Wildfly10DeploymentArchiveProcessor.class);
@Override
public void process(Archive<?> archive, TestClass testClass) {
if (DeploymentArchiveProcessorUtils.checkRunOnServerDeployment(archive)) {
return;
}
modifyWebXML(archive, testClass);
modifyOIDCAdapterConfig(archive, DeploymentArchiveProcessorUtils.ADAPTER_CONFIG_PATH);
modifyOIDCAdapterConfig(archive, DeploymentArchiveProcessorUtils.ADAPTER_CONFIG_PATH_JS);
modifySAMLAdapterConfig(archive);
}
private void modifyWebXML(Archive<?> archive, TestClass testClass) {
if (!archive.contains(DeploymentArchiveProcessorUtils.WEBXML_PATH)) return;
if (!testClass.getJavaClass().isAnnotationPresent(UseServletFilter.class)) return;
if (!archive.contains(DeploymentArchiveProcessorUtils.JBOSS_DEPLOYMENT_XML_PATH)) return;
log.debug("Modifying WEB.XML in " + archive.getName() + " for Servlet Filter.");
DeploymentArchiveProcessorUtils.modifyWebXMLForServletFilter(archive, testClass);
DeploymentArchiveProcessorUtils.addFilterDependencies(archive, testClass);
}
private void modifyOIDCAdapterConfig(Archive<?> archive, String adapterConfigPath) {
if (!archive.contains(adapterConfigPath)) return;
log.debug("Modifying adapter config " + adapterConfigPath + " in " + archive.getName());
DeploymentArchiveProcessorUtils.modifyOIDCAdapterConfig(archive, adapterConfigPath);
}
private void modifySAMLAdapterConfig(Archive<?> archive) {
if (!archive.contains(DeploymentArchiveProcessorUtils.SAML_ADAPTER_CONFIG_PATH)) return;
log.debug("Modifying adapter config " + DeploymentArchiveProcessorUtils.SAML_ADAPTER_CONFIG_PATH + " in " + archive.getName());
DeploymentArchiveProcessorUtils.modifySAMLAdapterConfig(archive);
}
}

View file

@ -0,0 +1 @@
org.keycloak.testsuite.arquillian.wildfly.Wildfly10AppServerArquillianExtension

View file

@ -0,0 +1 @@
org.keycloak.testsuite.arquillian.wildfly.container.Wildfly10AppServerProvider

View file

@ -26,8 +26,8 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-servers-app-server-wildfly9</artifactId> <artifactId>integration-arquillian-servers-app-server-wildfly9</artifactId>
<packaging>pom</packaging> <packaging>jar</packaging>
<name>App Server - JBoss - Wildfly 9</name> <name>App Server - Wildfly 9</name>
<properties> <properties>
<app.server.jboss>wildfly9</app.server.jboss> <app.server.jboss>wildfly9</app.server.jboss>
@ -41,6 +41,23 @@
<app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId> <app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
<skip.adapter.offline.installation>false</skip.adapter.offline.installation> <skip.adapter.offline.installation>false</skip.adapter.offline.installation>
<skip.configure.clustered.scenario>true</skip.configure.clustered.scenario>
</properties> </properties>
<dependencies>
<dependency>
<groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-servers-app-server-spi</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.wildfly.arquillian</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-util</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project> </project>

View file

@ -0,0 +1,34 @@
/*
* Copyright 2018 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.wildfly;
import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
import org.jboss.arquillian.core.spi.LoadableExtension;
import org.keycloak.testsuite.arquillian.wildfly.container.Wildfly9DeploymentArchiveProcessor;
/**
*
* @author <a href="mailto:vramik@redhat.com">Vlasta Ramik</a>
*/
public class Wildfly9AppServerArquillianExtension implements LoadableExtension {
@Override
public void register(ExtensionBuilder builder) {
builder.service(ApplicationArchiveProcessor.class, Wildfly9DeploymentArchiveProcessor.class);
}
}

View file

@ -0,0 +1,162 @@
/*
* Copyright 2018 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.wildfly.container;
import java.util.ArrayList;
import java.util.List;
import org.jboss.arquillian.core.spi.Validate;
import org.jboss.as.arquillian.container.managed.ManagedDeployableContainer;
import org.jboss.shrinkwrap.descriptor.spi.node.Node;
import org.keycloak.testsuite.arquillian.container.AppServerContainerProvider;
/**
* @author <a href="mailto:vramik@redhat.com">Vlasta Ramik</a>
*/
public class Wildfly9AppServerProvider implements AppServerContainerProvider {
private Node configuration;
private static final String containerName = "wildfly9";
private final String appServerHome;
private final String appServerJavaHome;
private final String appServerPortOffset;
private final String managementProtocol;
private final String managementPort;
private final String startupTimeoutInSeconds;
public Wildfly9AppServerProvider() {
appServerHome = System.getProperty("app.server.home");
appServerJavaHome = System.getProperty("app.server.java.home");
appServerPortOffset = System.getProperty("app.server.port.offset");
managementProtocol = System.getProperty("app.server.management.protocol");
managementPort = System.getProperty("app.server.management.port");
startupTimeoutInSeconds = System.getProperty("app.server.startup.timeout");
Validate.notNullOrEmpty(appServerHome, "app.server.home is not set.");
Validate.notNullOrEmpty(appServerJavaHome, "app.server.java.home is not set.");
Validate.notNullOrEmpty(appServerPortOffset, "app.server.port.offset is not set.");
Validate.notNullOrEmpty(managementProtocol, "app.server.management.protocol is not set.");
Validate.notNullOrEmpty(managementPort, "app.server.management.port is not set.");
Validate.notNullOrEmpty(startupTimeoutInSeconds, "app.server.startup.timeout is not set.");
}
@Override
public String getName() {
return containerName;
}
@Override
public List<Node> getContainers() {
List<Node> containers = new ArrayList<>();
containers.add(standaloneContainer());
// containers.add(clusterGroup());
return containers;
}
private void createChild(String name, String text) {
configuration.createChild("property").attribute("name", name).text(text);
}
private Node standaloneContainer() {
Node container = new Node("container");
container.attribute("mode", "manual");
container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName);
configuration = container.createChild("configuration");
createChild("enabled", "true");
createChild("adapterImplClass", ManagedDeployableContainer.class.getName());
createChild("jbossHome", appServerHome);
createChild("javaHome", appServerJavaHome);
createChild("jbossArguments",
"-Djboss.socket.binding.port-offset=" + appServerPortOffset + " " +
System.getProperty("adapter.test.props", " ") +
System.getProperty("kie.maven.settings", " ")
);
createChild("javaVmArguments",
System.getProperty("app.server.jboss.jvm.debug.args", "") + " " +
System.getProperty("app.server.memory.settings", "") + " " +
"-Djava.net.preferIPv4Stack=true"
);
createChild("managementProtocol", managementProtocol);
createChild("managementPort", managementPort);
createChild("startupTimeoutInSeconds", startupTimeoutInSeconds);
return container;
}
private Node clusterGroup() {
Node group = new Node("group");
group.attribute("qualifier", "app-server-wildfly9-clustered");
addHaNodeContainer(group, 1);
addHaNodeContainer(group, 2);
return group;
}
private void addHaNodeContainer(Node group, int number) {
String portOffset = System.getProperty("app.server." + number + ".port.offset");
String managementPort = System.getProperty("app.server." + number + ".management.port");
Validate.notNullOrEmpty(portOffset, "app.server." + number + ".port.offset is not set.");
Validate.notNullOrEmpty(managementPort, "app.server." + number + ".management.port is not set.");
Node container = group.createChild("container");
container.attribute("mode", "manual");
container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName + "-ha-node-" + number);
configuration = container.createChild("configuration");
createChild("enabled", "true");
createChild("adapterImplClass", ManagedDeployableContainer.class.getName());
createChild("jbossHome", appServerHome);
createChild("javaHome", appServerJavaHome);
//cleanServerBaseDir cannot be used until WFARQ-44 is fixed
// createChild("cleanServerBaseDir", appServerHome + "/standalone-ha-node-" + number);
createChild("serverConfig", "standalone-ha.xml");
createChild("jbossArguments",
"-Djboss.server.base.dir=" + appServerHome + "/standalone-ha-node-" + number + " " +
"-Djboss.socket.binding.port-offset=" + portOffset + " " +
"-Djboss.node.name=ha-node-" + number + " " +
getCrossDCProperties(number, portOffset) +
System.getProperty("adapter.test.props", " ") +
System.getProperty("kie.maven.settings", " ")
);
createChild("javaVmArguments",
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=790" + number + " " +
System.getProperty("app.server.memory.settings", "") + " " +
"-Djava.net.preferIPv4Stack=true"
);
createChild("managementProtocol", managementProtocol);
createChild("managementPort", managementPort);
createChild("startupTimeoutInSeconds", startupTimeoutInSeconds);
}
private String getCrossDCProperties(int number, String portOffset) {
if (System.getProperty("cache.server") == null || System.getProperty("cache.server").equals("undefined")) {
return "";
}
String cacheHotrodPortString = System.getProperty("cache.server." + number + ".port.offset");
Validate.notNullOrEmpty(cacheHotrodPortString, "cache.server." + number + ".port.offset is not set.");
int tcppingPort = 7600 + Integer.parseInt(portOffset);
int cacheHotrodPort = 11222 + Integer.parseInt(cacheHotrodPortString);
//properties used in servers/app-server/jboss/common/cli/configure-crossdc-config.cli
return "-Dtcpping.port=" + tcppingPort + " -Dcache.hotrod.port=" + cacheHotrodPort + " ";
}
}

View file

@ -0,0 +1,71 @@
/*
* Copyright 2018 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.wildfly.container;
import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
import org.jboss.arquillian.test.spi.TestClass;
import org.jboss.logging.Logger;
import org.jboss.shrinkwrap.api.Archive;
import org.keycloak.testsuite.utils.annotation.UseServletFilter;
import org.keycloak.testsuite.utils.arquillian.DeploymentArchiveProcessorUtils;
/**
*
* @author <a href="mailto:vramik@redhat.com">Vlasta Ramik</a>
*/
public class Wildfly9DeploymentArchiveProcessor implements ApplicationArchiveProcessor {
private final Logger log = Logger.getLogger(Wildfly9DeploymentArchiveProcessor.class);
@Override
public void process(Archive<?> archive, TestClass testClass) {
if (DeploymentArchiveProcessorUtils.checkRunOnServerDeployment(archive)) {
return;
}
modifyWebXML(archive, testClass);
modifyOIDCAdapterConfig(archive, DeploymentArchiveProcessorUtils.ADAPTER_CONFIG_PATH);
modifyOIDCAdapterConfig(archive, DeploymentArchiveProcessorUtils.ADAPTER_CONFIG_PATH_JS);
modifySAMLAdapterConfig(archive);
}
private void modifyWebXML(Archive<?> archive, TestClass testClass) {
if (!archive.contains(DeploymentArchiveProcessorUtils.WEBXML_PATH)) return;
if (!testClass.getJavaClass().isAnnotationPresent(UseServletFilter.class)) return;
if (!archive.contains(DeploymentArchiveProcessorUtils.JBOSS_DEPLOYMENT_XML_PATH)) return;
log.debug("Modifying WEB.XML in " + archive.getName() + " for Servlet Filter.");
DeploymentArchiveProcessorUtils.modifyWebXMLForServletFilter(archive, testClass);
DeploymentArchiveProcessorUtils.addFilterDependencies(archive, testClass);
}
private void modifyOIDCAdapterConfig(Archive<?> archive, String adapterConfigPath) {
if (!archive.contains(adapterConfigPath)) return;
log.debug("Modifying adapter config " + adapterConfigPath + " in " + archive.getName());
DeploymentArchiveProcessorUtils.modifyOIDCAdapterConfig(archive, adapterConfigPath);
}
private void modifySAMLAdapterConfig(Archive<?> archive) {
if (!archive.contains(DeploymentArchiveProcessorUtils.SAML_ADAPTER_CONFIG_PATH)) return;
log.debug("Modifying adapter config " + DeploymentArchiveProcessorUtils.SAML_ADAPTER_CONFIG_PATH + " in " + archive.getName());
DeploymentArchiveProcessorUtils.modifySAMLAdapterConfig(archive);
}
}

View file

@ -0,0 +1 @@
org.keycloak.testsuite.arquillian.wildfly.Wildfly9AppServerArquillianExtension

View file

@ -0,0 +1 @@
org.keycloak.testsuite.arquillian.wildfly.container.Wildfly9AppServerProvider

View file

@ -349,6 +349,81 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile>
<id>app-server-wildfly10</id>
<activation>
<property>
<name>app.server</name>
<value>wildfly10</value>
</property>
</activation>
<properties>
<app.server>wildfly10</app.server> <!--in case the profile is called directly-->
<app.server.skip.unpack>false</app.server.skip.unpack>
<arquillian-wildfly-container.version>2.0.0.Final</arquillian-wildfly-container.version>
<infinispan.version>8.2.5.Final</infinispan.version> <!-- KEYCLOAK-5302 -->
</properties>
<dependencies>
<dependency>
<groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-servers-app-server-wildfly10</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!--required by creaper-core-->
<dependency>
<groupId>org.wildfly.core</groupId>
<artifactId>wildfly-cli</artifactId>
<scope>test</scope>
<version>${wildfly10.core.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>app-server-wildfly9</id>
<activation>
<property>
<name>app.server</name>
<value>wildfly9</value>
</property>
</activation>
<properties>
<app.server>wildfly9</app.server> <!--in case the profile is called directly-->
<app.server.skip.unpack>false</app.server.skip.unpack>
</properties>
<dependencies>
<dependency>
<groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-servers-app-server-wildfly9</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!--required by creaper-core-->
<dependency>
<groupId>org.wildfly.core</groupId>
<artifactId>wildfly-cli</artifactId>
<scope>test</scope>
<version>${wildfly.core.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile> <profile>
<id>app-server-eap</id> <id>app-server-eap</id>
<activation> <activation>

View file

@ -198,6 +198,14 @@ public class AppServerTestEnricher {
return CURRENT_APP_SERVER.equals("wildfly"); return CURRENT_APP_SERVER.equals("wildfly");
} }
public static boolean isWildfly10AppServer() {
return CURRENT_APP_SERVER.equals("wildfly10");
}
public static boolean isWildfly9AppServer() {
return CURRENT_APP_SERVER.equals("wildfly9");
}
public static boolean isTomcatAppServer() { public static boolean isTomcatAppServer() {
return CURRENT_APP_SERVER.equals("tomcat"); return CURRENT_APP_SERVER.equals("tomcat");
} }

View file

@ -49,6 +49,8 @@ import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isUndertow
import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isWLSAppServer; import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isWLSAppServer;
import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isWASAppServer; import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isWASAppServer;
import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isWildflyAppServer; import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isWildflyAppServer;
import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isWildfly10AppServer;
import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isWildfly9AppServer;
import static org.keycloak.testsuite.arquillian.AuthServerTestEnricher.getAuthServerContextRoot; import static org.keycloak.testsuite.arquillian.AuthServerTestEnricher.getAuthServerContextRoot;
import static org.keycloak.testsuite.utils.io.IOUtil.appendChildInDocument; import static org.keycloak.testsuite.utils.io.IOUtil.appendChildInDocument;
import static org.keycloak.testsuite.utils.io.IOUtil.documentToString; import static org.keycloak.testsuite.utils.io.IOUtil.documentToString;
@ -96,6 +98,8 @@ public class DeploymentArchiveProcessor implements ApplicationArchiveProcessor {
if (isEAP6AppServer() || if (isEAP6AppServer() ||
isEAPAppServer() || isEAPAppServer() ||
isWildflyAppServer() || isWildflyAppServer() ||
isWildfly10AppServer() ||
isWildfly9AppServer() ||
isUndertowAppServer()) { isUndertowAppServer()) {
return; return;

View file

@ -24,6 +24,11 @@ public interface ContainerConstants {
public static final String APP_SERVER_WILDFLY = APP_SERVER_PREFIX + "wildfly"; public static final String APP_SERVER_WILDFLY = APP_SERVER_PREFIX + "wildfly";
public static final String APP_SERVER_WILDFLY_CLUSTER = APP_SERVER_WILDFLY + "-ha-node-1;" + APP_SERVER_WILDFLY + "-ha-node-2"; public static final String APP_SERVER_WILDFLY_CLUSTER = APP_SERVER_WILDFLY + "-ha-node-1;" + APP_SERVER_WILDFLY + "-ha-node-2";
public static final String APP_SERVER_WILDFLY10 = APP_SERVER_PREFIX + "wildfly10";
public static final String APP_SERVER_WILDFLY10_CLUSTER = APP_SERVER_WILDFLY10 + "-ha-node-1;" + APP_SERVER_WILDFLY10 + "-ha-node-2";
public static final String APP_SERVER_WILDFLY9 = APP_SERVER_PREFIX + "wildfly9";
public static final String APP_SERVER_EAP = APP_SERVER_PREFIX + "eap"; public static final String APP_SERVER_EAP = APP_SERVER_PREFIX + "eap";
public static final String APP_SERVER_EAP_CLUSTER = APP_SERVER_EAP + "-ha-node-1;" + APP_SERVER_EAP + "-ha-node-2"; public static final String APP_SERVER_EAP_CLUSTER = APP_SERVER_EAP + "-ha-node-1;" + APP_SERVER_EAP + "-ha-node-2";

View file

@ -47,6 +47,7 @@ import static org.keycloak.testsuite.utils.io.IOUtil.loadRealm;
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a> * @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class DefaultAuthzConfigAdapterTest extends AbstractExampleAdapterTest { public class DefaultAuthzConfigAdapterTest extends AbstractExampleAdapterTest {

View file

@ -31,6 +31,7 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants;
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a> * @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class PermissiveModeAdapterTest extends AbstractBaseServletAuthzAdapterTest { public class PermissiveModeAdapterTest extends AbstractBaseServletAuthzAdapterTest {

View file

@ -29,6 +29,7 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants;
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a> * @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class PhotozExampleLazyLoadPathsAdapterTest extends AbstractPhotozExampleAdapterTest { public class PhotozExampleLazyLoadPathsAdapterTest extends AbstractPhotozExampleAdapterTest {

View file

@ -28,6 +28,7 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants;
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a> * @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class PhotozExampleNoLazyLoadPathsAdapterTest extends AbstractPhotozExampleAdapterTest { public class PhotozExampleNoLazyLoadPathsAdapterTest extends AbstractPhotozExampleAdapterTest {

View file

@ -29,6 +29,7 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants;
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a> * @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class ServletAuthzCIPAdapterTest extends AbstractServletAuthzAdapterTest { public class ServletAuthzCIPAdapterTest extends AbstractServletAuthzAdapterTest {

View file

@ -31,6 +31,7 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants;
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a> * @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class ServletAuthzCacheDisabledAdapterTest extends AbstractServletAuthzAdapterTest { public class ServletAuthzCacheDisabledAdapterTest extends AbstractServletAuthzAdapterTest {

View file

@ -30,6 +30,7 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants;
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a> * @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class ServletAuthzCacheLifespanAdapterTest extends AbstractServletAuthzAdapterTest { public class ServletAuthzCacheLifespanAdapterTest extends AbstractServletAuthzAdapterTest {

View file

@ -29,6 +29,7 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants;
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a> * @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class ServletAuthzLazyLoadPathsAdapterTest extends AbstractServletAuthzAdapterTest { public class ServletAuthzLazyLoadPathsAdapterTest extends AbstractServletAuthzAdapterTest {

View file

@ -27,6 +27,7 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants;
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a> * @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class ServletAuthzNoLazyLoadPathsAdapterTest extends AbstractServletAuthzAdapterTest { public class ServletAuthzNoLazyLoadPathsAdapterTest extends AbstractServletAuthzAdapterTest {

View file

@ -53,6 +53,7 @@ import org.openqa.selenium.By;
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a> * @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class ServletPolicyEnforcerTest extends AbstractExampleAdapterTest { public class ServletPolicyEnforcerTest extends AbstractExampleAdapterTest {

View file

@ -57,6 +57,7 @@ import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement;
* Created by fkiss. * Created by fkiss.
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class CorsExampleAdapterTest extends AbstractExampleAdapterTest { public class CorsExampleAdapterTest extends AbstractExampleAdapterTest {

View file

@ -52,7 +52,6 @@ import org.wildfly.extras.creaper.core.online.operations.admin.Administration;
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class ConsoleProtectionTest extends AbstractAdapterTest { public class ConsoleProtectionTest extends AbstractAdapterTest {
// Javascript browser needed KEYCLOAK-4703 // Javascript browser needed KEYCLOAK-4703

View file

@ -90,6 +90,7 @@ import static org.keycloak.testsuite.arquillian.DeploymentTargetModifier.AUTH_SE
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class BrokerLinkAndTokenExchangeTest extends AbstractServletsAdapterTest { public class BrokerLinkAndTokenExchangeTest extends AbstractServletsAdapterTest {

View file

@ -75,6 +75,7 @@ import static org.keycloak.testsuite.admin.ApiUtil.createUserAndResetPasswordWit
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class ClientInitiatedAccountLinkTest extends AbstractServletsAdapterTest { public class ClientInitiatedAccountLinkTest extends AbstractServletsAdapterTest {

View file

@ -24,6 +24,7 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants;
@AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
@UseServletFilter(filterName = "oidc-filter", filterClass = "org.keycloak.adapters.servlet.KeycloakOIDCFilter", @UseServletFilter(filterName = "oidc-filter", filterClass = "org.keycloak.adapters.servlet.KeycloakOIDCFilter",

View file

@ -131,6 +131,8 @@ import static org.keycloak.testsuite.util.WaitUtils.waitForPageToLoad;
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY9)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class DemoServletsAdapterTest extends AbstractServletsAdapterTest { public class DemoServletsAdapterTest extends AbstractServletsAdapterTest {

View file

@ -80,6 +80,8 @@ import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement;
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY9)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class OIDCPublicKeyRotationAdapterTest extends AbstractServletsAdapterTest { public class OIDCPublicKeyRotationAdapterTest extends AbstractServletsAdapterTest {

View file

@ -37,6 +37,8 @@ import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement;
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY9)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class OfflineServletsAdapterTest extends AbstractServletsAdapterTest { public class OfflineServletsAdapterTest extends AbstractServletsAdapterTest {

View file

@ -12,6 +12,8 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants;
* @author mhajas * @author mhajas
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY9)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
@UseServletFilter(filterName = "saml-filter", filterClass = "org.keycloak.adapters.saml.servlet.SamlFilter", @UseServletFilter(filterName = "saml-filter", filterClass = "org.keycloak.adapters.saml.servlet.SamlFilter",

View file

@ -158,6 +158,8 @@ import org.xml.sax.SAXException;
* @author mhajas * @author mhajas
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY9)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class SAMLServletAdapterTest extends AbstractServletsAdapterTest { public class SAMLServletAdapterTest extends AbstractServletsAdapterTest {

View file

@ -35,6 +35,8 @@ import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlEquals;
import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlStartsWithLoginUrlOf; import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlStartsWithLoginUrlOf;
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY9)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class SecuredDeploymentsAdapterTest extends AbstractServletsAdapterTest { public class SecuredDeploymentsAdapterTest extends AbstractServletsAdapterTest {

View file

@ -52,6 +52,8 @@ import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlStartsWithLo
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY9)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class SessionServletAdapterTest extends AbstractServletsAdapterTest { public class SessionServletAdapterTest extends AbstractServletsAdapterTest {

View file

@ -67,6 +67,7 @@ import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlStartsWithLo
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6)
public class UserStorageConsentTest extends AbstractServletsAdapterTest { public class UserStorageConsentTest extends AbstractServletsAdapterTest {

View file

@ -33,6 +33,7 @@ import static org.keycloak.testsuite.adapter.AbstractServletsAdapterTest.samlSer
* @author hmlnarik * @author hmlnarik
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY_CLUSTER) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY_CLUSTER)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10_CLUSTER)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP_CLUSTER) @AppServerContainer(ContainerConstants.APP_SERVER_EAP_CLUSTER)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP6_CLUSTER) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6_CLUSTER)
public class SAMLAdapterClusterTest extends AbstractSAMLAdapterClusteredTest { public class SAMLAdapterClusterTest extends AbstractSAMLAdapterClusteredTest {

View file

@ -37,6 +37,7 @@ import static org.keycloak.testsuite.adapter.AbstractServletsAdapterTest.samlSer
* @author hmlnarik * @author hmlnarik
*/ */
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY_CLUSTER) @AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY_CLUSTER)
@AppServerContainer(ContainerConstants.APP_SERVER_WILDFLY10_CLUSTER)
@AppServerContainer(ContainerConstants.APP_SERVER_EAP_CLUSTER) @AppServerContainer(ContainerConstants.APP_SERVER_EAP_CLUSTER)
public class SAMLAdapterCrossDCTest extends AbstractSAMLAdapterClusteredTest { public class SAMLAdapterCrossDCTest extends AbstractSAMLAdapterClusteredTest {

View file

@ -1,129 +0,0 @@
/*
* Copyright 2017 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.adapter.cluster;
import org.keycloak.testsuite.adapter.page.EmployeeServletDistributable;
import org.keycloak.testsuite.arquillian.annotation.*;
import java.io.*;
import java.util.concurrent.TimeoutException;
import org.keycloak.testsuite.adapter.AbstractSAMLAdapterClusteredTest;
import org.keycloak.testsuite.adapter.servlet.SendUsernameServlet;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.TargetsContainer;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Assert;
import org.junit.Before;
import org.wildfly.extras.creaper.core.*;
import org.wildfly.extras.creaper.core.online.*;
import org.wildfly.extras.creaper.core.online.operations.*;
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;
import static org.keycloak.testsuite.adapter.AbstractServletsAdapterTest.samlServletDeployment;
import org.keycloak.testsuite.arquillian.ContainerInfo;
/**
*
* @author hmlnarik
*/
@AppServerContainer("app-server-eap6")
public class EAP6SAMLAdapterClusterTest extends AbstractSAMLAdapterClusteredTest {
@TargetsContainer(value = "app-server-eap6-" + NODE_1_NAME)
@Deployment(name = EmployeeServletDistributable.DEPLOYMENT_NAME, managed = false)
protected static WebArchive employee() {
return samlServletDeployment(EmployeeServletDistributable.DEPLOYMENT_NAME, EmployeeServletDistributable.DEPLOYMENT_NAME + "/WEB-INF/web.xml", SendUsernameServlet.class);
}
@TargetsContainer(value = "app-server-eap6-" + NODE_2_NAME)
@Deployment(name = EmployeeServletDistributable.DEPLOYMENT_NAME + "_2", managed = false)
protected static WebArchive employee2() {
return employee();
}
protected void prepareWorkerNode(int nodeIndex, Integer managementPort) throws IOException, NumberFormatException, TimeoutException, InterruptedException {
log.infov("Preparing worker node ({0} @ {1})", nodeIndex, managementPort);
OnlineManagementClient clientWorkerNodeClient = ManagementClient.online(OnlineOptions
.standalone()
.hostAndPort("localhost", managementPort)
.protocol(ManagementProtocol.REMOTE)
.build());
Administration administration = new Administration(clientWorkerNodeClient);
Operations op = new Operations(clientWorkerNodeClient);
Batch b = new Batch();
Address tcppingStack = Address
.subsystem("jgroups")
.and("stack", "tcpping");
b.add(tcppingStack);
b.add(tcppingStack.and("transport", "TRANSPORT"), Values.of("socket-binding", "jgroups-tcp").and("type", "TCP"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "TCPPING"));
b.add(tcppingStack.and("protocol", "TCPPING").and("property", "initial_hosts"), Values.of("value", "localhost[" + (7600 + PORT_OFFSET_NODE_1) + "],localhost[" + (7600 + PORT_OFFSET_NODE_2) + "]"));
b.add(tcppingStack.and("protocol", "TCPPING").and("property", "port_range"), Values.of("value", "0"));
b.add(tcppingStack.and("protocol", "TCPPING").and("property", "num_initial_members"), Values.of("value", "2"));
b.add(tcppingStack.and("protocol", "TCPPING").and("property", "timeout"), Values.of("value", "3000"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "MERGE2"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "FD_SOCK").and("socket-binding", "jgroups-tcp-fd"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "FD"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "VERIFY_SUSPECT"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "pbcast.NAKACK"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "UNICAST2"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "pbcast.STABLE"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "pbcast.GMS"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "UFC"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "MFC"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "FRAG2"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "RSVP"));
Assert.assertTrue("Could not add TCPPING JGroups stack", op.batch(b).isSuccess());
Assert.assertTrue(op.writeAttribute(Address.subsystem("jgroups"), "default-stack", "tcpping").isSuccess());
Assert.assertTrue(op.writeAttribute(Address.subsystem("web"), "instance-id", "${jboss.node.name}").isSuccess());
Assert.assertTrue(op.add(Address.extension("org.keycloak.keycloak-saml-adapter-subsystem"), Values.of("module", "org.keycloak.keycloak-saml-adapter-subsystem")).isSuccess());
Assert.assertTrue(op.add(Address.subsystem("keycloak-saml")).isSuccess());
//clientWorkerNodeClient.execute("reload");
administration.reload();
log.infov("Worker node ({0}) Prepared", managementPort);
}
@Before
@Override
public void startServers() throws Exception {
prepareServerDirectories();
for (ContainerInfo containerInfo : testContext.getAppServerBackendsInfo()) {
controller.start(containerInfo.getQualifier());
}
prepareWorkerNode(0, Integer.valueOf(System.getProperty("app.server.1.management.port")));
prepareWorkerNode(1, Integer.valueOf(System.getProperty("app.server.2.management.port")));
deployer.deploy(EmployeeServletDistributable.DEPLOYMENT_NAME);
deployer.deploy(EmployeeServletDistributable.DEPLOYMENT_NAME + "_2");
}
@Override
protected void prepareServerDirectories() throws Exception {
prepareServerDirectory("standalone-cluster", "standalone-" + NODE_1_NAME);
prepareServerDirectory("standalone-cluster", "standalone-" + NODE_2_NAME);
}
}

View file

@ -1,192 +0,0 @@
/*
* Copyright 2017 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.adapter.crossdc;
import org.keycloak.testsuite.adapter.page.EmployeeServletDistributable;
import org.keycloak.testsuite.arquillian.annotation.*;
import java.io.*;
import org.keycloak.testsuite.adapter.AbstractSAMLAdapterClusteredTest;
import org.keycloak.testsuite.adapter.servlet.SendUsernameServlet;
import org.apache.commons.lang3.math.NumberUtils;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.TargetsContainer;
import org.jboss.dmr.ModelNode;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.wildfly.extras.creaper.core.*;
import org.wildfly.extras.creaper.core.online.*;
import org.wildfly.extras.creaper.core.online.operations.*;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import org.junit.Before;
import static org.keycloak.testsuite.adapter.AbstractServletsAdapterTest.samlServletDeployment;
import org.keycloak.testsuite.arquillian.ContainerInfo;
/**
*
* @author hmlnarik
*/
@Ignore("Infinispan version 5 does not support remote cache events, hence this test is left here for development purposes only")
@AppServerContainer("app-server-eap6")
public class EAP6SAMLAdapterCrossDCTest extends AbstractSAMLAdapterClusteredTest {
@BeforeClass
public static void checkCrossDcTest() {
Assume.assumeThat("Seems not to be running cross-DC tests", System.getProperty("cache.server"), not(is("undefined")));
}
protected static final int PORT_OFFSET_CACHE_1 = NumberUtils.toInt(System.getProperty("cache.server.1.port.offset"), 0);
protected static final int CACHE_HOTROD_PORT_CACHE_1 = 11222 + PORT_OFFSET_CACHE_1;
protected static final int PORT_OFFSET_CACHE_2 = NumberUtils.toInt(System.getProperty("cache.server.2.port.offset"), 0);
protected static final int CACHE_HOTROD_PORT_CACHE_2 = 11222 + PORT_OFFSET_CACHE_2;
private final int[] CACHE_HOTROD_PORTS = new int[] { CACHE_HOTROD_PORT_CACHE_1, CACHE_HOTROD_PORT_CACHE_2 };
private final int[] TCPPING_PORTS = new int[] { 7600 + PORT_OFFSET_NODE_1, 7600 + PORT_OFFSET_NODE_2 };
private static final String SESSION_CACHE_NAME = EmployeeServletDistributable.DEPLOYMENT_NAME + "-cache";
private static final String SSO_CACHE_NAME = SESSION_CACHE_NAME + ".ssoCache";
private static final Address SESSION_CACHE_ADDR = Address.subsystem("infinispan")
.and("cache-container", "web")
.and("replicated-cache", SESSION_CACHE_NAME);
private static final Address SSO_CACHE_ADDR = Address.subsystem("infinispan")
.and("cache-container", "web")
.and("replicated-cache", SSO_CACHE_NAME);
private static final String JBOSS_WEB_XML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<jboss-web>\n"
+ " <replication-config>\n"
+ " <replication-granularity>SESSION</replication-granularity>\n"
+ " <cache-name>" + "web." + SESSION_CACHE_NAME + "</cache-name>\n"
+ " </replication-config>\n"
+ "</jboss-web>";
@TargetsContainer(value = "app-server-eap6-" + NODE_1_NAME)
@Deployment(name = EmployeeServletDistributable.DEPLOYMENT_NAME, managed = false)
protected static WebArchive employee() {
return samlServletDeployment(EmployeeServletDistributable.DEPLOYMENT_NAME,
EmployeeServletDistributable.DEPLOYMENT_NAME + "/WEB-INF/web.xml",
SendUsernameServlet.class)
.addAsWebInfResource(new StringAsset(JBOSS_WEB_XML), "jboss-web.xml");
}
@TargetsContainer(value = "app-server-eap6-" + NODE_2_NAME)
@Deployment(name = EmployeeServletDistributable.DEPLOYMENT_NAME + "_2", managed = false)
protected static WebArchive employee2() {
return employee();
}
protected void prepareWorkerNode(int nodeIndex, Integer managementPort) throws IOException, CliException, NumberFormatException {
log.infov("Preparing worker node ({0} @ {1})", nodeIndex, managementPort);
OnlineManagementClient clientWorkerNodeClient = ManagementClient.online(OnlineOptions
.standalone()
.hostAndPort("localhost", managementPort)
.protocol(ManagementProtocol.REMOTE)
.build());
Operations op = new Operations(clientWorkerNodeClient);
Batch b = new Batch();
Address tcppingStack = Address
.subsystem("jgroups")
.and("stack", "tcpping");
b.add(tcppingStack);
b.add(tcppingStack.and("transport", "TRANSPORT"), Values.of("socket-binding", "jgroups-tcp").and("type", "TCP"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "TCPPING"));
b.add(tcppingStack.and("protocol", "TCPPING").and("property", "initial_hosts"), Values.of("value", "localhost[" + TCPPING_PORTS[nodeIndex] + "]"));
b.add(tcppingStack.and("protocol", "TCPPING").and("property", "port_range"), Values.of("value", "0"));
b.add(tcppingStack.and("protocol", "TCPPING").and("property", "num_initial_members"), Values.of("value", "1"));
b.add(tcppingStack.and("protocol", "TCPPING").and("property", "timeout"), Values.of("value", "3000"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "MERGE2"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "FD_SOCK").and("socket-binding", "jgroups-tcp-fd"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "FD"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "VERIFY_SUSPECT"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "pbcast.NAKACK"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "UNICAST2"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "pbcast.STABLE"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "pbcast.GMS"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "UFC"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "MFC"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "FRAG2"));
b.invoke("add-protocol", tcppingStack, Values.of("type", "RSVP"));
Assert.assertTrue("Could not add TCPPING JGroups stack", op.batch(b).isSuccess());
op.add(Address.of("socket-binding-group", "standard-sockets").and("remote-destination-outbound-socket-binding", "cache-server"),
Values.of("host", "localhost")
.and("port", CACHE_HOTROD_PORTS[nodeIndex]));
op.add(SESSION_CACHE_ADDR, Values.of("statistics-enabled", "true").and("mode", "SYNC"));
op.add(SESSION_CACHE_ADDR.and("remote-store", "REMOTE_STORE"),
Values.of("remote-servers", ModelNode.fromString("[{\"outbound-socket-binding\"=>\"cache-server\"}]"))
.and("cache", SESSION_CACHE_NAME)
.and("passivation", false)
.and("purge", false)
.and("preload", false)
.and("shared", true)
);
op.add(SSO_CACHE_ADDR, Values.of("statistics-enabled", "true").and("mode", "SYNC"));
op.add(SSO_CACHE_ADDR.and("remote-store", "REMOTE_STORE"),
Values.of("remote-servers", ModelNode.fromString("[{\"outbound-socket-binding\"=>\"cache-server\"}]"))
.and("cache", SSO_CACHE_NAME)
.and("passivation", false)
.and("purge", false)
.and("preload", false)
.and("shared", true)
);
Assert.assertTrue(op.writeAttribute(Address.subsystem("jgroups"), "default-stack", "tcpping").isSuccess());
Assert.assertTrue(op.writeAttribute(Address.subsystem("web"), "instance-id", "${jboss.node.name}").isSuccess());
op.add(Address.extension("org.keycloak.keycloak-saml-adapter-subsystem"), Values.of("module", "org.keycloak.keycloak-saml-adapter-subsystem"));
op.add(Address.subsystem("keycloak-saml"));
clientWorkerNodeClient.execute("reload");
log.infov("Worker node ({0}) Prepared", managementPort);
}
@Before
@Override
public void startServers() throws Exception {
prepareServerDirectories();
for (ContainerInfo containerInfo : testContext.getAppServerBackendsInfo()) {
controller.start(containerInfo.getQualifier());
}
prepareWorkerNode(0, Integer.valueOf(System.getProperty("app.server.1.management.port")));
prepareWorkerNode(1, Integer.valueOf(System.getProperty("app.server.2.management.port")));
deployer.deploy(EmployeeServletDistributable.DEPLOYMENT_NAME);
deployer.deploy(EmployeeServletDistributable.DEPLOYMENT_NAME + "_2");
}
@Override
protected void prepareServerDirectories() throws Exception {
prepareServerDirectory("standalone-crossdc", "standalone-" + NODE_1_NAME);
prepareServerDirectory("standalone-crossdc", "standalone-" + NODE_2_NAME);
}
}

View file

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<distributable/>
<absolute-ordering/>
<module-name>%CONTEXT_PATH%</module-name>
<servlet-mapping>
<servlet-name>javax.ws.rs.core.Application</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<error-page>
<location>/error.html</location>
</error-page>
<security-constraint>
<web-resource-collection>
<web-resource-name>Application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>KEYCLOAK-SAML</auth-method>
<realm-name>demo</realm-name>
</login-config>
<security-role>
<role-name>manager</role-name>
</security-role>
<context-param>
<param-name>keycloak.sessionIdMapperUpdater.classes</param-name>
<param-value>org.keycloak.adapters.saml.jbossweb.infinispan.InfinispanSessionCacheIdMapperUpdater</param-value>
</context-param>
</web-app>

View file

@ -1,67 +0,0 @@
<?xml version="1.0"?>
<!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-tests-adapters-jboss</artifactId>
<version>4.1.0.Final-SNAPSHOT</version>
</parent>
<artifactId>integration-arquillian-tests-adapters-wildfly10</artifactId>
<name>Adapter Tests - JBoss - Wildfly 10</name>
<dependencies>
<dependency>
<groupId>org.wildfly.extras.creaper</groupId>
<artifactId>creaper-core</artifactId>
<scope>test</scope>
<version>1.6.1</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wildfly.core</groupId>
<artifactId>wildfly-cli</artifactId>
<scope>test</scope>
<version>${wildfly10.core.version}</version>
</dependency>
<dependency>
<groupId>org.wildfly.core</groupId>
<artifactId>wildfly-controller-client</artifactId>
<scope>test</scope>
<version>${wildfly10.core.version}</version>
</dependency>
</dependencies>
<properties>
<app.server>wildfly10</app.server>
<arquillian-wildfly-container.version>2.0.0.Final</arquillian-wildfly-container.version>
<infinispan.version>8.2.5.Final</infinispan.version> <!-- KEYCLOAK-5302 -->
</properties>
</project>

View file

@ -1,29 +0,0 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.ClientInitiatedAccountLinkTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author <a href="mailto:vramik@redhat.com">Vlastislav Ramik</a>
*/
@AppServerContainer("app-server-wildfly10")
public class Wildfly10ClientInitiatedAccountLinkTest extends ClientInitiatedAccountLinkTest {
}

View file

@ -1,13 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.DemoServletsAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-wildfly10")
public class Wildfly10OIDCAdapterTest extends DemoServletsAdapterTest {
}

View file

@ -1,12 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.DemoFilterServletAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
* Created by zschwarz on 9/14/16.
*/
@AppServerContainer("app-server-wildfly10")
public class Wildfly10OIDCFilterAdapterTest extends DemoFilterServletAdapterTest{
}

View file

@ -1,28 +0,0 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.OIDCPublicKeyRotationAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
@AppServerContainer("app-server-wildfly10")
public class Wildfly10OIDCPublicKeyRotationAdapterTest extends OIDCPublicKeyRotationAdapterTest {
}

View file

@ -1,13 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.SessionServletAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-wildfly10")
public class Wildfly10OIDCSessionAdapterTest extends SessionServletAdapterTest {
}

View file

@ -1,11 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.OfflineServletsAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
* @author <a href="mailto:bruno@abstractj.org">Bruno Oliveira</a>.
*/
@AppServerContainer("app-server-wildfly10")
public class Wildfly10OfflineServletsAdapterTest extends OfflineServletsAdapterTest {
}

View file

@ -1,12 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.SAMLServletsAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
* @author mhajas
*/
@AppServerContainer("app-server-wildfly10")
public class Wildfly10SAMLAdapterTest extends SAMLServletsAdapterTest {
}

View file

@ -1,11 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.SAMLFilterServletAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
* @author mhajas
*/
@AppServerContainer("app-server-wildfly10")
public class Wildfly10SAMLFilterAdapterTest extends SAMLFilterServletAdapterTest {
}

View file

@ -1,13 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.SecuredDeploymentsAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-wildfly10")
public class Wildfly10SecuredDeploymentsAdapterTest extends SecuredDeploymentsAdapterTest {
}

View file

@ -1,54 +0,0 @@
/*
* Copyright 2017 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.adapter.cluster;
import org.keycloak.testsuite.adapter.page.EmployeeServletDistributable;
import org.keycloak.testsuite.arquillian.annotation.*;
import org.keycloak.testsuite.adapter.AbstractSAMLAdapterClusteredTest;
import org.keycloak.testsuite.adapter.servlet.SendUsernameServlet;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.TargetsContainer;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import static org.keycloak.testsuite.adapter.AbstractServletsAdapterTest.samlServletDeployment;
/**
*
* @author hmlnarik
*/
@AppServerContainer("app-server-wildfly10")
public class Wildfly10SAMLAdapterClusterTest extends AbstractSAMLAdapterClusteredTest {
@TargetsContainer(value = "app-server-wildfly10-" + NODE_1_NAME)
@Deployment(name = EmployeeServletDistributable.DEPLOYMENT_NAME, managed = false)
protected static WebArchive employee() {
return samlServletDeployment(EmployeeServletDistributable.DEPLOYMENT_NAME, EmployeeServletDistributable.DEPLOYMENT_NAME + "/WEB-INF/web.xml", SendUsernameServlet.class);
}
@TargetsContainer(value = "app-server-wildfly10-" + NODE_2_NAME)
@Deployment(name = EmployeeServletDistributable.DEPLOYMENT_NAME + "_2", managed = false)
protected static WebArchive employee2() {
return employee();
}
@Override
protected void prepareServerDirectories() throws Exception {
prepareServerDirectory("standalone-cluster", "standalone-" + NODE_1_NAME);
prepareServerDirectory("standalone-cluster", "standalone-" + NODE_2_NAME);
}
}

View file

@ -1,79 +0,0 @@
/*
* Copyright 2017 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.adapter.crossdc;
import org.keycloak.testsuite.adapter.page.EmployeeServletDistributable;
import org.keycloak.testsuite.arquillian.annotation.*;
import org.keycloak.testsuite.adapter.AbstractSAMLAdapterClusteredTest;
import org.keycloak.testsuite.adapter.servlet.SendUsernameServlet;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.TargetsContainer;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Assume;
import org.junit.BeforeClass;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.keycloak.testsuite.adapter.AbstractServletsAdapterTest.samlServletDeployment;
/**
*
* @author hmlnarik
*/
@AppServerContainer("app-server-wildfly10")
public class Wildfly10SAMLAdapterCrossDCTest extends AbstractSAMLAdapterClusteredTest {
@BeforeClass
public static void checkCrossDcTest() {
Assume.assumeThat("Seems not to be running cross-DC tests", System.getProperty("cache.server"), not(is("undefined")));
}
private static final String SESSION_CACHE_NAME = EmployeeServletDistributable.DEPLOYMENT_NAME + "-cache";
private static final String JBOSS_WEB_XML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<jboss-web>\n"
+ " <replication-config>\n"
+ " <replication-granularity>SESSION</replication-granularity>\n"
+ " <cache-name>" + "web." + SESSION_CACHE_NAME + "</cache-name>\n"
+ " </replication-config>\n"
+ "</jboss-web>";
@TargetsContainer(value = "app-server-wildfly10-" + NODE_1_NAME)
@Deployment(name = EmployeeServletDistributable.DEPLOYMENT_NAME, managed = false)
protected static WebArchive employee() {
return samlServletDeployment(EmployeeServletDistributable.DEPLOYMENT_NAME,
EmployeeServletDistributable.DEPLOYMENT_NAME + "/WEB-INF/web.xml",
SendUsernameServlet.class)
.addAsWebInfResource(new StringAsset(JBOSS_WEB_XML), "jboss-web.xml");
}
@TargetsContainer(value = "app-server-wildfly10-" + NODE_2_NAME)
@Deployment(name = EmployeeServletDistributable.DEPLOYMENT_NAME + "_2", managed = false)
protected static WebArchive employee2() {
return employee();
}
@Override
protected void prepareServerDirectories() throws Exception {
prepareServerDirectory("standalone-crossdc", "standalone-" + NODE_1_NAME);
prepareServerDirectory("standalone-crossdc", "standalone-" + NODE_2_NAME);
}
}

View file

@ -1,30 +0,0 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.testsuite.adapter.example.authorization;
import org.keycloak.testsuite.adapter.example.authorization.DefaultAuthzConfigAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-wildfly10")
//@AdapterLibsLocationProperty("adapter.libs.wildfly")
public class Wildfly10DefaultAuthzConfigAdapterTest extends DefaultAuthzConfigAdapterTest {
}

View file

@ -1,31 +0,0 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.testsuite.adapter.example.authorization;
import org.jboss.arquillian.container.test.api.RunAsClient;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@RunAsClient
@AppServerContainer("app-server-wildfly10")
//@AdapterLibsLocationProperty("adapter.libs.wildfly")
public class Wildfly10PermissiveModeAdapterTest extends PermissiveModeAdapterTest {
}

View file

@ -1,30 +0,0 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.testsuite.adapter.example.authorization;
import org.keycloak.testsuite.adapter.example.authorization.AbstractPhotozExampleAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-wildfly10")
//@AdapterLibsLocationProperty("adapter.libs.wildfly")
public class Wildfly10PhotozExampleAdapterTest extends AbstractPhotozExampleAdapterTest {
}

View file

@ -1,31 +0,0 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.testsuite.adapter.example.authorization;
import org.jboss.arquillian.container.test.api.RunAsClient;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@RunAsClient
@AppServerContainer("app-server-wildfly10")
//@AdapterLibsLocationProperty("adapter.libs.wildfly")
public class Wildfly10ServletAuthzAdapterTest extends AbstractServletAuthzAdapterTest {
}

View file

@ -1,30 +0,0 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.testsuite.adapter.example.authorization;
import org.jboss.arquillian.container.test.api.RunAsClient;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
@RunAsClient
@AppServerContainer("app-server-wildfly10")
//@AdapterLibsLocationProperty("adapter.libs.wildfly")
public class Wildfly10ServletPolicyEnforcerAdapterTest extends ServletPolicyEnforcerTest {
}

View file

@ -1,12 +0,0 @@
package org.keycloak.testsuite.adapter.example.cors;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-wildfly10")
public class Wildfly10CorsExampleAdapterTest extends CorsExampleAdapterTest {
}

View file

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<distributable/>
<absolute-ordering/>
<module-name>%CONTEXT_PATH%</module-name>
<servlet-mapping>
<servlet-name>javax.ws.rs.core.Application</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<error-page>
<location>/error.html</location>
</error-page>
<security-constraint>
<web-resource-collection>
<web-resource-name>Application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>KEYCLOAK-SAML</auth-method>
<realm-name>demo</realm-name>
</login-config>
<security-role>
<role-name>manager</role-name>
</security-role>
<context-param>
<param-name>keycloak.sessionIdMapperUpdater.classes</param-name>
<param-value>org.keycloak.adapters.saml.wildfly.infinispan.InfinispanSessionCacheIdMapperUpdater</param-value>
</context-param>
</web-app>

View file

@ -1,38 +0,0 @@
<?xml version="1.0"?>
<!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-tests-adapters-jboss</artifactId>
<version>4.1.0.Final-SNAPSHOT</version>
</parent>
<artifactId>integration-arquillian-tests-adapters-wildfly9</artifactId>
<name>Adapter Tests - JBoss - Wildfly 9</name>
<properties>
<app.server>wildfly9</app.server>
</properties>
</project>

View file

@ -1,13 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.DemoServletsAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-wildfly9")
public class Wildfly9OIDCAdapterTest extends DemoServletsAdapterTest {
}

View file

@ -1,28 +0,0 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.OIDCPublicKeyRotationAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
@AppServerContainer("app-server-wildfly9")
public class Wildfly9OIDCPublicKeyRotationAdapterTest extends OIDCPublicKeyRotationAdapterTest {
}

View file

@ -1,13 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.SessionServletAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-wildfly9")
public class Wildfly9OIDCSessionAdapterTest extends SessionServletAdapterTest {
}

View file

@ -1,11 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.OfflineServletsAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
* @author <a href="mailto:bruno@abstractj.org">Bruno Oliveira</a>.
*/
@AppServerContainer("app-server-wildfly9")
public class Wildfly9OfflineServletsAdapterTest extends OfflineServletsAdapterTest {
}

View file

@ -1,12 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.SAMLServletsAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
* @author mhajas
*/
@AppServerContainer("app-server-wildfly9")
public class Wildfly9SAMLAdapterTest extends SAMLServletsAdapterTest {
}

View file

@ -1,11 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.SAMLFilterServletAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
* @author mhajas
*/
@AppServerContainer("app-server-wildfly9")
public class Wildfly9SAMLFilterAdapterTest extends SAMLFilterServletAdapterTest {
}

View file

@ -1,13 +0,0 @@
package org.keycloak.testsuite.adapter;
import org.keycloak.testsuite.adapter.servlet.SecuredDeploymentsAdapterTest;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-wildfly9")
public class Wildfly9SecuredDeploymentsAdapterTest extends SecuredDeploymentsAdapterTest {
}