Upgrade adapters test to use wildfly 28 (jakarta only) via maven plugin
Closes #30324 Signed-off-by: rmartinc <rmartinc@redhat.com>
This commit is contained in:
parent
38d8cf2cb3
commit
fc65c73106
33 changed files with 150 additions and 942 deletions
4
pom.xml
4
pom.xml
|
@ -59,7 +59,7 @@
|
|||
<dist.archive.dir>${dist.archive.dir.prefix}-${dist.archive.dir.version}</dist.archive.dir>
|
||||
|
||||
<!-- core version for app-server-wildfly/eap tests, should match wildfly/eap server -->
|
||||
<tests.wildfly.core.version>19.0.1.Final</tests.wildfly.core.version>
|
||||
<tests.wildfly.core.version>21.1.1.Final</tests.wildfly.core.version>
|
||||
|
||||
<!-- Upstream WildFly Versions -->
|
||||
<upstream.wildfly.version>29.0.0.Final</upstream.wildfly.version>
|
||||
|
@ -190,7 +190,7 @@
|
|||
<jmeter.plugin.version>1.9.0</jmeter.plugin.version>
|
||||
<jmeter.analysis.plugin.version>1.0.4</jmeter.analysis.plugin.version>
|
||||
<osgi.bundle.plugin.version>5.1.8</osgi.bundle.plugin.version>
|
||||
<wildfly.plugin.version>2.0.1.Final</wildfly.plugin.version>
|
||||
<wildfly.plugin.version>5.0.0.Final</wildfly.plugin.version>
|
||||
<nexus.staging.plugin.version>1.6.13</nexus.staging.plugin.version>
|
||||
<frontend.plugin.version>1.15.0</frontend.plugin.version>
|
||||
<docker.maven.plugin.version>0.40.3</docker.maven.plugin.version>
|
||||
|
|
|
@ -22,17 +22,11 @@
|
|||
<app.server.jboss.artifactId>wildfly-ee-dist</app.server.jboss.artifactId>
|
||||
<app.server.jboss.version>${eap.version}</app.server.jboss.version>
|
||||
|
||||
<app.server.jboss.unpacked.folder.path>${containers.home}/jboss-distribution
|
||||
</app.server.jboss.unpacked.folder.path>
|
||||
<app.server.jboss.unpacked.folder.path>${containers.home}/jboss-distribution</app.server.jboss.unpacked.folder.path>
|
||||
<app.server.jboss.unpacked.folder.name>jboss-eap-8.0</app.server.jboss.unpacked.folder.name>
|
||||
|
||||
<app.server.saml.adapter.artifactId>keycloak-saml-adapter-galleon-pack</app.server.saml.adapter.artifactId>
|
||||
|
||||
<skip.apply.offline.cli>true</skip.apply.offline.cli>
|
||||
<skip.configure.clustered.scenario>true</skip.configure.clustered.scenario>
|
||||
<skip.elytron.adapter.installation>true</skip.elytron.adapter.installation>
|
||||
<skip.oidc.adapter.installation>true</skip.oidc.adapter.installation>
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
|
@ -41,26 +35,10 @@
|
|||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-servers-app-server-spi</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.jboss.arquillian.protocol</groupId>
|
||||
<artifactId>arquillian-protocol-servlet</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.arquillian.protocol</groupId>
|
||||
<artifactId>arquillian-protocol-servlet-jakarta</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wildfly.arquillian</groupId>
|
||||
<artifactId>wildfly-arquillian-container-managed</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.jboss.arquillian.protocol</groupId>
|
||||
<artifactId>arquillian-protocol-servlet</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
|
|
|
@ -35,37 +35,10 @@
|
|||
<assembly.xml>${project.parent.basedir}/assembly.xml</assembly.xml>
|
||||
<app.server.jboss.home>${containers.home}/${app.server.jboss.unpacked.folder.name}</app.server.jboss.home>
|
||||
<app.server.jboss.unpacked.folder.path>${containers.home}</app.server.jboss.unpacked.folder.path>
|
||||
|
||||
<oidc-adapter.version>${project.version}</oidc-adapter.version>
|
||||
<saml-adapter.version>${project.version}</saml-adapter.version>
|
||||
<skip.elytron.adapter.installation>true</skip.elytron.adapter.installation>
|
||||
<skip.adapter.offline.installation>true</skip.adapter.offline.installation>
|
||||
<skip.oidc.adapter.installation>false</skip.oidc.adapter.installation>
|
||||
<skip.java17.enablement>true</skip.java17.enablement>
|
||||
<!-- Workaround for WFCORE-5335 issue -->
|
||||
<cli.executable>bash</cli.executable>
|
||||
<cli.jboss-cli.arg>jboss-cli.${script.suffix}</cli.jboss-cli.arg>
|
||||
<cli.working.dir>${app.server.jboss.home}/bin</cli.working.dir>
|
||||
<cli.win.working.dir/>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
|
||||
<profile>
|
||||
<id>windows-properties-cli</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>Windows</family>
|
||||
</os>
|
||||
</activation>
|
||||
<properties>
|
||||
<cli.executable>run-jboss-cli.bat</cli.executable>
|
||||
<!-- Workaround for WFCORE-5335 - Intentionally kept empty for Windows (no special care needed there) -->
|
||||
<cli.jboss-cli.arg/>
|
||||
<cli.working.dir>${common.resources}/win</cli.working.dir>
|
||||
<cli.win.working.dir>${app.server.jboss.home}/bin</cli.win.working.dir>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>app-server-jboss-submodules</id>
|
||||
<activation>
|
||||
|
@ -73,24 +46,8 @@
|
|||
<exists>src</exists>
|
||||
</file>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<!-- These ZIPs can be fetched from artifactItems, but we need to properly assess the Maven build execution order -->
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>${app.server.saml.adapter.artifactId}</artifactId>
|
||||
<version>${saml-adapter.version}</version>
|
||||
<type>zip</type>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>*</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
|
@ -113,67 +70,6 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-jboss-distribution</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>${app.server.jboss.groupId}</groupId>
|
||||
<artifactId>${app.server.jboss.artifactId}</artifactId>
|
||||
<version>${app.server.jboss.version}</version>
|
||||
<type>zip</type>
|
||||
<outputDirectory>${app.server.jboss.unpacked.folder.path}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>xml-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>io-worker-threads</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>transform</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformationSets>
|
||||
<transformationSet>
|
||||
<dir>${app.server.jboss.home}/standalone/configuration</dir>
|
||||
<includes>
|
||||
<include>standalone.xml</include>
|
||||
<include>standalone-ha.xml</include>
|
||||
</includes>
|
||||
<stylesheet>${common.resources}/io.xsl</stylesheet>
|
||||
<outputDir>${app.server.jboss.home}/standalone/configuration</outputDir>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>worker.io-threads</name>
|
||||
<value>${app.server.worker.io-threads}</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>worker.task-max-threads</name>
|
||||
<value>${app.server.worker.task-max-threads}</value>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</transformationSet>
|
||||
</transformationSets>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
|
@ -267,269 +163,6 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-adapter-log-level-standalone</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.apply.offline.cli}</skip>
|
||||
<executable>${cli.executable}</executable>
|
||||
<workingDirectory>${cli.working.dir}</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
</environmentVariables>
|
||||
<arguments>
|
||||
<argument>${cli.jboss-cli.arg}</argument>
|
||||
<argument>--file=${common.resources}/cli/add-adapter-log-level.cli</argument>
|
||||
<!--
|
||||
following attribute is required just for windows
|
||||
see ${common.resources}/win/run-jboss-cli.bat
|
||||
!! the ordering is important, if you need to change it edit run-jboss-cli.bat !!
|
||||
-->
|
||||
<argument>${cli.win.working.dir}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>add-adapter-log-level-standalone-ha</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.apply.offline.cli}</skip>
|
||||
<executable>${cli.executable}</executable>
|
||||
<workingDirectory>${cli.working.dir}</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
</environmentVariables>
|
||||
<arguments>
|
||||
<argument>${cli.jboss-cli.arg}</argument>
|
||||
<argument>--file=${common.resources}/cli/add-adapter-log-level.cli</argument>
|
||||
<!--
|
||||
following attribute is required just for windows
|
||||
see ${common.resources}/win/run-jboss-cli.bat
|
||||
!! the ordering is important, if you need to change it edit run-jboss-cli.bat !!
|
||||
-->
|
||||
<argument>${cli.win.working.dir}</argument>
|
||||
<argument>-Dserver.config=standalone-ha.xml</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<!--SAML: eap, wf11-->
|
||||
<id>adapter-elytron-install-saml-offline-standalone</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.elytron.adapter.installation}</skip>
|
||||
<executable>${cli.executable}</executable>
|
||||
<workingDirectory>${cli.working.dir}</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
</environmentVariables>
|
||||
<arguments>
|
||||
<argument>${cli.jboss-cli.arg}</argument>
|
||||
<argument>--file=${app.server.jboss.home}/bin/adapter-elytron-install-saml-offline.cli</argument>
|
||||
<!--
|
||||
following attribute is required just for windows
|
||||
see ${common.resources}/win/run-jboss-cli.bat
|
||||
!! the ordering is important, if you need to change it edit run-jboss-cli.bat !!
|
||||
-->
|
||||
<argument>${cli.win.working.dir}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<!--SAML: eap, wf11-->
|
||||
<id>adapter-elytron-install-saml-offline-standalone-ha</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.elytron.adapter.installation}</skip>
|
||||
<executable>${cli.executable}</executable>
|
||||
<workingDirectory>${cli.working.dir}</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
</environmentVariables>
|
||||
<arguments>
|
||||
<argument>${cli.jboss-cli.arg}</argument>
|
||||
<argument>--file=${app.server.jboss.home}/bin/adapter-elytron-install-saml-offline.cli</argument>
|
||||
<!--
|
||||
following attribute is required just for windows
|
||||
see ${common.resources}/win/run-jboss-cli.bat
|
||||
!! the ordering is important, if you need to change it edit run-jboss-cli.bat !!
|
||||
-->
|
||||
<argument>${cli.win.working.dir}</argument>
|
||||
<argument>-Dserver.config=standalone-ha.xml</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<!--SAML: wf10, wf9-->
|
||||
<id>adapter-install-saml-offline-standalone</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.adapter.offline.installation}</skip>
|
||||
<executable>${cli.executable}</executable>
|
||||
<workingDirectory>${cli.working.dir}</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
</environmentVariables>
|
||||
<arguments>
|
||||
<argument>${cli.jboss-cli.arg}</argument>
|
||||
<argument>--file=${app.server.jboss.home}/bin/adapter-install-saml-offline.cli</argument>
|
||||
<!--
|
||||
following attribute is required just for windows
|
||||
see ${common.resources}/win/run-jboss-cli.bat
|
||||
!! the ordering is important, if you need to change it edit run-jboss-cli.bat !!
|
||||
-->
|
||||
<argument>${cli.win.working.dir}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<!--SAML: wf10, wf9-->
|
||||
<id>adapter-install-saml-offline-standalone-ha</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.adapter.offline.installation}</skip>
|
||||
<executable>${cli.executable}</executable>
|
||||
<workingDirectory>${cli.working.dir}</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
</environmentVariables>
|
||||
<arguments>
|
||||
<argument>${cli.jboss-cli.arg}</argument>
|
||||
<argument>--file=${app.server.jboss.home}/bin/adapter-install-saml-offline.cli</argument>
|
||||
<!--
|
||||
following attribute is required just for windows
|
||||
see ${common.resources}/win/run-jboss-cli.bat
|
||||
!! the ordering is important, if you need to change it edit run-jboss-cli.bat !!
|
||||
-->
|
||||
<argument>${cli.win.working.dir}</argument>
|
||||
<argument>-Dserver.config=standalone-ha.xml</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<!-- needed for eap with java 17 -->
|
||||
<id>enable-java-17</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.java17.enablement}</skip>
|
||||
<executable>${cli.executable}</executable>
|
||||
<workingDirectory>${cli.working.dir}</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
</environmentVariables>
|
||||
<arguments>
|
||||
<argument>${cli.jboss-cli.arg}</argument>
|
||||
<argument>--file=${app.server.jboss.home}/docs/examples/enable-elytron-se17.cli</argument>
|
||||
<argument>${cli.win.working.dir}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<!-- needed for eap with java 17 -->
|
||||
<id>enable-java-17-ha</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.java17.enablement}</skip>
|
||||
<executable>${cli.executable}</executable>
|
||||
<workingDirectory>${cli.working.dir}</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
</environmentVariables>
|
||||
<arguments>
|
||||
<argument>${cli.jboss-cli.arg}</argument>
|
||||
<argument>--file=${app.server.jboss.home}/docs/examples/enable-elytron-se17.cli</argument>
|
||||
<argument>${cli.win.working.dir}</argument>
|
||||
<argument>-Dconfig=standalone-ha.xml</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>configure-cluster-config</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.configure.clustered.scenario}</skip><!--wildfly9-->
|
||||
<executable>${cli.executable}</executable>
|
||||
<workingDirectory>${cli.working.dir}</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
</environmentVariables>
|
||||
<arguments>
|
||||
<argument>${cli.jboss-cli.arg}</argument>
|
||||
<argument>--file=${common.resources}/cli/configure-cluster-config.cli</argument>
|
||||
<!--
|
||||
following attribute is required just for windows
|
||||
see ${common.resources}/win/run-jboss-cli.bat
|
||||
!! the ordering is important, if you need to change it edit run-jboss-cli.bat !!
|
||||
-->
|
||||
<argument>${cli.win.working.dir}</argument>
|
||||
<argument>-Djboss.server.config.dir=${app.server.jboss.home}/standalone-cluster/configuration</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>configure-crossdc-config</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${skip.configure.clustered.scenario}</skip><!--wildfly9-->
|
||||
<executable>${cli.executable}</executable>
|
||||
<workingDirectory>${cli.working.dir}</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
</environmentVariables>
|
||||
<arguments>
|
||||
<argument>${cli.jboss-cli.arg}</argument>
|
||||
<argument>--file=${common.resources}/cli/configure-crossdc-config.cli</argument>
|
||||
<!--
|
||||
following attribute is required just for windows
|
||||
see ${common.resources}/win/run-jboss-cli.bat
|
||||
!! the ordering is important, if you need to change it edit run-jboss-cli.bat !!
|
||||
-->
|
||||
<argument>${cli.win.working.dir}</argument>
|
||||
<argument>-Djboss.server.config.dir=${app.server.jboss.home}/standalone-crossdc/configuration</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
|
@ -553,98 +186,6 @@
|
|||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>app-server-saml-supported</id>
|
||||
<activation>
|
||||
<file>
|
||||
<exists>src/saml-adapter-supported</exists>
|
||||
</file>
|
||||
</activation>
|
||||
<properties>
|
||||
<app.server.saml.adapter.supported>true</app.server.saml.adapter.supported>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireProperty>
|
||||
<property>app.server.saml.adapter.artifactId</property>
|
||||
</requireProperty>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-saml-adapter</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>${app.server.saml.adapter.artifactId}</artifactId>
|
||||
<version>${saml-adapter.version}</version>
|
||||
<type>zip</type>
|
||||
<outputDirectory>${app.server.jboss.home}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>app-server-apply-patches</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>app.server.patch.zips</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>install-patches</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>${common.resources}/install-patch.${script.suffix}</executable>
|
||||
<workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
|
||||
<environmentVariables>
|
||||
<JAVA_HOME>${app.server.java.home}</JAVA_HOME>
|
||||
<JBOSS_HOME>${app.server.jboss.home}</JBOSS_HOME>
|
||||
<APP_PATCH_ZIPS>${app.server.patch.zips}</APP_PATCH_ZIPS>
|
||||
</environmentVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<!-- EAP8 (not available to community yet) -->
|
||||
<profile>
|
||||
<id>app-server-eap8</id>
|
||||
|
|
|
@ -30,17 +30,13 @@
|
|||
<name>App Server - Wildfly</name>
|
||||
|
||||
<properties>
|
||||
<wildfly.server.version>23.0.2.Final</wildfly.server.version>
|
||||
<wildfly.server.version>29.0.1.Final</wildfly.server.version>
|
||||
<app.server.jboss>wildfly</app.server.jboss>
|
||||
|
||||
<app.server.jboss.groupId>org.wildfly</app.server.jboss.groupId>
|
||||
<app.server.jboss.artifactId>wildfly-dist</app.server.jboss.artifactId>
|
||||
<app.server.jboss.version>${wildfly.server.version}</app.server.jboss.version>
|
||||
<app.server.jboss.unpacked.folder.name>wildfly-${wildfly.server.version}</app.server.jboss.unpacked.folder.name>
|
||||
|
||||
<app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
|
||||
|
||||
<skip.elytron.adapter.installation>false</skip.elytron.adapter.installation>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -59,4 +55,49 @@
|
|||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.wildfly.plugins</groupId>
|
||||
<artifactId>wildfly-maven-plugin</artifactId>
|
||||
<version>${wildfly.plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>provision</goal>
|
||||
</goals>
|
||||
<phase>generate-sources</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<provisioningDir>${app.server.jboss.home}</provisioningDir>
|
||||
<recordProvisioningState>true</recordProvisioningState>
|
||||
<logProvisioningTime>true</logProvisioningTime>
|
||||
<feature-packs>
|
||||
<feature-pack>
|
||||
<location>wildfly@maven(org.jboss.universe:community-universe)#${wildfly.server.version}</location>
|
||||
</feature-pack>
|
||||
<feature-pack>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-adapter-galleon-pack</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</feature-pack>
|
||||
</feature-packs>
|
||||
<layers>
|
||||
<layer>core-server</layer>
|
||||
<layer>web-server</layer>
|
||||
<layer>jaxrs-server</layer>
|
||||
<layer>datasources-web-server</layer>
|
||||
<layer>webservices</layer>
|
||||
<layer>web-console</layer>
|
||||
<layer>keycloak-saml</layer>
|
||||
<layer>keycloak-client-saml</layer>
|
||||
<layer>keycloak-client-saml-ejb</layer>
|
||||
</layers>
|
||||
<skip>false</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
<module>servlet-authz</module>
|
||||
<module>servlet-policy-enforcer</module>
|
||||
<module>servlets</module>
|
||||
<module>servlets-jakarta</module>
|
||||
<module>cors</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
src/
|
|
@ -1,126 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-test-apps</artifactId>
|
||||
<version>999.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>integration-arquillian-test-apps-servlets-jakarta</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<jakarta-transformer-sources>${project.basedir}/../servlets/src</jakarta-transformer-sources>
|
||||
<jakarta-transformer-target>${project.basedir}/src</jakarta-transformer-target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-util</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-policy-enforcer</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.ws.rs</groupId>
|
||||
<artifactId>jakarta.ws.rs-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-adapter-spi</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-adapter-api-public</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.resteasy</groupId>
|
||||
<artifactId>resteasy-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.quarkus.resteasy.reactive</groupId>
|
||||
<artifactId>resteasy-reactive-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-adapter-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-core-public</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>transform</id>
|
||||
<phase>initialize</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<property name="plugin_classpath" refid="maven.plugin.classpath"/>
|
||||
<delete dir="${jakarta-transformer-target}"/>
|
||||
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
|
||||
<arg value="${jakarta-transformer-sources}"/>
|
||||
<arg value="${jakarta-transformer-target}"/>
|
||||
<classpath>
|
||||
<pathelement path="${plugin_classpath}"/>
|
||||
</classpath>
|
||||
</java>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.transformer</groupId>
|
||||
<artifactId>org.eclipse.transformer.cli</artifactId>
|
||||
<version>0.5.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.10.14</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -14,11 +14,8 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jboss.spec.javax.servlet</groupId>
|
||||
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
|
||||
<!-- wherever this is being deployed, the Servlet API spec should already be there.
|
||||
Therefore, make this provided to avoid mixing APIs on the target -->
|
||||
<scope>provided</scope>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
@ -39,8 +36,8 @@
|
|||
<artifactId>keycloak-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.spec.javax.ws.rs</groupId>
|
||||
<artifactId>jboss-jaxrs-api_2.1_spec</artifactId>
|
||||
<groupId>jakarta.ws.rs</groupId>
|
||||
<artifactId>jakarta.ws.rs-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak</groupId>
|
||||
|
|
|
@ -21,9 +21,9 @@ package org.keycloak.testsuite.adapter.filter;
|
|||
import org.jboss.logging.Logger;
|
||||
import org.keycloak.common.util.Time;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.*;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.keycloak.testsuite.adapter.servlet;
|
||||
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.annotation.WebServlet;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ package org.keycloak.testsuite.adapter.servlet;
|
|||
|
||||
import org.keycloak.KeycloakSecurityContext;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ import org.keycloak.common.util.Base64Url;
|
|||
import org.keycloak.common.util.KeycloakUriBuilder;
|
||||
import org.keycloak.representations.AccessToken;
|
||||
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.annotation.WebServlet;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
|
||||
package org.keycloak.testsuite.adapter.servlet;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
|
|
|
@ -19,12 +19,12 @@ package org.keycloak.testsuite.adapter.servlet;
|
|||
|
||||
import org.keycloak.KeycloakSecurityContext;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.core.HttpHeaders;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.annotation.WebServlet;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.ws.rs.core.HttpHeaders;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
|
|
|
@ -19,12 +19,12 @@ package org.keycloak.testsuite.adapter.servlet;
|
|||
|
||||
import org.keycloak.KeycloakSecurityContext;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.core.HttpHeaders;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.annotation.WebServlet;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.ws.rs.core.HttpHeaders;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
|
||||
package org.keycloak.testsuite.adapter.servlet;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import org.keycloak.adapters.spi.AuthenticationError;
|
||||
|
@ -35,7 +35,7 @@ public class ErrorServlet extends HttpServlet {
|
|||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
authError = (AuthenticationError)req.getAttribute(AuthenticationError.class.getName());
|
||||
|
||||
Integer statusCode = (Integer) req.getAttribute("javax.servlet.error.status_code");
|
||||
Integer statusCode = (Integer) req.getAttribute("jakarta.servlet.error.status_code");
|
||||
|
||||
resp.setContentType("text/html");
|
||||
PrintWriter pw = resp.getWriter();
|
||||
|
|
|
@ -19,11 +19,11 @@ package org.keycloak.testsuite.adapter.servlet;
|
|||
|
||||
import org.junit.Assert;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.annotation.WebServlet;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@ import javax.naming.directory.Attributes;
|
|||
import javax.naming.directory.DirContext;
|
||||
import javax.naming.directory.InitialDirContext;
|
||||
import javax.security.sasl.Sasl;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Hashtable;
|
||||
|
|
|
@ -18,10 +18,10 @@ package org.keycloak.testsuite.adapter.servlet;
|
|||
|
||||
import org.keycloak.KeycloakSecurityContext;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
|
||||
package org.keycloak.testsuite.adapter.servlet;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@ import org.keycloak.saml.common.exceptions.ConfigurationException;
|
|||
import org.keycloak.saml.common.exceptions.ParsingException;
|
||||
import org.keycloak.saml.common.exceptions.ProcessingException;
|
||||
import org.keycloak.saml.processing.api.saml.v2.request.SAML2Request;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.core.UriBuilder;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.ws.rs.core.UriBuilder;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.net.URI;
|
||||
|
|
|
@ -25,18 +25,18 @@ import org.keycloak.adapters.saml.SamlSession;
|
|||
import org.keycloak.adapters.spi.AuthenticationError;
|
||||
import org.keycloak.saml.processing.core.saml.v2.constants.X500SAMLProfileConstants;
|
||||
|
||||
import javax.servlet.RequestDispatcher;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.HttpHeaders;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
import jakarta.servlet.RequestDispatcher;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
import jakarta.ws.rs.core.Context;
|
||||
import jakarta.ws.rs.core.HttpHeaders;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
|
||||
package org.keycloak.testsuite.adapter.servlet;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.annotation.WebServlet;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.Serializable;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<description></description>
|
||||
|
||||
<properties>
|
||||
<arquillian.protocol.default>Servlet 3.0</arquillian.protocol.default>
|
||||
<arquillian.protocol.default>Servlet 5.0</arquillian.protocol.default>
|
||||
<cli.log.output>false</cli.log.output>
|
||||
<test.intermittent>false</test.intermittent>
|
||||
<exclude.test>-</exclude.test>
|
||||
|
@ -129,6 +129,11 @@
|
|||
<artifactId>integration-arquillian-util</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-test-apps-servlets</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mvel</groupId>
|
||||
<artifactId>mvel2</artifactId>
|
||||
|
@ -504,7 +509,6 @@
|
|||
<app.server>eap8</app.server>
|
||||
<app.server.skip.unpack>false</app.server.skip.unpack>
|
||||
<app.server.artifactId>integration-arquillian-servers-app-server-jboss-galleon</app.server.artifactId>
|
||||
<arquillian.protocol.default>Servlet 5.0</arquillian.protocol.default>
|
||||
<wildfly.core.version>${tests.wildfly.core.version}</wildfly.core.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
|
|
@ -1,125 +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.example.hal;
|
||||
|
||||
import static org.keycloak.testsuite.utils.io.IOUtil.loadRealm;
|
||||
import static org.keycloak.testsuite.util.ServerURLs.getAuthServerContextRoot;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import org.jboss.arquillian.drone.api.annotation.Drone;
|
||||
|
||||
import org.jboss.arquillian.graphene.page.Page;
|
||||
import org.junit.Assume;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.keycloak.representations.idm.RealmRepresentation;
|
||||
import org.keycloak.testsuite.adapter.AbstractAdapterTest;
|
||||
import org.keycloak.testsuite.arquillian.AppServerTestEnricher;
|
||||
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
|
||||
import org.keycloak.testsuite.pages.AppPage;
|
||||
import org.keycloak.testsuite.pages.LoginPage;
|
||||
import org.keycloak.testsuite.util.JavascriptBrowser;
|
||||
import org.keycloak.testsuite.util.DroneUtils;
|
||||
import org.keycloak.testsuite.util.TestAppHelper;
|
||||
import org.keycloak.testsuite.utils.arquillian.ContainerConstants;
|
||||
import org.keycloak.testsuite.pages.AppServerWelcomePage;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.wildfly.extras.creaper.core.online.CliException;
|
||||
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
|
||||
import org.wildfly.extras.creaper.core.online.operations.Address;
|
||||
import org.wildfly.extras.creaper.core.online.operations.OperationException;
|
||||
import org.wildfly.extras.creaper.core.online.operations.Operations;
|
||||
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
|
||||
*/
|
||||
@AppServerContainer(ContainerConstants.APP_SERVER_EAP8)
|
||||
public class ConsoleProtectionTest extends AbstractAdapterTest {
|
||||
|
||||
@Page
|
||||
protected LoginPage loginPage;
|
||||
|
||||
@Page
|
||||
protected AppPage appPage;
|
||||
|
||||
// Javascript browser needed KEYCLOAK-4703
|
||||
@Drone
|
||||
@JavascriptBrowser
|
||||
protected WebDriver jsDriver;
|
||||
|
||||
@Page
|
||||
@JavascriptBrowser
|
||||
protected AppServerWelcomePage appServerWelcomePage;
|
||||
|
||||
@Override
|
||||
public void addAdapterTestRealms(List<RealmRepresentation> testRealms) {
|
||||
testRealms.add(loadRealm("/wildfly-integration/wildfly-management-realm.json"));
|
||||
}
|
||||
|
||||
@Before
|
||||
public void beforeConsoleProtectionTest() throws IOException, OperationException {
|
||||
try (OnlineManagementClient clientWorkerNodeClient = AppServerTestEnricher.getManagementClient()) {
|
||||
|
||||
Operations operations = new Operations(clientWorkerNodeClient);
|
||||
|
||||
Assume.assumeTrue(operations.exists(Address.subsystem("elytron").and("security-domain", "KeycloakDomain")));
|
||||
|
||||
// Create a realm for both wildfly console and mgmt interface
|
||||
clientWorkerNodeClient.execute("/subsystem=keycloak/realm=jboss-infra:add(auth-server-url=" + getAuthServerContextRoot() + "/auth,realm-public-key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB)");
|
||||
|
||||
// Create a secure-deployment in order to protect mgmt interface
|
||||
clientWorkerNodeClient.execute("/subsystem=keycloak/secure-deployment=wildfly-management:add(realm=jboss-infra,resource=wildfly-management,principal-attribute=preferred_username,bearer-only=true,ssl-required=EXTERNAL)");
|
||||
|
||||
// Protect HTTP mgmt interface with Keycloak adapter
|
||||
clientWorkerNodeClient.execute("/core-service=management/management-interface=http-interface:undefine-attribute(name=security-realm)");
|
||||
clientWorkerNodeClient.execute("/subsystem=elytron/http-authentication-factory=keycloak-mgmt-http-authentication:add(security-domain=KeycloakDomain,http-server-mechanism-factory=wildfly-management,mechanism-configurations=[{mechanism-name=KEYCLOAK,mechanism-realm-configurations=[{realm-name=KeycloakOIDCRealm,realm-mapper=keycloak-oidc-realm-mapper}]}])");
|
||||
clientWorkerNodeClient.execute("/core-service=management/management-interface=http-interface:write-attribute(name=http-authentication-factory,value=keycloak-mgmt-http-authentication)");
|
||||
clientWorkerNodeClient.execute("/core-service=management/management-interface=http-interface:write-attribute(name=http-upgrade, value={enabled=true, sasl-authentication-factory=management-sasl-authentication})");
|
||||
|
||||
// Enable RBAC where roles are obtained from the identity
|
||||
clientWorkerNodeClient.execute("/core-service=management/access=authorization:write-attribute(name=provider,value=rbac)");
|
||||
clientWorkerNodeClient.execute("/core-service=management/access=authorization:write-attribute(name=use-identity-roles,value=true)");
|
||||
|
||||
// Create a secure-server in order to publish the wildfly console configuration via mgmt interface
|
||||
clientWorkerNodeClient.execute("/subsystem=keycloak/secure-server=wildfly-console:add(realm=jboss-infra,resource=wildfly-console,public-client=true)");
|
||||
|
||||
log.debug("Reloading the server");
|
||||
new Administration(clientWorkerNodeClient).reload();
|
||||
log.debug("Reloaded");
|
||||
} catch (CliException | IOException | InterruptedException | TimeoutException cause) {
|
||||
throw new RuntimeException("Failed to configure app server", cause);
|
||||
}
|
||||
|
||||
DroneUtils.addWebDriver(jsDriver);
|
||||
log.debug("Added jsDriver");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUserCanAccessAccountService() {
|
||||
TestAppHelper testAppHelper = new TestAppHelper(oauth, loginPage, appPage);
|
||||
testAppHelper.login("admin", "admin");
|
||||
appPage.assertCurrent();
|
||||
|
||||
appServerWelcomePage.navigateToAccessControl();
|
||||
appServerWelcomePage.navigateManageProfile();
|
||||
}
|
||||
}
|
|
@ -24,12 +24,12 @@
|
|||
<module-name>%CONTEXT_PATH%</module-name>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>javax.ws.rs.core.Application</servlet-name>
|
||||
<servlet-name>jakarta.ws.rs.core.Application</servlet-name>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>javax.ws.rs.core.Application</servlet-name>
|
||||
<servlet-name>jakarta.ws.rs.core.Application</servlet-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
<module-name>%CONTEXT_PATH%</module-name>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>javax.ws.rs.core.Application</servlet-name>
|
||||
<servlet-name>jakarta.ws.rs.core.Application</servlet-name>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>javax.ws.rs.core.Application</servlet-name>
|
||||
<servlet-name>jakarta.ws.rs.core.Application</servlet-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
<module-name>%CONTEXT_PATH%</module-name>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>javax.ws.rs.core.Application</servlet-name>
|
||||
<servlet-name>jakarta.ws.rs.core.Application</servlet-name>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>javax.ws.rs.core.Application</servlet-name>
|
||||
<servlet-name>jakarta.ws.rs.core.Application</servlet-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
<module-name>%CONTEXT_PATH%</module-name>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>javax.ws.rs.core.Application</servlet-name>
|
||||
<servlet-name>jakarta.ws.rs.core.Application</servlet-name>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>javax.ws.rs.core.Application</servlet-name>
|
||||
<servlet-name>jakarta.ws.rs.core.Application</servlet-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
<module-name>%CONTEXT_PATH%</module-name>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>javax.ws.rs.core.Application</servlet-name>
|
||||
<servlet-name>jakarta.ws.rs.core.Application</servlet-name>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>javax.ws.rs.core.Application</servlet-name>
|
||||
<servlet-name>jakarta.ws.rs.core.Application</servlet-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
<module-name>%CONTEXT_PATH%</module-name>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>javax.ws.rs.core.Application</servlet-name>
|
||||
<servlet-name>jakarta.ws.rs.core.Application</servlet-name>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>javax.ws.rs.core.Application</servlet-name>
|
||||
<servlet-name>jakarta.ws.rs.core.Application</servlet-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
{
|
||||
"realm": "jboss-infra",
|
||||
"enabled": true,
|
||||
"sslRequired": "external",
|
||||
"requiredCredentials": [
|
||||
"password"
|
||||
],
|
||||
"users": [
|
||||
{
|
||||
"username": "admin",
|
||||
"enabled": true,
|
||||
"email": "admin@admin.com",
|
||||
"firstName": "Admin",
|
||||
"lastName": "Istrator",
|
||||
"credentials": [
|
||||
{
|
||||
"type": "password",
|
||||
"value": "admin"
|
||||
}
|
||||
],
|
||||
"realmRoles": [
|
||||
"Administrator"
|
||||
],
|
||||
"clientRoles": {
|
||||
"realm-management": [
|
||||
"realm-admin"
|
||||
],
|
||||
"account": [
|
||||
"manage-account"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"roles": {
|
||||
"realm": [
|
||||
{
|
||||
"name": "Administrator",
|
||||
"description": "Administrator privileges"
|
||||
}
|
||||
]
|
||||
},
|
||||
"clients": [
|
||||
{
|
||||
"clientId": "wildfly-console",
|
||||
"enabled": true,
|
||||
"adminUrl": "http://localhost:10190",
|
||||
"baseUrl": "http://localhost:10190",
|
||||
"publicClient": true,
|
||||
"redirectUris": [
|
||||
"http://localhost:10190/*"
|
||||
],
|
||||
"webOrigins": ["http://localhost:10190"]
|
||||
},
|
||||
{
|
||||
"clientId": "wildfly-management",
|
||||
"secret": "secret",
|
||||
"enabled": true,
|
||||
"baseUrl": "/photoz-restful-api",
|
||||
"publicClient": false,
|
||||
"redirectUris": [
|
||||
"/photoz-restful-api/*"
|
||||
],
|
||||
"webOrigins" : ["*"]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1627,7 +1627,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.arquillian.protocol</groupId>
|
||||
<artifactId>arquillian-protocol-servlet</artifactId>
|
||||
<artifactId>arquillian-protocol-servlet-jakarta</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.arquillian.graphene</groupId>
|
||||
|
@ -1925,40 +1925,6 @@
|
|||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>app-server-eap8</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>app.server</name>
|
||||
<value>eap8</value>
|
||||
</property>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-test-apps-servlets-jakarta</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>not-app-server-eap8</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>app.server</name>
|
||||
<value>!eap8</value>
|
||||
</property>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-test-apps-servlets</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>generate-certs-for-custom-auth-server-host</id>
|
||||
<activation>
|
||||
|
|
Loading…
Reference in a new issue