From 8d4d5c1c54070f0e2c3538bd112aff907ee44d2d Mon Sep 17 00:00:00 2001 From: Douglas Palmer Date: Thu, 25 Apr 2024 10:05:01 -0700 Subject: [PATCH] Remove redundant servers from the testsuite Closes #29089 Signed-off-by: Douglas Palmer --- .../topics/overview/features.adoc | 4 - pom.xml | 6 - .../integration-arquillian/HOW-TO-RUN.md | 26 -- testsuite/integration-arquillian/README.md | 1 - testsuite/integration-arquillian/pom.xml | 3 - .../integration-arquillian/servers/README.md | 2 - .../servers/app-server/README.md | 6 - .../WildflyDeploymentArchiveProcessor.java | 6 - .../servers/app-server/jetty/94/pom.xml | 79 ---- .../jetty/Jetty94AppServerTest.java | 5 - .../servers/app-server/jetty/common/pom.xml | 132 ------ .../arquillian/jetty/JettyAppProvider.java | 15 - .../arquillian/jetty/JettyAppServer.java | 324 --------------- .../JettyAppServerArquillianExtension.java | 34 -- .../jetty/JettyAppServerConfiguration.java | 77 ---- .../arquillian/jetty/KeycloakAdapterApp.java | 92 ----- .../jetty/container/AppServerVersion.java | 25 -- .../container/JettyAppServerProvider.java | 83 ---- .../JettyDeploymentArchiveProcessor.java | 68 ---- .../saml/util/RestSamlApplicationConfig.java | 47 --- ...boss.arquillian.core.spi.LoadableExtension | 1 - ...llian.container.AppServerContainerProvider | 1 - .../jetty/AbstractJettyAppServerTest.java | 248 ------------ .../src/test/resources/log4j.properties | 5 - .../common/src/test/resources/web-oidc.xml | 12 - .../common/src/test/resources/web-saml.xml | 12 - .../servers/app-server/jetty/pom.xml | 47 --- .../servers/app-server/pom.xml | 2 - .../servers/app-server/tomcat/assembly.xml | 46 --- .../common/common-files/keystore/adapter.jks | Bin 2290 -> 0 bytes .../common-files/keystore/keycloak.truststore | Bin 1914 -> 0 bytes .../common-files/tomcat-add-connector.xsl | 43 -- .../common/common-files/tomcat-users.xsl | 39 -- .../servers/app-server/tomcat/common/pom.xml | 33 -- .../servlet/TomcatConfigApplication.java | 12 - .../AbstractTomcatAppServerProvider.java | 81 ---- ...ommonTomcatDeploymentArchiveProcessor.java | 78 ---- .../servers/app-server/tomcat/pom.xml | 375 ------------------ .../servers/app-server/tomcat/tomcat8/pom.xml | 55 --- .../Tomcat8AppServerArquillianExtension.java | 30 -- .../container/Tomcat8AppServerProvider.java | 40 -- ...boss.arquillian.core.spi.LoadableExtension | 1 - ...llian.container.AppServerContainerProvider | 1 - .../tomcat/tomcat8/src/saml-adapter-supported | 1 - .../tomcat/tomcat8/src/tomcat-submodule | 1 - .../servers/app-server/tomcat/tomcat9/pom.xml | 56 --- .../Tomcat9AppServerArquillianExtension.java | 30 -- .../container/Tomcat9AppServerProvider.java | 33 -- ...boss.arquillian.core.spi.LoadableExtension | 1 - ...llian.container.AppServerContainerProvider | 1 - .../tomcat/tomcat9/src/saml-adapter-supported | 1 - .../tomcat/tomcat9/src/tomcat-submodule | 1 - .../UndertowDeploymentArchiveProcessor.java | 5 - .../integration-arquillian/servers/pom.xml | 3 - .../src/main/webapp/META-INF/context.xml | 20 - .../src/main/webapp/META-INF/context.xml | 20 - .../src/main/webapp/META-INF/context.xml | 20 - .../integration-arquillian/tests/base/pom.xml | 97 ----- .../arquillian/AppServerTestEnricher.java | 4 - .../DeploymentArchiveProcessor.java | 139 +------ .../adapter/AbstractAdapterTest.java | 13 - .../adapter/AbstractServletsAdapterTest.java | 6 - .../DefaultAuthzConfigAdapterTest.java | 2 - .../example/PermissiveModeAdapterTest.java | 10 +- .../example/ServletAuthzCIPAdapterTest.java | 23 -- .../ServletAuthzCacheDisabledAdapterTest.java | 2 - .../ServletAuthzCacheLifespanAdapterTest.java | 2 - .../ServletAuthzLazyLoadPathsAdapterTest.java | 2 - ...ervletAuthzNoLazyLoadPathsAdapterTest.java | 2 - .../ServletPolicyEnforcerLifespanTest.java | 2 - .../example/ServletPolicyEnforcerTest.java | 2 - .../servlet/DemoServletsAdapterTest.java | 2 - .../servlet/SAMLClockSkewAdapterTest.java | 30 -- .../SAMLLoginResponseHandlingTest.java | 3 - .../servlet/SAMLLogoutAdapterTest.java | 2 - .../servlet/SAMLServletAdapterTest.java | 2 - .../SAMLServletSessionTimeoutTest.java | 3 - .../adapter/servlet/SamlSignatureTest.java | 2 - .../adapter/servlet/SamlXMLAttacksTest.java | 2 - .../servlet/SessionServletAdapterTest.java | 2 - .../jetty/JettyDemoServletAdapterTest.java | 64 --- .../jetty/JettySAMLServletAdapterTest.java | 22 - .../util/AdapterServletDeployment.java | 21 - .../basic-auth/META-INF/context.xml | 20 - .../basic-auth/WEB-INF/jetty-web.xml | 46 --- .../client-linking/META-INF/context.xml | 20 - .../client-linking/WEB-INF/jetty-web.xml | 46 --- .../META-INF/content.xml | 20 - .../WEB-INF/jetty-web.xml | 46 --- .../META-INF/content.xml | 20 - .../WEB-INF/jetty-web.xml | 46 --- .../test/resources/adapter-test/context.xml | 21 - .../META-INF/context.xml | 20 - .../WEB-INF/jetty-web.xml | 46 --- .../META-INF/context.xml | 20 - .../WEB-INF/jetty-web.xml | 46 --- .../META-INF/context.xml | 20 - .../WEB-INF/jetty-web.xml | 46 --- .../META-INF/context.xml | 20 - .../WEB-INF/jetty-web.xml | 46 --- .../customer-db/META-INF/context.xml | 20 - .../customer-db/WEB-INF/jetty-web.xml | 46 --- .../META-INF/context.xml | 20 - .../WEB-INF/jetty-web.xml | 46 --- .../META-INF/context.xml | 20 - .../WEB-INF/jetty-web.xml | 46 --- .../customer-portal/META-INF/context.xml | 20 - .../customer-portal/WEB-INF/jetty-web.xml | 46 --- .../exchange-linking/META-INF/context.xml | 20 - .../exchange-linking/WEB-INF/jetty-web.xml | 46 --- .../input-portal/META-INF/context.xml | 20 - .../input-portal/WEB-INF/jetty-web.xml | 46 --- .../multi-tenant/META-INF/context.xml | 20 - .../no-access-token/META-INF/context.xml | 20 - .../no-access-token/WEB-INF/jetty-web.xml | 46 --- .../offline-client/META-INF/context.xml | 20 - .../offline-client/WEB-INF/jetty-web.xml | 46 --- .../META-INF/context.xml | 20 - .../META-INF/context.xml | 20 - .../WEB-INF/jetty-web.xml | 46 --- .../product-portal/META-INF/context.xml | 20 - .../product-portal/WEB-INF/jetty-web.xml | 46 --- .../META-INF/context.xml | 20 - .../WEB-INF/jetty-web.xml | 46 --- .../META-INF/context.xml | 20 - .../WEB-INF/jetty-web.xml | 46 --- .../secure-portal/META-INF/context.xml | 20 - .../secure-portal/WEB-INF/jetty-web.xml | 46 --- .../META-INF/context.xml | 20 - .../WEB-INF/jetty-web.xml | 46 --- .../session-portal/META-INF/context.xml | 20 - .../session-portal/WEB-INF/jetty-web.xml | 46 --- .../token-min-ttl/META-INF/context.xml | 20 - .../token-min-ttl/WEB-INF/jetty-web.xml | 46 --- .../token-refresh/META-INF/context.xml | 20 - .../token-refresh/WEB-INF/jetty-web.xml | 46 --- .../integration-arquillian/tests/pom.xml | 14 - .../utils/annotation/UseServletFilter.java | 27 -- .../utils/arquillian/ContainerConstants.java | 6 - .../DeploymentArchiveProcessorUtils.java | 124 ------ .../TomcatAppServerConfigurationUtils.java | 50 --- ...TomcatDeploymentArchiveProcessorUtils.java | 138 ------- 142 files changed, 3 insertions(+), 4918 deletions(-) delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/94/pom.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/94/src/test/java/org/keycloak/testsuite/arquillian/jetty/Jetty94AppServerTest.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/pom.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppProvider.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppServer.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppServerArquillianExtension.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppServerConfiguration.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/KeycloakAdapterApp.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/container/AppServerVersion.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/container/JettyAppServerProvider.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/container/JettyDeploymentArchiveProcessor.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/saml/util/RestSamlApplicationConfig.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/java/org/keycloak/testsuite/arquillian/jetty/AbstractJettyAppServerTest.java delete mode 100755 testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/resources/log4j.properties delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/resources/web-oidc.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/resources/web-saml.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/jetty/pom.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/assembly.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/keystore/adapter.jks delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/keystore/keycloak.truststore delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/tomcat-add-connector.xsl delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/tomcat-users.xsl delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/pom.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/adapter/servlet/TomcatConfigApplication.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/AbstractTomcatAppServerProvider.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/CommonTomcatDeploymentArchiveProcessor.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/pom.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/pom.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat8AppServerArquillianExtension.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat8AppServerProvider.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/saml-adapter-supported delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/tomcat-submodule delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/pom.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat9AppServerArquillianExtension.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat9AppServerProvider.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/saml-adapter-supported delete mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/tomcat-submodule delete mode 100644 testsuite/integration-arquillian/test-apps/hello-world-authz-service/src/main/webapp/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/test-apps/servlet-authz/src/main/webapp/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/test-apps/servlet-policy-enforcer/src/main/webapp/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/jetty/JettyDemoServletAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/jetty/JettySAMLServletAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/basic-auth/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/basic-auth/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-linking/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-linking/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal-valid-alg/META-INF/content.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal-valid-alg/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal/META-INF/content.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal-root/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal-root/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-audience-required/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-audience-required/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-error-page/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-noconf/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-noconf/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-subsystem/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-subsystem/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/exchange-linking/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/exchange-linking/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/input-portal/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/input-portal/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/multi-tenant/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/no-access-token/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/no-access-token/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal-autodetect-bearer-only/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal-subsystem/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal-subsystem/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-custom-session-config/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-custom-session-config/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-rewrite-redirect-uri/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-rewrite-redirect-uri/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal-distributable/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal-distributable/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-min-ttl/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-min-ttl/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-refresh/META-INF/context.xml delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-refresh/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/annotation/UseServletFilter.java delete mode 100644 testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/tomcat/TomcatAppServerConfigurationUtils.java delete mode 100644 testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/tomcat/TomcatDeploymentArchiveProcessorUtils.java diff --git a/docs/documentation/server_admin/topics/overview/features.adoc b/docs/documentation/server_admin/topics/overview/features.adoc index b0edad17bd..e7fdc8e887 100644 --- a/docs/documentation/server_admin/topics/overview/features.adoc +++ b/docs/documentation/server_admin/topics/overview/features.adoc @@ -23,9 +23,5 @@ ifeval::[{project_community}==true] * Service Provider Interfaces (SPI) - A number of SPIs to enable customizing various aspects of the server. Authentication flows, user federation providers, protocol mappers and many more. -* Client adapters for JavaScript applications, WildFly, JBoss EAP, Tomcat, Spring, etc. -endif::[] -ifeval::[{project_product}==true] -* Client adapters for JavaScript applications, JBoss EAP, etc. endif::[] * Supports any platform/language that has an OpenID Connect Relying Party library or SAML 2.0 Service Provider library. diff --git a/pom.xml b/pom.xml index 8c40ba3fa0..b60989cb4d 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,6 @@ 2.3.2.Final 2.2.3.Final 1.9.0.Final - 9.4.40.v20210413 6.0.3 1.5.4.Final-format-001 1.6.0.Final @@ -148,7 +147,6 @@ 1.3.3 1.1 - ${jetty94.version} 4.25.1 6.0.0 @@ -212,10 +210,6 @@ -Xms${surefire.memory.Xms} -Xmx${surefire.memory.Xmx} -XX:MetaspaceSize=${surefire.memory.metaspace} -XX:MaxMetaspaceSize=${surefire.memory.metaspace.max} - - 8.5.76 - 9.0.16 - 0.21.5.RELEASE 2.0.3 diff --git a/testsuite/integration-arquillian/HOW-TO-RUN.md b/testsuite/integration-arquillian/HOW-TO-RUN.md index d7b4358461..8662b45d7d 100644 --- a/testsuite/integration-arquillian/HOW-TO-RUN.md +++ b/testsuite/integration-arquillian/HOW-TO-RUN.md @@ -142,19 +142,6 @@ and add packages manually. -Dtest=org.keycloak.testsuite.adapter.**.*Test -Papp-server-undertow -### Jetty - -At the moment we can run the testsuite with Jetty `9.4`. -Each version has its corresponding profile: - -* Jetty `9.4`: `app-server-jetty94` - -Here's how to run the tests with Jetty `9.4`: - - mvn -f testsuite/integration-arquillian/pom.xml \ - -Papp-server-jetty94 \ - -Dtest=org.keycloak.testsuite.adapter.**.*Test - ### Wildfly # Run tests @@ -163,19 +150,6 @@ Here's how to run the tests with Jetty `9.4`: -Papp-server-wildfly \ -Dtest=org.keycloak.testsuite.adapter.** -### Tomcat - -We run testsuite with Tomcat 7, 8 and 9. For specific versions see properties `${tomcat[7,8,9].version}` in parent [pom.xml](../../pom.xml). - -To run tests on Tomcat: - -```` -mvn -f testsuite/integration-arquillian/pom.xml \ - clean install \ - -Papp-server-tomcat[7,8,9] \ - -Dtest=org.keycloak.testsuite.adapter.** -```` - ### JBoss Fuse 6.3 1) Download JBoss Fuse 6.3 to your filesystem. It can be downloaded from http://origin-repository.jboss.org/nexus/content/groups/m2-proxy/org/jboss/fuse/jboss-fuse-karaf diff --git a/testsuite/integration-arquillian/README.md b/testsuite/integration-arquillian/README.md index c7467fea9f..409afa261a 100644 --- a/testsuite/integration-arquillian/README.md +++ b/testsuite/integration-arquillian/README.md @@ -161,7 +161,6 @@ integration-arquillian │ │ │ ├──app-server │ │ ├──jboss (wildfly/eap/as) -│ │ ├──tomcat │ │ └──karaf │ │ │ └──wildfly-balancer diff --git a/testsuite/integration-arquillian/pom.xml b/testsuite/integration-arquillian/pom.xml index b8e4b10247..a90c09b96a 100644 --- a/testsuite/integration-arquillian/pom.xml +++ b/testsuite/integration-arquillian/pom.xml @@ -49,11 +49,8 @@ 3.0.0-alpha.3 3.0.1.Final 1.0.1.Final - 1.0.0.CR3 2.2.0.Final 1.2.0.Beta3 - 1.1.0.Final - 1.1.0.Final ${undertow-jakarta.version} 1.0.0.Final 1.6.1 diff --git a/testsuite/integration-arquillian/servers/README.md b/testsuite/integration-arquillian/servers/README.md index 4042647f46..9bfd01a48f 100644 --- a/testsuite/integration-arquillian/servers/README.md +++ b/testsuite/integration-arquillian/servers/README.md @@ -25,8 +25,6 @@ The artifacts are used by the Arquillian TestSuite. - Wildfly 8, 9, 10 - EAP 6, 7 - Relative (Wildfly 10 / EAP 7) -- Tomcat - - Tomcat 7, 8, 9 ### Load Balancer diff --git a/testsuite/integration-arquillian/servers/app-server/README.md b/testsuite/integration-arquillian/servers/app-server/README.md index 1d5726781c..d811262e6d 100644 --- a/testsuite/integration-arquillian/servers/app-server/README.md +++ b/testsuite/integration-arquillian/servers/app-server/README.md @@ -27,9 +27,3 @@ Submodules are enabled with profiles: `-Papp-server-MODULE` ### SSL Configures SSL in `standalone.xml`. See profile `ssl`. - -## App Server - Tomcat -Submodules are enabled with profiles: `-Papp-server-MODULE` -### Modules -* __`tomcat8` Tomcat 8__ -* __`tomcat9` Tomcat 9__ diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/src/main/java/org/keycloak/testsuite/arquillian/wildfly/container/WildflyDeploymentArchiveProcessor.java b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/src/main/java/org/keycloak/testsuite/arquillian/wildfly/container/WildflyDeploymentArchiveProcessor.java index 644afcbb67..cdbbb13ccd 100644 --- a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/src/main/java/org/keycloak/testsuite/arquillian/wildfly/container/WildflyDeploymentArchiveProcessor.java +++ b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/src/main/java/org/keycloak/testsuite/arquillian/wildfly/container/WildflyDeploymentArchiveProcessor.java @@ -20,7 +20,6 @@ import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArch 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; /** @@ -47,12 +46,7 @@ public class WildflyDeploymentArchiveProcessor implements ApplicationArchiveProc 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) { diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/94/pom.xml b/testsuite/integration-arquillian/servers/app-server/jetty/94/pom.xml deleted file mode 100644 index 7157f875ca..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/94/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-jetty - 999.0.0-SNAPSHOT - - - 4.0.0 - - integration-arquillian-servers-app-server-jetty-94 - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-jetty-common - ${project.version} - - - org.jboss.arquillian.container - arquillian-jetty-embedded-9 - ${arquillian-jetty9-container.version} - - - - org.eclipse.jetty - jetty-server - ${jetty94.version} - - - - org.eclipse.jetty - jetty-deploy - ${jetty94.version} - - - - org.eclipse.jetty - jetty-jaas - ${jetty94.version} - - - - org.eclipse.jetty - jetty-annotations - ${jetty94.version} - - - - junit - junit - test - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-jetty-common - ${project.version} - tests - test-jar - - - - App Server - Jetty 9.4 - - diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/94/src/test/java/org/keycloak/testsuite/arquillian/jetty/Jetty94AppServerTest.java b/testsuite/integration-arquillian/servers/app-server/jetty/94/src/test/java/org/keycloak/testsuite/arquillian/jetty/Jetty94AppServerTest.java deleted file mode 100644 index b4ab3ea344..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/94/src/test/java/org/keycloak/testsuite/arquillian/jetty/Jetty94AppServerTest.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.keycloak.testsuite.arquillian.jetty; - -public class Jetty94AppServerTest extends AbstractJettyAppServerTest { - -} diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/pom.xml b/testsuite/integration-arquillian/servers/app-server/jetty/common/pom.xml deleted file mode 100644 index 95b09c06fa..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/pom.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-jetty - 999.0.0-SNAPSHOT - - - 4.0.0 - - - ${resteasy-legacy.version} - - - integration-arquillian-servers-app-server-jetty-common - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-spi - ${project.version} - - - org.keycloak.testsuite - integration-arquillian-util - ${project.version} - - - org.jboss.arquillian.container - arquillian-jetty-embedded-9 - ${arquillian-jetty9-container.version} - true - - - org.jboss.resteasy - resteasy-core - - - org.jboss.resteasy - resteasy-jaxb-provider - - - org.jboss.resteasy - resteasy-client - - - - org.eclipse.jetty - jetty-server - ${jetty94.version} - true - - - - org.eclipse.jetty - jetty-deploy - ${jetty94.version} - true - - - - org.eclipse.jetty - jetty-jaas - ${jetty94.version} - true - - - - org.eclipse.jetty - jetty-plus - ${jetty94.version} - true - - - org.eclipse.jetty - jetty-annotations - ${jetty94.version} - true - - - - - org.jboss.spec.javax.servlet.jsp - jboss-jsp-api_2.3_spec - - - - org.jboss.spec.javax.ws.rs - jboss-jaxrs-api_2.1_spec - - - - - junit - junit - test - - - - App Server - Jetty Common - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - test-jar - - - - - - - - diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppProvider.java b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppProvider.java deleted file mode 100644 index 9ffca1a226..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppProvider.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.keycloak.testsuite.arquillian.jetty; - -import org.jboss.arquillian.container.jetty.embedded_9.ArquillianAppProvider; -import org.jboss.shrinkwrap.api.Archive; - -class JettyAppProvider extends ArquillianAppProvider { - - public JettyAppProvider(JettyAppServerConfiguration config) { - super(config); - } - - protected KeycloakAdapterApp createApp(final Archive archive) { - return new KeycloakAdapterApp(super.createApp(archive), archive); - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppServer.java b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppServer.java deleted file mode 100644 index a442c4728a..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppServer.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * 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.jetty; - -import org.eclipse.jetty.annotations.AnnotationConfiguration; -import org.eclipse.jetty.deploy.App; -import org.eclipse.jetty.deploy.AppLifeCycle; -import org.eclipse.jetty.deploy.DeploymentManager; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.HttpConfiguration; -import org.eclipse.jetty.server.HttpConnectionFactory; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.ServerConnector; -import org.eclipse.jetty.server.SslConnectionFactory; -import org.eclipse.jetty.server.handler.ContextHandlerCollection; -import org.eclipse.jetty.server.handler.DefaultHandler; -import org.eclipse.jetty.server.handler.HandlerCollection; -import org.eclipse.jetty.servlet.ServletHandler; -import org.eclipse.jetty.servlet.ServletHolder; -import org.eclipse.jetty.servlet.ServletMapping; -import org.eclipse.jetty.util.ssl.SslContextFactory; -import org.eclipse.jetty.webapp.WebAppContext; -import org.jboss.arquillian.container.spi.client.container.DeployableContainer; -import org.jboss.arquillian.container.spi.client.container.DeploymentException; -import org.jboss.arquillian.container.spi.client.container.LifecycleException; -import org.jboss.arquillian.container.spi.client.protocol.ProtocolDescription; -import org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContext; -import org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData; -import org.jboss.arquillian.container.spi.client.protocol.metadata.Servlet; -import org.jboss.logging.Logger; -import org.jboss.resteasy.core.ResteasyDeploymentImpl; -import org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher; -import org.jboss.resteasy.spi.ResteasyDeployment; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.asset.ClassAsset; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.jboss.shrinkwrap.descriptor.api.Descriptor; -import org.keycloak.adapters.jetty.KeycloakJettyAuthenticator; -import org.keycloak.adapters.saml.jetty.KeycloakSamlAuthenticator; -import org.keycloak.testsuite.arquillian.jetty.saml.util.RestSamlApplicationConfig; -import org.keycloak.testsuite.utils.tls.TLSUtils; - -import javax.ws.rs.Path; -import java.lang.invoke.MethodHandles; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.stream.Collectors; - -public class JettyAppServer implements DeployableContainer { - - private static final Logger log = Logger.getLogger(MethodHandles.lookup().lookupClass()); - - private JettyAppServerConfiguration configuration; - private JettyAppProvider appProvider; - private DeploymentManager deployer; - private Server server; - - Map deployedApps = new ConcurrentHashMap<>(); - - @Override - public Class getConfigurationClass() { - return JettyAppServerConfiguration.class; - } - - @Override - public void setup(JettyAppServerConfiguration configuration) { - this.configuration = configuration; - appProvider = new JettyAppProvider(this.configuration); - } - - @Override - public void start() throws LifecycleException { - if (configuration == null) { - log.warn("Starting Jetty with default setup."); - setup(new JettyAppServerConfiguration()); - } - - long start = System.currentTimeMillis(); - - server = new Server(configuration.getBindHttpPort()); - setupSSL(); - - ContextHandlerCollection contexts = new ContextHandlerCollection(); - - deployer = new DeploymentManager(); - deployer.setContexts(contexts); - deployer.addAppProvider(appProvider); - server.addBean(deployer); - - HandlerCollection handlers = new HandlerCollection(); - handlers.addHandler(contexts); - handlers.addHandler(new DefaultHandler()); - server.setHandler(handlers); - - try { - server.start(); - } catch (Exception e) { - throw new LifecycleException("Unable to start Jetty", e); - } - log.infof("App server started in %dms on http://%s:%d/", (System.currentTimeMillis() - start), configuration.getBindAddress(), configuration.getBindHttpPort()); - } - - private void setupSSL() { - SslContextFactory sslContextFactory = new SslContextFactory(); - sslContextFactory.setSslContext(TLSUtils.initializeTLS()); - ServerConnector connector = new ServerConnector(server); - connector.setPort(configuration.getBindHttpPort()); - HttpConfiguration https = new HttpConfiguration(); - ServerConnector sslConnector = new ServerConnector(server, - new SslConnectionFactory(sslContextFactory, "http/1.1"), - new HttpConnectionFactory(https)); - sslConnector.setPort(configuration.getBindHttpsPort()); - server.setConnectors(new Connector[] { connector, sslConnector }); - } - - @Override - public void stop() throws LifecycleException { - try { - server.stop(); - } catch (Exception e) { - throw new LifecycleException("Unable to stop Jetty", e); - } - log.info("App Server stopped."); - } - - @Override - public ProtocolDescription getDefaultProtocol() { - return new ProtocolDescription("Servlet 3.1"); - } - - @Override - public ProtocolMetaData deploy(Archive archive) throws DeploymentException { - log.info("Deploying archive " + archive.getName()); - - if (!(archive instanceof WebArchive)) { - throw new IllegalArgumentException("JettyContainer only supports WebArchives."); - } - - WebArchive webArchive = (WebArchive) archive; - - try { - KeycloakAdapterApp app = appProvider.createApp(webArchive); - WebAppContext webAppContext = (WebAppContext) app.getContextHandler(); - - - addAdditionalConfigurations(webAppContext); - - setContextRoot(webArchive, app, webAppContext); - - if (app.usesOIDCAuthenticator()) { - addOIDCAuthenticator(webAppContext); - } - - if (app.usesSAMLAuthenticator()) { - addSAMLAuthenticator(webAppContext); - } - - if (app.usesJaxrs()) { - addRestEasyServlet(webArchive, webAppContext); - } - - setEmbeddedClassloaderForDeployment(webAppContext); - - deployer.addApp(app); - deployer.requestAppGoal(app, AppLifeCycle.STARTED); - - deployedApps.put(archive.getId(), app); - - HTTPContext httpContext = new HTTPContext(configuration.getBindAddress(), configuration.getBindHttpPort()); - ServletHandler servletHandler = webAppContext.getServletHandler(); - - for (ServletHolder servlet : servletHandler.getServlets()) { - log.debugf("Servlet context mapping: %s => %s", servlet.getName(), servlet.getContextPath()); - httpContext.add(new Servlet(servlet.getName(), servlet.getContextPath())); - } - - if (log.isInfoEnabled()) { - for (ServletMapping mapping : server.getChildHandlerByClass(ServletHandler.class).getServletMappings()) { - log.debugf("Servlet mapping: %s => %s", mapping.getServletName(), Arrays.toString(mapping.getPathSpecs())); - } - } - - return new ProtocolMetaData().addContext(httpContext); - } catch (Exception e) { - throw new DeploymentException("Unable to deploy archive", e); - } - } - - private void addAdditionalConfigurations(WebAppContext webAppContext) { - List configurations = new ArrayList<>(); - configurations.add(AnnotationConfiguration.class.getName()); - //due to Jetty incompatibility between 8 and 9, we need to use reflections here - try { - Method m = webAppContext.getClass().getDeclaredMethod("getDefaultConfigurationClasses", null); - configurations.addAll(Arrays.asList((String[]) m.invoke(webAppContext))); - } catch (Exception e) { - throw new IllegalStateException("Critical Jetty incompatibility detected", e); - } - - webAppContext.setConfigurationClasses(configurations.toArray(new String[0])); - } - - private void setContextRoot(WebArchive archive, KeycloakAdapterApp app, WebAppContext webAppContext) { - if ("ROOT.war".equals(archive.getName())) { - webAppContext.setContextPath("/"); - } else { - webAppContext.setContextPath("/" + app.getApplicationName()); - } - } - - private void addRestEasyServlet(WebArchive archive, WebAppContext webAppContext) { - log.debug("Starting Resteasy deployment"); - boolean addServlet = true; - ServletHolder resteasyServlet = new ServletHolder("javax.ws.rs.core.Application", new HttpServlet30Dispatcher()); - - String jaxrsApplication = getJaxRsApplication(archive); - Set> pathAnnotatedClasses = getPathAnnotatedClasses(archive); - - if (jaxrsApplication != null) { - log.debug("App has an Application.class: " + jaxrsApplication); - resteasyServlet.setInitParameter("javax.ws.rs.Application", jaxrsApplication); - } else if (!pathAnnotatedClasses.isEmpty()) { - log.debug("App has @Path annotated classes: " + pathAnnotatedClasses); - ResteasyDeployment deployment = new ResteasyDeploymentImpl(); - deployment.setApplication(new RestSamlApplicationConfig(pathAnnotatedClasses)); - webAppContext.setAttribute(ResteasyDeployment.class.getName(), deployment); - } else { - log.debug("An application doesn't have Application.class, nor @Path annotated classes. Skipping Resteasy initialization."); - addServlet = false; - } - - if (addServlet) { - // this should be /* in general. However Jetty 9.2 (this is bug specific to this version), - // can not merge two instances of javax.ws.rs.Application together (one from web.xml - // and the other one added here). In 9.1 and 9.4 this works fine. - // Once we stop supporting 9.2, this should replaced with /* and this comment should be removed. - webAppContext.addServlet(resteasyServlet, "/"); - } - log.debug("Finished Resteasy deployment"); - } - - private String getJaxRsApplication(WebArchive archive) { - return archive.getContent(archivePath -> - archivePath.get().startsWith("/WEB-INF/classes/") && archivePath.get().endsWith("Application.class")) - .values().stream().findFirst().map(node -> node.getPath().get()).orElse(null); - } - - private void addSAMLAuthenticator(WebAppContext webAppContext) { - webAppContext.getSecurityHandler().setAuthenticator(new KeycloakSamlAuthenticator()); - } - - private void addOIDCAuthenticator(WebAppContext webAppContext) { - webAppContext.getSecurityHandler().setAuthenticator(new KeycloakJettyAuthenticator()); - } - - private void setEmbeddedClassloaderForDeployment(WebAppContext webAppContext) { - ClassLoader parentCl = Thread.currentThread().getContextClassLoader(); - webAppContext.setClassLoader(parentCl); - } - - private Set> getPathAnnotatedClasses(WebArchive webArchive) { - return webArchive.getContent(archivePath -> - archivePath.get().startsWith("/WEB-INF/classes/") && - archivePath.get().endsWith(".class") - ).values().stream() - .filter(node -> node.getAsset() instanceof ClassAsset) - .map(node -> ((ClassAsset)node.getAsset()).getSource()) - .filter(clazz -> clazz.isAnnotationPresent(Path.class)) - .collect(Collectors.toSet()); - } - - @Override - public void undeploy(Archive archive) { - log.info("Undeploying archive " + archive.getName()); - - App app = deployedApps.get(archive.getId()); - if (app != null) { - deployer.requestAppGoal(app, AppLifeCycle.UNDEPLOYED); - } else { - log.warnf("Deployment '%s' (name=%s) not found", archive.getId(), archive.getName()); - } - } - - @Override - public void deploy(Descriptor descriptor) { - throw new UnsupportedOperationException("Not implemented"); - } - - @Override - public void undeploy(Descriptor descriptor) { - throw new UnsupportedOperationException("Not implemented"); - } - - public String getJettyVersion() { - return Server.getVersion(); - } - - /* - * This is a non-public method that should not be used. Only for testing. - */ - protected Server getServer() { - return server; - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppServerArquillianExtension.java b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppServerArquillianExtension.java deleted file mode 100644 index 54d21e9de7..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppServerArquillianExtension.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2019 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.arquillian.jetty; - -import org.jboss.arquillian.container.spi.client.container.DeployableContainer; -import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; -import org.jboss.arquillian.core.spi.LoadableExtension; -import org.keycloak.testsuite.arquillian.jetty.container.JettyDeploymentArchiveProcessor; - -public class JettyAppServerArquillianExtension implements LoadableExtension { - - @Override - public void register(ExtensionBuilder builder) { - builder - .service(DeployableContainer.class, JettyAppServer.class) - .service(ApplicationArchiveProcessor.class, JettyDeploymentArchiveProcessor.class); - } - -} diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppServerConfiguration.java b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppServerConfiguration.java deleted file mode 100644 index 6acbd4185a..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/JettyAppServerConfiguration.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2019 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.arquillian.jetty; - -import org.jboss.arquillian.container.jetty.embedded_9.JettyEmbeddedConfiguration; -import org.jboss.arquillian.container.spi.ConfigurationException; -import org.jboss.arquillian.container.spi.client.container.ContainerConfiguration; - -public class JettyAppServerConfiguration extends JettyEmbeddedConfiguration { - - private int bindHttpPortOffset = 0; - private int bindHttpsPortOffset = 0; - private int bindHttpPort = 8280; - private int bindHttpsPort = 8643; - private String bindAddress = "localhost"; - - @Override - public void validate() throws ConfigurationException { - setBindHttpPort(bindHttpPort + bindHttpPortOffset); - setBindHttpsPort(bindHttpsPort + bindHttpsPortOffset); - } - - public int getBindHttpPortOffset() { - return bindHttpPortOffset; - } - - public void setBindHttpPortOffset(int bindHttpPortOffset) { - this.bindHttpPortOffset = bindHttpPortOffset; - } - - public int getBindHttpsPortOffset() { - return bindHttpsPortOffset; - } - - public void setBindHttpsPortOffset(int bindHttpsPortOffset) { - this.bindHttpsPortOffset = bindHttpsPortOffset; - } - - public int getBindHttpPort() { - return bindHttpPort; - } - - public void setBindHttpPort(int bindHttpPort) { - this.bindHttpPort = bindHttpPort; - } - - public int getBindHttpsPort() { - return bindHttpsPort; - } - - public void setBindHttpsPort(int bindHttpsPort) { - this.bindHttpsPort = bindHttpsPort; - } - - public String getBindAddress() { - return bindAddress; - } - - public void setBindAddress(String bindAddress) { - this.bindAddress = bindAddress; - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/KeycloakAdapterApp.java b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/KeycloakAdapterApp.java deleted file mode 100644 index cc463c6e8d..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/KeycloakAdapterApp.java +++ /dev/null @@ -1,92 +0,0 @@ -package org.keycloak.testsuite.arquillian.jetty; - -import org.apache.commons.io.IOUtils; -import org.eclipse.jetty.deploy.App; -import org.jboss.shrinkwrap.api.Archive; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class KeycloakAdapterApp extends App { - - public static final String WEB_XML_PATH = "/WEB-INF/web.xml"; - - private static final Pattern modulePattern = Pattern.compile("(.*)"); - private static final Pattern authMethodPattern = Pattern.compile("(.*)"); - - private final boolean usesOIDCAuthenticator; - private final boolean usesSAMLAuthenticator; - private final boolean usesJaxrs; - private final String applicationName; - - public KeycloakAdapterApp(App app, Archive archive) { - super(app.getDeploymentManager(), app.getAppProvider(), app.getOriginId()); - boolean usesJaxRS = false; - boolean usesOIDCAuthenticator = false; - boolean usesSAMLAuthenticator = false; - String applicationName = archive.getName(); - if (archive.contains(WEB_XML_PATH)) { - try { - try (InputStream is = archive.get(WEB_XML_PATH).getAsset().openStream()) { - String webXml = IOUtils.toString(is, StandardCharsets.UTF_8); - - usesJaxRS = webXml.contains("javax.ws.rs.core.Application"); - - for(String line : webXml.split("\n")) { - line = line.trim(); - if (!usesOIDCAuthenticator && !usesSAMLAuthenticator) { - Matcher m = authMethodPattern.matcher(line); - if (m.find()) { - String authMethod = m.group(1); - switch (authMethod) { - case "KEYCLOAK": { - usesOIDCAuthenticator = true; - break; - } - case "KEYCLOAK-SAML": { - usesSAMLAuthenticator = true; - break; - } - default: { - throw new IllegalArgumentException("Unknown auth-method" + authMethod); - } - - - } - } - } - - Matcher m = modulePattern.matcher(line.trim()); - if (m.find()) { - applicationName = m.group(1); - } - } - } - } catch (IOException ignored) { - } - } - this.applicationName = applicationName; - this.usesJaxrs = usesJaxRS; - this.usesOIDCAuthenticator = usesOIDCAuthenticator; - this.usesSAMLAuthenticator = usesSAMLAuthenticator; - } - - public boolean usesOIDCAuthenticator() { - return usesOIDCAuthenticator; - } - - public boolean usesJaxrs() { - return usesJaxrs; - } - - public boolean usesSAMLAuthenticator() { - return usesSAMLAuthenticator; - } - - public String getApplicationName() { - return applicationName; - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/container/AppServerVersion.java b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/container/AppServerVersion.java deleted file mode 100644 index fe263c0a4b..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/container/AppServerVersion.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.keycloak.testsuite.arquillian.jetty.container; - -import org.eclipse.jetty.util.Jetty; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public enum AppServerVersion { - INSTANCE; - - private String appServerVersion; - - AppServerVersion() { - Pattern versionExtraction = Pattern.compile("(\\d\\.\\d).*"); - Matcher m = versionExtraction.matcher(Jetty.VERSION); - if (!m.find()) { - throw new IllegalStateException("Could not parse Jetty version: " + Jetty.VERSION); - } - appServerVersion = m.group(1).replaceAll("\\.", ""); - } - - public String getAppServerVersion() { - return appServerVersion; - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/container/JettyAppServerProvider.java b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/container/JettyAppServerProvider.java deleted file mode 100644 index ca509724a6..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/container/JettyAppServerProvider.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2019 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.arquillian.jetty.container; - -import org.jboss.shrinkwrap.descriptor.spi.node.Node; -import org.keycloak.testsuite.arquillian.container.AppServerContainerProvider; -import org.keycloak.testsuite.arquillian.jetty.JettyAppServer; - -import java.util.ArrayList; -import java.util.List; - -public class JettyAppServerProvider implements AppServerContainerProvider { - - private Node configuration; - private static final String containerName = "jetty" + AppServerVersion.INSTANCE.getAppServerVersion(); - - @Override - public String getName() { - return containerName; - } - - @Override - public List getContainers() { - List containers = new ArrayList<>(); - - containers.add(standaloneContainer()); - - //not supported yet -// containers.add(haNodeContainer(1)); -// containers.add(haNodeContainer(2)); - - 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("bindAddress", "0.0.0.0"); - createChild("bindHttpPort", "8280"); - createChild("adapterImplClass", JettyAppServer.class.getName()); - - return container; - } - - private Node haNodeContainer(int number) { - Node container = new Node("container"); - container.attribute("mode", "manual"); - container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName + "-ha-node-" + number); - - configuration = container.createChild("configuration"); - createChild("enabled", "true"); - createChild("bindAddress", "localhost"); - createChild("bindHttpPort", "8280"); - createChild("bindHttpPortOffset", Integer.toString(number)); - createChild("adapterImplClass", JettyAppServer.class.getName()); - - return container; - } - -} diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/container/JettyDeploymentArchiveProcessor.java b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/container/JettyDeploymentArchiveProcessor.java deleted file mode 100644 index 636abf1ba2..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/container/JettyDeploymentArchiveProcessor.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2019 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.arquillian.jetty.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; - -public class JettyDeploymentArchiveProcessor implements ApplicationArchiveProcessor { - - private final Logger log = Logger.getLogger(JettyDeploymentArchiveProcessor.class); - - @Override - public void process(Archive archive, TestClass testClass) { - if (DeploymentArchiveProcessorUtils.checkRunOnServerDeployment(archive)) return; - if (!System.getProperty("app.server", "jetty").contains("jetty")) return; - - modifyWebXML(archive, testClass); - - modifyOIDCAdapterConfig(archive, DeploymentArchiveProcessorUtils.ADAPTER_CONFIG_PATH); - - modifySAMLAdapterConfig(archive, DeploymentArchiveProcessorUtils.SAML_ADAPTER_CONFIG_PATH); - modifySAMLAdapterConfig(archive, DeploymentArchiveProcessorUtils.SAML_ADAPTER_CONFIG_PATH_TENANT1); - modifySAMLAdapterConfig(archive, DeploymentArchiveProcessorUtils.SAML_ADAPTER_CONFIG_PATH_TENANT2); - - modifyOIDCAdapterConfig(archive, DeploymentArchiveProcessorUtils.ADAPTER_CONFIG_PATH_JS); - } - - private void modifyWebXML(Archive archive, TestClass testClass) { - if (!archive.contains(DeploymentArchiveProcessorUtils.WEBXML_PATH)) return; - if (!testClass.getJavaClass().isAnnotationPresent(UseServletFilter.class)) return; - - log.debug("Modifying WEB.XML in " + archive.getName() + " for Servlet Filter."); - DeploymentArchiveProcessorUtils.modifyWebXMLForServletFilter(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, String adapterConfigPath) { - if (!archive.contains(adapterConfigPath)) return; - - log.debug("Modifying adapter config " + adapterConfigPath + " in " + archive.getName()); - DeploymentArchiveProcessorUtils.modifySAMLAdapterConfig(archive, adapterConfigPath); - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/saml/util/RestSamlApplicationConfig.java b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/saml/util/RestSamlApplicationConfig.java deleted file mode 100644 index eec55ac41d..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/java/org/keycloak/testsuite/arquillian/jetty/saml/util/RestSamlApplicationConfig.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2019 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.arquillian.jetty.saml.util; - -import javax.ws.rs.ApplicationPath; -import javax.ws.rs.core.Application; -import java.util.Set; - -/** - * Wildfly JAX-RS Integration has support for scanning deployment for annotations. - * - * https://github.com/wildfly/wildfly/blob/14.0.1.Final/jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/JaxrsAnnotationProcessor.java - * - * On undertow we have to set Application Class manually: - * - * ResteasyDeployment deployment = new ResteasyDeployment(); - * deployment.setApplication(application); - */ -@ApplicationPath("/") -public class RestSamlApplicationConfig extends Application { - - private final Set> classes; - - public RestSamlApplicationConfig(Set> classes) { - this.classes = classes; - } - - @Override - public Set> getClasses() { - return classes; - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension deleted file mode 100644 index e81992c714..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.testsuite.arquillian.jetty.JettyAppServerArquillianExtension diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider deleted file mode 100644 index be9fba4af5..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.testsuite.arquillian.jetty.container.JettyAppServerProvider diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/java/org/keycloak/testsuite/arquillian/jetty/AbstractJettyAppServerTest.java b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/java/org/keycloak/testsuite/arquillian/jetty/AbstractJettyAppServerTest.java deleted file mode 100644 index 7e4e48eb37..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/java/org/keycloak/testsuite/arquillian/jetty/AbstractJettyAppServerTest.java +++ /dev/null @@ -1,248 +0,0 @@ -package org.keycloak.testsuite.arquillian.jetty; - -import org.eclipse.jetty.deploy.DeploymentManager; -import org.eclipse.jetty.security.Authenticator; -import org.eclipse.jetty.security.SecurityHandler; -import org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContext; -import org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.Assert; -import org.junit.Test; -import org.keycloak.adapters.jetty.KeycloakJettyAuthenticator; -import org.keycloak.adapters.saml.jetty.KeycloakSamlAuthenticator; -import org.keycloak.testsuite.arquillian.jetty.container.JettyAppServerProvider; - -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; -import javax.ws.rs.core.Response; -import java.io.IOException; -import java.net.InetSocketAddress; -import java.net.Socket; -import java.net.SocketAddress; -import java.net.URI; -import java.net.URL; - -/** - * This is a basic set of sanity tests for checking Jetty server compatibility. - * If this test suite is green, it is OK to integrate it with the Arquillian testsuite. - */ -public abstract class AbstractJettyAppServerTest { - - public static final String TEST_SERVLET_NAME = "TestServlet"; - public static final String TEST_SERVLET_URL_MAPPING = "test-servlet"; - - @Test - public void testServerStartupAndShutdown() throws Exception { - // given - int httpPort = 8081; - int httpsPort = 8082; - - JettyAppServerConfiguration configuration = new JettyAppServerConfiguration(); - configuration.setBindHttpPort(httpPort); - configuration.setBindHttpsPort(httpsPort); - JettyAppServer server = new JettyAppServer(); - server.setup(configuration); - - // when - server.start(); - boolean wasFreeOnHTTPPortWhenServerStarted = isFree("localhost", httpPort); - boolean wasFreeOnHTTPSPortWhenServerStarted = isFree("localhost", httpsPort); - server.stop(); - boolean wasFreeOnHTTPWhenServerStopped = isFree("localhost", httpPort); - boolean wasFreeOnHTTPSWhenServerStopped = isFree("localhost", httpsPort); - - // then - Assert.assertFalse(wasFreeOnHTTPPortWhenServerStarted); - Assert.assertTrue(wasFreeOnHTTPWhenServerStopped); - Assert.assertFalse(wasFreeOnHTTPSPortWhenServerStarted); - Assert.assertTrue(wasFreeOnHTTPSWhenServerStopped); - } - - @Test - public void testDeployingServletApp() throws Exception { - // given - WebArchive archive = ShrinkWrap.create(WebArchive.class,"archive.war") - .addClasses(ExampleServlet.class); - - JettyAppServer server = new JettyAppServer(); - Response responseFromTheApp = null; - - // when - try { - server.start(); - ProtocolMetaData data = server.deploy(archive); - - HTTPContext servletContext = data.getContexts(HTTPContext.class).iterator().next(); - URI appURI = servletContext.getServletByName(TEST_SERVLET_NAME).getBaseURI().resolve(TEST_SERVLET_URL_MAPPING); - - Client client = ClientBuilder.newClient(); - responseFromTheApp = client.target(appURI).request().get(); - } finally { - server.stop(); - } - - // assert - Assert.assertNotNull(responseFromTheApp); - Assert.assertEquals(200, responseFromTheApp.getStatus()); - } - - @Test - public void testDeployingRESTApp() throws Exception { - // given - WebArchive archive = ShrinkWrap.create(WebArchive.class,"archive.war") - .addClasses(ExampleRest.class); - - JettyAppServer server = new JettyAppServer(); - Response responseFromTheApp = null; - - // when - try { - server.start(); - ProtocolMetaData data = server.deploy(archive); - - HTTPContext servletContext = data.getContexts(HTTPContext.class).iterator().next(); - URI appURI = servletContext.getServlets().get(0).getBaseURI(); - - Client client = ClientBuilder.newClient(); - responseFromTheApp = client.target(appURI).request().get(); - } finally { - server.stop(); - } - - // assert - Assert.assertNotNull(responseFromTheApp); - Assert.assertEquals(200, responseFromTheApp.getStatus()); - } - - @Test - public void testDeployingAndUndeploying() throws Exception { - // given - WebArchive archive = ShrinkWrap.create(WebArchive.class,"archive.war") - .addClasses(ExampleRest.class); - - JettyAppServer server = new JettyAppServer(); - Response responseFromTheApp = null; - - // when - try { - server.start(); - ProtocolMetaData data = server.deploy(archive); - - HTTPContext servletContext = data.getContexts(HTTPContext.class).iterator().next(); - URI appURI = servletContext.getServlets().get(0).getBaseURI(); - - server.undeploy(archive); - - Client client = ClientBuilder.newClient(); - responseFromTheApp = client.target(appURI).request().get(); - } finally { - server.stop(); - } - - // assert - Assert.assertNotNull(responseFromTheApp); - Assert.assertEquals(404, responseFromTheApp.getStatus()); - } - - @Test - public void testDetectingSAML() throws Exception { - // given - URL webXml = AbstractJettyAppServerTest.class.getResource("/web-saml.xml"); - WebArchive archive = ShrinkWrap.create(WebArchive.class,"archive.war") - .addAsWebInfResource(webXml, "web.xml"); - - JettyAppServer server = new JettyAppServer(); - - // when - Authenticator installedAuthenticator = null; - try { - server.start(); - server.deploy(archive); - - installedAuthenticator = server.getServer() - .getBean(DeploymentManager.class).getApps().iterator().next() - .getContextHandler().getChildHandlerByClass(SecurityHandler.class).getAuthenticator(); - } finally { - server.stop(); - } - - // assert - Assert.assertTrue(installedAuthenticator instanceof KeycloakSamlAuthenticator); - } - - @Test - public void testDetectingOIDC() throws Exception { - // given - URL webXml = AbstractJettyAppServerTest.class.getResource("/web-oidc.xml"); - WebArchive archive = ShrinkWrap.create(WebArchive.class,"archive.war") - .addAsWebInfResource(webXml, "web.xml"); - - JettyAppServer server = new JettyAppServer(); - - // when - Authenticator installedAuthenticator = null; - try { - server.start(); - server.deploy(archive); - - installedAuthenticator = server.getServer() - .getBean(DeploymentManager.class).getApps().iterator().next() - .getContextHandler().getChildHandlerByClass(SecurityHandler.class).getAuthenticator(); - } finally { - server.stop(); - } - - // assert - Assert.assertTrue(installedAuthenticator instanceof KeycloakJettyAuthenticator); - } - - @Test - public void testJettyVersion() throws Exception { - // given - String versionRegexp = "jetty\\d\\d"; - - // when - String appServerName = new JettyAppServerProvider().getName(); - - // assert - Assert.assertTrue(appServerName.matches(versionRegexp)); - } - - @WebServlet(name = TEST_SERVLET_NAME, urlPatterns = "/" + TEST_SERVLET_URL_MAPPING) - public static class ExampleServlet extends HttpServlet { - - @Override - public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { - resp.getWriter().println("ok"); - } - } - - @Path("/") - public static class ExampleRest extends HttpServlet { - - @GET - public Response doGet() { - return Response.ok().build(); - } - } - - public static boolean isFree(String hostName, int port) { - SocketAddress socketAddress = new InetSocketAddress(hostName, port); - Socket socket = new Socket(); - try { - socket.connect(socketAddress, 2000); - socket.close(); - return false; - } catch (Exception exception) { - return true; - } - } - -} diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/resources/log4j.properties b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/resources/log4j.properties deleted file mode 100755 index 0032431e6f..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/resources/log4j.properties +++ /dev/null @@ -1,5 +0,0 @@ -log4j.rootLogger=info, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %t [%c] %m%n \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/resources/web-oidc.xml b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/resources/web-oidc.xml deleted file mode 100644 index 71b191aa72..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/resources/web-oidc.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - KEYCLOAK - demo - - - diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/resources/web-saml.xml b/testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/resources/web-saml.xml deleted file mode 100644 index 00c6e3c251..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/common/src/test/resources/web-saml.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - KEYCLOAK-SAML - demo - - - diff --git a/testsuite/integration-arquillian/servers/app-server/jetty/pom.xml b/testsuite/integration-arquillian/servers/app-server/jetty/pom.xml deleted file mode 100644 index 1c938b754e..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jetty/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server - 999.0.0-SNAPSHOT - - - 4.0.0 - - integration-arquillian-servers-app-server-jetty - pom - - App Server - Jetty Parent - - - - app-server-jetty94 - - - app.server - jetty94 - - - - common - 94 - - - - - diff --git a/testsuite/integration-arquillian/servers/app-server/pom.xml b/testsuite/integration-arquillian/servers/app-server/pom.xml index 3ee99ab0d9..446e503c4a 100644 --- a/testsuite/integration-arquillian/servers/app-server/pom.xml +++ b/testsuite/integration-arquillian/servers/app-server/pom.xml @@ -45,9 +45,7 @@ jboss karaf - tomcat undertow - jetty diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/assembly.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/assembly.xml deleted file mode 100644 index 396cda30b0..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/assembly.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - ${app.server.tomcat} - - - zip - - - false - - - - ${app.server.tomcat.home} - app-server-${app.server.tomcat} - - **/*.sh - - - - ${app.server.tomcat.home} - app-server-${app.server.tomcat} - - **/*.sh - - 0755 - - - - diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/keystore/adapter.jks b/testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/keystore/adapter.jks deleted file mode 100644 index 522dc59bfd97c6628aa78654192c16a9c97d6649..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2290 zcmcgt`8(7L7oW{CWGo{~Axqgu-x-;)mAF}>lqEYeNY=4kAz8*n$Qol`k~OkiWYR5B zE`zZzk);?hmPATf#?^h^`@Z)tc%So}AI|5T^E~JIob!ARbDg;k0)Ze$4*uIYyokO$ND^v{RE2aX1_@PQ(bEgw=1&XV?CBUdFY(M!S)Hh`QauZy+U3S zoqG}P&NQ{GFv;P5Hco2>;s;PCUvr*S^P`=S+^2;7%7WJ6oe{p8!kBMBJvGSLX`o4{ zANxd4qeRXxgcHXn7rEoJnw4Xc^yz&~nv_luq4!<{&x1OTh>;MxzM!-%*LM~NpI@A(1x%6zK&=~#-H#>37^j1}hgETg9W5%)P9Aw?5VbG7Id3s2LjglC}!US{KV_2DM z#O>@^&Ic>Tlcn_q;oVa%o3ubhA)m7H9@`7|rR8TT0=4iD`3*h=xOGpNtfr~QarOl! zGE)U*25_B%w;kl7Oq&FtPh+URiM6&(?vrm}D`$^eNF7YDdGH+GiA2Ew*&tGOtJnnYq~rf&RvlHcj{vZ4yH zxr3~`AI@)WdDWi|YwENuF;>Rp$#d|K#4-wRU~&y?30FtW7~ns46{yC?$*NwXmyG=n zsiH&rj>ba{3ZkFWs0FTXgYU#e1!Yl~r%i9*r~drNcyIeTp{%0DvcpHe5%9xbKQW+2pzjcyCM}sbmw&df?*=6#)llSTXBbpY*9ro z7q!P$oi0m;@8~7jXWAaiH`141cG0R;J0VQ2fg|XAg8+{6g+x%mv9b zBt%h8_n1};ITT;1AlO`W>OvBBEaRCN&r&pyHDE{-EaTVTR@gF&eigd67GLRKinvz# z)Jw1>d&ZHy@4AjS;@D&Uf^og_NK^7{MwRWhH2uT3U5}HCnK`-x820q)Il(W8G_0cG z4C8*xliK zjPID>&adqrftyp{ z8?pO5leJ!VsD1)#`pt{}hC|jgWncEp@;$sx`-z4~VLQJnu3z$S-yf06?(65@OdCCY zT?65{@v*Me%<%r0n~;ct_r-_1i8*&o;cKBLt?>noBQMA!#*g)^xF`7y^9kKce~TlF zm68ge1_D9L0TQ$XAVCs}p%5?x0)xw_>Hu7Qe#12&@FvmU1^8iWLv{5J(h4+2U8 zbAtd9m;*urgF*R9Vw$P6t$-Tk7&k(4WJ8+}^7gv-*E`e2agL(eB_mVXj543go;=;d ztnDhVgUU^;p47DD#5}ACZ6onb-C(^btwqj4V_i<7?0e zVt6h$tB`a5jGMaIDE(`Lh>T*1Ax}i1&<&dtm#}%S;E#$Pz;e(cV@VggO;hiP=XTPY z+$j*nw&@np5dKY+S@(c+oll|OF-pliK4tPB|woRjQ90L1>n8CP-qMe1soY#$;aJS$(>00-;U#8 z5l6om5dGPPfC<3(7gTb%t?i|2LVN8Jr*#993v-d7|K|Sa{EoN>gLI>;_~m$_mH)j8lb`~!&|3OSMz*{&ohri>fz0W!-gEbW$O9mD*SsZ zazvp!TA{{13WvH)og2RXDoTE3tYX@!Tk_4+&fZX@a`u+{3uivZ7mtCpI%E@;+(oLF zz?hN0e1yL5+00VC`ny3B?--qC`HG^+Y!#oj%ehjz`1%0^Yc8X>a4V>VjOx)IeZG+0 z<@CBhrC@l~GHOwM1vC7%gR?48cDwFf_4fJ1^)Jiu5f5uug01%TwiI9=%d@g3V$nS#zUIov~e3Q5~N*_tA?=oTtS$FECJ74d#Dbsb&y!={r zneWp5S<~ln|4~i13cm8>>qZ%MokgAk_46dcqoiESW*^{OJbyCFOhcKgy$&Y=CR8iT zI{IWw<_;#E{dcy@R*HPo4L)&RZFUjYmT${KKiQnStF(T8tGN73o70V=%o1KII+BkL zy?%e({7KT$;{3T!nV1gsVk{z$O=t2)#;UEUIvvw}$F-zy-YnrN{RfStx$*DuXxcg}0bZJKnTG(I|M@=V#0hPJNti;lIgai{RBKXTuKcu=%%3;ZDp< zza>u(Pi8U;QP+8#QMP@W?kUGByC2Uuo^W`s>D)`N!y2Djy)wFV;}G}CZjCSNZ?FDh z+x_t0nv{BirF&GKy7^xTuOQU4{gJv9n^W|&7xxAJvv6iJt{w$FXOXvSB? z_^1l)pC@Ii7A%ykSPjn1h;Rf3Vqo^Ye};&BoDa;$*}!}p49&-`zrS~*1*Ab5Eb9`? z$K}}bF*LJt3v+mK$a3PmhNgx_1||k(riO+VQR2KNK-$O*%B7n-2<79p z-wr;epKb*!MsWw~t1O*1<#XHH*_}^vqpq5~aXNQ+YMr3l#&b&oS1y$6)Zg=D+KQ5W zPl6|hCZ12)9IVW_bzghRDxKX&HZ*-WI(gkyOLul{&iOotJhuosbaR@SUa$CD#ia1l zV`hokhIKFQ7&&Ixbn%ujY8K&>r$i?$= z>Cc%QNv${PPwFncvN(!KnLU?NrE}-U&W-D1dao~B*Xog_8pWu>tQjh_t+Du#oAyed zb9-M~99)#+_8pRs6%FK(GGxGf!OCfx)=`}kcW==?xGqI$m(^*sbOg?j%>BRYHdQ?N zH)pQM_HzFf+VA{lMo4UFWa_h=ztQ@ZW?mT2mON> z&Ymil?zd;Y7X4{fnY!uS^)vTu1MRzFSAS5{jE>g&lw$bf#{M%V8pqNPG(YGzvSHiM zv|*d=d0zPg_nvmGk*aN0yf^W+#8IJ_Gqx~_$G*K*G(Y%3-lj;^bDO;mxLiN-yiRam z`EF_1n&wZBF9`U*TTz~KePX3#yVlH$+FxrgD*0M@MTx{|FdWgoG+okX+KzM0F-%Rz z=QBH|W$n0o_;u|^K8s^bnKveR^3C2bSE_V=kLRP({)W9?Th)y(3f%TmQ>)_|L b25L_;I{77f7+J3@Gi(=DEm?BL#z+|eJ#@+D diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/tomcat-add-connector.xsl b/testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/tomcat-add-connector.xsl deleted file mode 100644 index 8b9e74db94..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/tomcat-add-connector.xsl +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/tomcat-users.xsl b/testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/tomcat-users.xsl deleted file mode 100644 index bfb4931e55..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/tomcat-users.xsl +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/common/pom.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/common/pom.xml deleted file mode 100644 index a0019ea56d..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/common/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - integration-arquillian-servers-app-server-tomcat - org.keycloak.testsuite - 999.0.0-SNAPSHOT - - 4.0.0 - - integration-arquillian-servers-app-server-tomcat-common - App Server - Tomcat common classes - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-spi - ${project.version} - - - org.keycloak.testsuite - integration-arquillian-util - ${project.version} - - - org.jboss.spec.javax.ws.rs - jboss-jaxrs-api_2.1_spec - provided - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/adapter/servlet/TomcatConfigApplication.java b/testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/adapter/servlet/TomcatConfigApplication.java deleted file mode 100644 index 21d639fa95..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/adapter/servlet/TomcatConfigApplication.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import javax.ws.rs.ApplicationPath; -import javax.ws.rs.core.Application; - -/** - * Basic auth app. - */ -@ApplicationPath("/") -public class TomcatConfigApplication extends Application { - -} diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/AbstractTomcatAppServerProvider.java b/testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/AbstractTomcatAppServerProvider.java deleted file mode 100644 index 5d5f7f4379..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/AbstractTomcatAppServerProvider.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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.tomcat.container; - -import org.jboss.arquillian.core.spi.Validate; -import org.jboss.shrinkwrap.descriptor.spi.node.Node; -import org.keycloak.testsuite.arquillian.container.AppServerContainerProvider; -import org.keycloak.testsuite.utils.arquillian.tomcat.TomcatAppServerConfigurationUtils; - -import java.util.ArrayList; -import java.util.List; - -public abstract class AbstractTomcatAppServerProvider implements AppServerContainerProvider { - - private final String catalinaHome; - private final String bindHttpPort; - private final String jmxPort; - private final String startupTimeoutInSeconds; - private final String USER = "manager"; - private final String PASS = "arquillian"; - - - public AbstractTomcatAppServerProvider() { - catalinaHome = System.getProperty("app.server.home"); - bindHttpPort = determineHttpPort(); - jmxPort = System.getProperty("app.server.management.port"); - startupTimeoutInSeconds = System.getProperty("app.server.startup.timeout"); - - Validate.notNullOrEmpty(catalinaHome, "app.server.home is not set."); - Validate.notNullOrEmpty(bindHttpPort, "app.server.http.port is not set."); - Validate.notNullOrEmpty(jmxPort, "app.server.management.port is not set."); - Validate.notNullOrEmpty(startupTimeoutInSeconds, "app.server.startup.timeout is not set."); - } - - protected abstract String getContainerClassName(); - - private String determineHttpPort() { - String httpPort = System.getProperty("app.server.http.port"); - - String portOffset = System.getProperty("app.server.port.offset", "0"); - if (!portOffset.equals("0")) { - httpPort = String.valueOf(Integer.valueOf(httpPort) + Integer.valueOf(portOffset)); - } - - return httpPort; - } - - @Override - public List getContainers() { - List containers = new ArrayList<>(); - - containers.add(standaloneContainer()); - - return containers; - } - - private Node standaloneContainer() { - Node container = new Node("container"); - container.attribute("mode", "manual"); - container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + getName()); - - return TomcatAppServerConfigurationUtils - .getStandaloneConfiguration(container, getContainerClassName(), catalinaHome, - bindHttpPort, jmxPort, USER, PASS, startupTimeoutInSeconds); - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/CommonTomcatDeploymentArchiveProcessor.java b/testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/CommonTomcatDeploymentArchiveProcessor.java deleted file mode 100644 index 8380d4f7c9..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/CommonTomcatDeploymentArchiveProcessor.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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.tomcat.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.jboss.shrinkwrap.api.spec.WebArchive; -import org.keycloak.testsuite.adapter.servlet.TomcatConfigApplication; -import org.keycloak.testsuite.utils.arquillian.DeploymentArchiveProcessorUtils; -import org.keycloak.testsuite.utils.arquillian.tomcat.TomcatDeploymentArchiveProcessorUtils; - -public class CommonTomcatDeploymentArchiveProcessor implements ApplicationArchiveProcessor { - - private final Logger log = Logger.getLogger(CommonTomcatDeploymentArchiveProcessor.class); - - @Override - public void process(Archive archive, TestClass testClass) { - if (DeploymentArchiveProcessorUtils.checkRunOnServerDeployment(archive)) return; - - modifyOIDCAdapterConfig(archive, DeploymentArchiveProcessorUtils.ADAPTER_CONFIG_PATH); - - DeploymentArchiveProcessorUtils.SAML_CONFIGS.forEach(path -> modifySAMLAdapterConfig(archive, path)); - - TomcatDeploymentArchiveProcessorUtils.copyWarClasspathFilesToCommonTomcatClasspath(archive); - - // KEYCLOAK-9606 - might be unnecessary, however for now we need to test what is in docs - TomcatDeploymentArchiveProcessorUtils.replaceKEYCLOAKMethodWithBASIC(archive); - - if (containsSAMLAdapterConfig(archive)) { - TomcatDeploymentArchiveProcessorUtils.replaceOIDCValveWithSAMLValve(archive); - } - - if (TomcatDeploymentArchiveProcessorUtils.isJaxRSApp(archive)) { - TomcatDeploymentArchiveProcessorUtils.removeServletConfigurationInWebXML(archive); - - if (!TomcatDeploymentArchiveProcessorUtils.containsApplicationConfigClass(archive)) { - ((WebArchive) archive).addClass(TomcatConfigApplication.class); - } - } - } - - private boolean containsSAMLAdapterConfig(Archive archive) { - return DeploymentArchiveProcessorUtils.SAML_CONFIGS - .stream() - .anyMatch(archive::contains); - } - - 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, String adapterConfigPath) { - if (!archive.contains(adapterConfigPath)) return; - - log.debug("Modifying adapter config " + adapterConfigPath + " in " + archive.getName()); - DeploymentArchiveProcessorUtils.modifySAMLAdapterConfig(archive, adapterConfigPath); - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/pom.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/pom.xml deleted file mode 100644 index ceb6f924d8..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/pom.xml +++ /dev/null @@ -1,375 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server - 999.0.0-SNAPSHOT - - 4.0.0 - - integration-arquillian-servers-app-server-tomcat - pom - App Server - Tomcat - - - ${project.parent.basedir}/common/common-files - ${project.parent.basedir}/assembly.xml - ${containers.home}/${app.server.tomcat.unpacked.folder.name} - ${resteasy.version} - false - - 1.0.2 - 1.0 - 1.0.0.GA - - - - - app-server-tomcat-submodules - - - src/tomcat-submodule - - - - - - - maven-enforcer-plugin - - - - enforce - - - - - app.server.tomcat - app.server.tomcat.groupId - app.server.tomcat.artifactId - app.server.tomcat.version - app.server.tomcat.unpacked.folder.name - app.server.oidc.adapter.artifactId - - - - - - - - - maven-dependency-plugin - - - unpack-tomcat-and-adapter - generate-test-resources - - unpack - - - - - ${app.server.tomcat.groupId} - ${app.server.tomcat.artifactId} - ${app.server.tomcat.version} - zip - ${containers.home} - - - org.keycloak - ${app.server.oidc.adapter.artifactId} - ${project.version} - zip - ${app.server.tomcat.home}/lib - - - true - - - - libs-for-tomcat-8-and-9 - generate-test-resources - - copy - - - ${skip.dependencies.for.tomcat} - - - org.jboss.spec.javax.ws.rs - jboss-jaxrs-api_2.1_spec - ${jboss-jaxrs-api_2.1_spec} - - - org.jboss.resteasy - resteasy-core - ${tomcat.resteasy.version} - - - org.apache.httpcomponents - httpcore - - - org.reactivestreams - reactive-streams - ${tomcat.reactive-streams.version} - - - com.fasterxml.jackson.core - jackson-databind - - - org.jboss.logging - jboss-logging - - - javax.json.bind - javax.json.bind-api - ${tomcat.javax.json.bind-api.version} - - - javax.validation - validation-api - ${tomcat.validation-api.version} - - - ${app.server.tomcat.home}/lib - true - - - - - - org.codehaus.mojo - xml-maven-plugin - - - add-tomcat-manager-user - process-test-resources - - transform - - - - - ${app.server.tomcat.home}/conf - ${common.resources}/tomcat-users.xsl - - tomcat-users.xml - - ${app.server.tomcat.home}/conf - - - - - - - - maven-assembly-plugin - - - create-zip - package - - single - - - - ${assembly.xml} - - false - - - - - - - - - - app-server-saml-supported - - - src/saml-adapter-supported - - - - true - - - - - maven-enforcer-plugin - - - - enforce - - - - - app.server.saml.adapter.artifactId - - - - - - - - maven-dependency-plugin - - - unpack-saml-adapter - generate-resources - - unpack - - - - - org.keycloak - ${app.server.saml.adapter.artifactId} - ${project.version} - zip - ${app.server.tomcat.home}/lib - - - - - - - - - maven-resources-plugin - - - copy-keycloak-truststore - generate-resources - - copy-resources - - - ${app.server.tomcat.home}/lib - - - ${common.resources} - - keycloak.truststore - - true - - - - truststore - - - - - - - - - - - app-server-tomcat8 - - tomcat8 - common - - - - app-server-tomcat9 - - tomcat9 - common - - - - - configure-ssl - - - app.server.ssl.required - - - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-https-connector - process-test-resources - - transform - - - - - ${app.server.tomcat.home}/conf - ${common.resources}/tomcat-add-connector.xsl - - server.xml - - ${app.server.tomcat.home}/conf - - - - - - - - maven-resources-plugin - - - copy-keycloak-truststore - generate-resources - - copy-resources - - - ${app.server.tomcat.home}/lib - - - ${common.resources}/keystore - - keycloak.truststore - adapter.jks - - true - - - - truststore - jks - - - - - - - - - - - diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/pom.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/pom.xml deleted file mode 100644 index 6a2916b127..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-tomcat - 999.0.0-SNAPSHOT - - 4.0.0 - - integration-arquillian-servers-app-server-tomcat8 - App Server - Tomcat 8 - - - tomcat8 - - org.apache.tomcat - tomcat - ${tomcat8.version} - apache-tomcat-${tomcat8.version} - - false - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-tomcat-common - ${project.version} - - - org.jboss.arquillian.container - arquillian-tomcat-managed-8 - ${arquillian-tomcat8-container-version} - - - - diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat8AppServerArquillianExtension.java b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat8AppServerArquillianExtension.java deleted file mode 100644 index 3c65265bbc..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat8AppServerArquillianExtension.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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.tomcat; - -import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; -import org.jboss.arquillian.core.spi.LoadableExtension; -import org.keycloak.testsuite.arquillian.tomcat.container.CommonTomcatDeploymentArchiveProcessor; - -public class Tomcat8AppServerArquillianExtension implements LoadableExtension { - - @Override - public void register(ExtensionBuilder builder) { - builder.service(ApplicationArchiveProcessor.class, CommonTomcatDeploymentArchiveProcessor.class); - } - -} diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat8AppServerProvider.java b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat8AppServerProvider.java deleted file mode 100644 index 07e0d533d7..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat8AppServerProvider.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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.tomcat.container; - -import java.util.ArrayList; -import java.util.List; - -import org.jboss.arquillian.container.tomcat.managed.Tomcat8ManagedContainer; -import org.jboss.arquillian.core.spi.Validate; -import org.jboss.shrinkwrap.descriptor.spi.node.Node; -import org.keycloak.testsuite.arquillian.container.AppServerContainerProvider; -import org.keycloak.testsuite.utils.arquillian.tomcat.TomcatAppServerConfigurationUtils; - -public class Tomcat8AppServerProvider extends AbstractTomcatAppServerProvider { - - @Override - public String getName() { - return "tomcat8"; - } - - @Override - protected String getContainerClassName() { - return Tomcat8ManagedContainer.class.getName(); - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension deleted file mode 100644 index 9d4bf2a791..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.testsuite.arquillian.tomcat.Tomcat8AppServerArquillianExtension \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider deleted file mode 100644 index 0913f7ad5b..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.testsuite.arquillian.tomcat.container.Tomcat8AppServerProvider diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/saml-adapter-supported b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/saml-adapter-supported deleted file mode 100644 index 8b13789179..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/saml-adapter-supported +++ /dev/null @@ -1 +0,0 @@ - diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/tomcat-submodule b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/tomcat-submodule deleted file mode 100644 index 8b13789179..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/tomcat-submodule +++ /dev/null @@ -1 +0,0 @@ - diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/pom.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/pom.xml deleted file mode 100644 index 6dfa600a7a..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-tomcat - 999.0.0-SNAPSHOT - - 4.0.0 - - integration-arquillian-servers-app-server-tomcat9 - App Server - Tomcat 9 - - - tomcat9 - - org.apache.tomcat - tomcat - ${tomcat9.version} - apache-tomcat-${tomcat9.version} - - false - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-tomcat-common - ${project.version} - - - org.jboss.arquillian.container - - arquillian-tomcat-managed-8 - ${arquillian-tomcat9-container-version} - - - - diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat9AppServerArquillianExtension.java b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat9AppServerArquillianExtension.java deleted file mode 100644 index ff17479a79..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat9AppServerArquillianExtension.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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.tomcat; - -import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; -import org.jboss.arquillian.core.spi.LoadableExtension; -import org.keycloak.testsuite.arquillian.tomcat.container.CommonTomcatDeploymentArchiveProcessor; - -public class Tomcat9AppServerArquillianExtension implements LoadableExtension { - - @Override - public void register(ExtensionBuilder builder) { - builder.service(ApplicationArchiveProcessor.class, CommonTomcatDeploymentArchiveProcessor.class); - } - -} diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat9AppServerProvider.java b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat9AppServerProvider.java deleted file mode 100644 index 92aebbb7b9..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat9AppServerProvider.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.tomcat.container; - -import org.jboss.arquillian.container.tomcat.managed.Tomcat8ManagedContainer; - -public class Tomcat9AppServerProvider extends AbstractTomcatAppServerProvider { - - @Override - public String getName() { - return "tomcat9"; - } - - @Override - protected String getContainerClassName() { - return Tomcat8ManagedContainer.class.getName(); - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension deleted file mode 100644 index d0e1e3d09e..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.testsuite.arquillian.tomcat.Tomcat9AppServerArquillianExtension \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider deleted file mode 100644 index 91f4a4852a..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.testsuite.arquillian.tomcat.container.Tomcat9AppServerProvider diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/saml-adapter-supported b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/saml-adapter-supported deleted file mode 100644 index 8b13789179..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/saml-adapter-supported +++ /dev/null @@ -1 +0,0 @@ - diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/tomcat-submodule b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/tomcat-submodule deleted file mode 100644 index 8b13789179..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/tomcat-submodule +++ /dev/null @@ -1 +0,0 @@ - diff --git a/testsuite/integration-arquillian/servers/app-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/container/UndertowDeploymentArchiveProcessor.java b/testsuite/integration-arquillian/servers/app-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/container/UndertowDeploymentArchiveProcessor.java index d812f232c4..9eb5fc1924 100644 --- a/testsuite/integration-arquillian/servers/app-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/container/UndertowDeploymentArchiveProcessor.java +++ b/testsuite/integration-arquillian/servers/app-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/container/UndertowDeploymentArchiveProcessor.java @@ -20,7 +20,6 @@ import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArch 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; /** @@ -49,10 +48,6 @@ public class UndertowDeploymentArchiveProcessor implements ApplicationArchivePro private void modifyWebXML(Archive archive, TestClass testClass) { if (!archive.contains(DeploymentArchiveProcessorUtils.WEBXML_PATH)) return; - if (!testClass.getJavaClass().isAnnotationPresent(UseServletFilter.class)) return; - - log.debug("Modifying WEB.XML in " + archive.getName() + " for Servlet Filter."); - DeploymentArchiveProcessorUtils.modifyWebXMLForServletFilter(archive, testClass); } private void modifyOIDCAdapterConfig(Archive archive, String adapterConfigPath) { diff --git a/testsuite/integration-arquillian/servers/pom.xml b/testsuite/integration-arquillian/servers/pom.xml index 70c336cdd4..a46807bffe 100644 --- a/testsuite/integration-arquillian/servers/pom.xml +++ b/testsuite/integration-arquillian/servers/pom.xml @@ -48,9 +48,6 @@ DIGEST-MD5 jboss-cli.sh - - - 9.0.29 diff --git a/testsuite/integration-arquillian/test-apps/hello-world-authz-service/src/main/webapp/META-INF/context.xml b/testsuite/integration-arquillian/test-apps/hello-world-authz-service/src/main/webapp/META-INF/context.xml deleted file mode 100644 index d0786c7d29..0000000000 --- a/testsuite/integration-arquillian/test-apps/hello-world-authz-service/src/main/webapp/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/servlet-authz/src/main/webapp/META-INF/context.xml b/testsuite/integration-arquillian/test-apps/servlet-authz/src/main/webapp/META-INF/context.xml deleted file mode 100644 index 081ed58bf8..0000000000 --- a/testsuite/integration-arquillian/test-apps/servlet-authz/src/main/webapp/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/servlet-policy-enforcer/src/main/webapp/META-INF/context.xml b/testsuite/integration-arquillian/test-apps/servlet-policy-enforcer/src/main/webapp/META-INF/context.xml deleted file mode 100644 index 16a4b79956..0000000000 --- a/testsuite/integration-arquillian/test-apps/servlet-policy-enforcer/src/main/webapp/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/pom.xml b/testsuite/integration-arquillian/tests/base/pom.xml index 3b5a0cbf00..0693e1f76d 100644 --- a/testsuite/integration-arquillian/tests/base/pom.xml +++ b/testsuite/integration-arquillian/tests/base/pom.xml @@ -471,35 +471,6 @@ - - app-server-jetty94 - - - app.server - jetty94 - - - - jetty94 - true - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-jetty-94 - ${project.version} - runtime - - - - - - org.commonjava.maven.plugins - directory-maven-plugin - - - - app-server-undertow @@ -880,74 +851,6 @@ - - app-server-tomcat8 - - - app.server - tomcat8 - - - - tomcat8 - false - integration-arquillian-servers-app-server-tomcat8 - 0 - 8080 - 9990 - ${app.server.home}/lib - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-tomcat8 - ${project.version} - runtime - - - - - - org.commonjava.maven.plugins - directory-maven-plugin - - - - - - app-server-tomcat9 - - - app.server - tomcat9 - - - - tomcat9 - false - integration-arquillian-servers-app-server-tomcat9 - 0 - 8080 - 9990 - ${app.server.home}/lib - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-tomcat9 - ${project.version} - runtime - - - - - - org.commonjava.maven.plugins - directory-maven-plugin - - - - auth-servers-crossdc-undertow diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java index a17eaec11f..ff5c28c6c2 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java @@ -367,10 +367,6 @@ public class AppServerTestEnricher { return CURRENT_APP_SERVER.equals("wildfly9"); } - public static boolean isTomcatAppServer() { - return CURRENT_APP_SERVER.startsWith("tomcat"); - } - public static boolean isEAP6AppServer() { return CURRENT_APP_SERVER.equals("eap6"); } diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/DeploymentArchiveProcessor.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/DeploymentArchiveProcessor.java index 55a69dc019..b7c9f6b51e 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/DeploymentArchiveProcessor.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/DeploymentArchiveProcessor.java @@ -17,49 +17,32 @@ package org.keycloak.testsuite.arquillian; -import org.keycloak.testsuite.utils.arquillian.KeycloakDependenciesResolver; import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; import org.jboss.arquillian.core.api.InstanceProducer; import org.jboss.arquillian.core.api.annotation.Inject; import org.jboss.arquillian.test.spi.TestClass; import org.jboss.arquillian.test.spi.annotation.ClassScoped; import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.Node; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.jboss.shrinkwrap.resolver.api.maven.Maven; import org.jboss.shrinkwrap.resolver.api.maven.MavenFormatStage; import org.jboss.shrinkwrap.resolver.api.maven.MavenResolverSystem; import org.keycloak.representations.adapters.config.AdapterConfig; -import org.keycloak.testsuite.utils.annotation.UseServletFilter; import org.keycloak.testsuite.utils.io.IOUtil; import org.keycloak.util.JsonSerialization; import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.DOMException; -import org.w3c.dom.NodeList; import java.io.File; import java.io.IOException; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpression; -import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; import org.jboss.logging.Logger; import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isRelative; -import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isTomcatAppServer; import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isWLSAppServer; import static org.keycloak.testsuite.arquillian.AppServerTestEnricher.isWASAppServer; -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.getElementTextContent; import static org.keycloak.testsuite.utils.io.IOUtil.loadJson; import static org.keycloak.testsuite.utils.io.IOUtil.loadXML; import static org.keycloak.testsuite.utils.io.IOUtil.modifyDocElementAttribute; -import static org.keycloak.testsuite.utils.io.IOUtil.modifyDocElementValue; -import static org.keycloak.testsuite.utils.io.IOUtil.removeElementsFromDoc; -import static org.keycloak.testsuite.utils.io.IOUtil.removeNodeByAttributeValue; import static org.keycloak.testsuite.util.ServerURLs.getAuthServerContextRoot; @@ -112,8 +95,7 @@ public class DeploymentArchiveProcessor implements ApplicationArchiveProcessor { ((WebArchive) archive) .addAsLibraries(dependencies.asFile()) - .addClass(org.keycloak.testsuite.arquillian.annotation.AppServerContainer.class) - .addClass(org.keycloak.testsuite.utils.annotation.UseServletFilter.class); + .addClass(org.keycloak.testsuite.arquillian.annotation.AppServerContainer.class); } } @@ -181,30 +163,6 @@ public class DeploymentArchiveProcessor implements ApplicationArchiveProcessor { } } - public void addFilterDependencies(Archive archive, TestClass testClass) { - TestContext testContext = testContextProducer.get(); - if (testContext.getAppServerInfo().isUndertow()) { - return; - } - - Node jbossDeploymentStructureXml = archive.get(JBOSS_DEPLOYMENT_XML_PATH); - if (jbossDeploymentStructureXml == null) { - log.debug("Archive doesn't contain " + JBOSS_DEPLOYMENT_XML_PATH); - return; - } - - log.info("Adding filter dependencies to " + archive.getName()); - - String dependency = testClass.getAnnotation(UseServletFilter.class).filterDependency(); - ((WebArchive) archive).addAsLibraries(KeycloakDependenciesResolver.resolveDependencies((dependency + ":" + System.getProperty("project.version")))); - - Document jbossXmlDoc = loadXML(jbossDeploymentStructureXml.getAsset().openStream()); - removeNodeByAttributeValue(jbossXmlDoc, "dependencies", "module", "name", "org.keycloak.keycloak-saml-core"); - removeNodeByAttributeValue(jbossXmlDoc, "dependencies", "module", "name", "org.keycloak.keycloak-adapter-spi"); - archive.add(new StringAsset((documentToString(jbossXmlDoc))), JBOSS_DEPLOYMENT_XML_PATH); - - } - protected void modifyWebXml(Archive archive, TestClass testClass) { if (!archive.contains(WEBXML_PATH)) return; @@ -215,102 +173,7 @@ public class DeploymentArchiveProcessor implements ApplicationArchiveProcessor { } catch (IllegalArgumentException ex) { throw new RuntimeException("Error when processing " + archive.getName(), ex); } - if (isTomcatAppServer()) { - modifyDocElementValue(webXmlDoc, "auth-method", "KEYCLOAK", "BASIC"); - } - - if (testClass.getJavaClass().isAnnotationPresent(UseServletFilter.class) && archive.contains(JBOSS_DEPLOYMENT_XML_PATH)) { - addFilterDependencies(archive, testClass); - - //We need to add filter declaration to web.xml - log.info("Adding filter to " + testClass.getAnnotation(UseServletFilter.class).filterClass() + " with mapping " + testClass.getAnnotation(UseServletFilter.class).filterPattern() + " for " + archive.getName()); - - Element filter = webXmlDoc.createElement("filter"); - Element filterName = webXmlDoc.createElement("filter-name"); - Element filterClass = webXmlDoc.createElement("filter-class"); - - filterName.setTextContent(testClass.getAnnotation(UseServletFilter.class).filterName()); - filterClass.setTextContent(testClass.getAnnotation(UseServletFilter.class).filterClass()); - - filter.appendChild(filterName); - filter.appendChild(filterClass); - - // check if there was a resolver for OIDC and set as a filter param - String keycloakResolverClass = getKeycloakResolverClass(webXmlDoc); - if (keycloakResolverClass != null) { - Element initParam = webXmlDoc.createElement("init-param"); - Element paramName = webXmlDoc.createElement("param-name"); - paramName.setTextContent("keycloak.config.resolver"); - Element paramValue = webXmlDoc.createElement("param-value"); - paramValue.setTextContent(keycloakResolverClass); - initParam.appendChild(paramName); - initParam.appendChild(paramValue); - filter.appendChild(initParam); - } - - appendChildInDocument(webXmlDoc, "web-app", filter); - - Element filterMapping = webXmlDoc.createElement("filter-mapping"); - - - Element urlPattern = webXmlDoc.createElement("url-pattern"); - - filterName = webXmlDoc.createElement("filter-name"); - - filterName.setTextContent(testClass.getAnnotation(UseServletFilter.class).filterName()); - urlPattern.setTextContent(getElementTextContent(webXmlDoc, "web-app/security-constraint/web-resource-collection/url-pattern")); - - filterMapping.appendChild(filterName); - filterMapping.appendChild(urlPattern); - - if (!testClass.getAnnotation(UseServletFilter.class).dispatcherType().isEmpty()) { - Element dispatcher = webXmlDoc.createElement("dispatcher"); - dispatcher.setTextContent(testClass.getAnnotation(UseServletFilter.class).dispatcherType()); - filterMapping.appendChild(dispatcher); - } - appendChildInDocument(webXmlDoc, "web-app", filterMapping); - - //finally we need to remove all keycloak related configuration from web.xml - removeElementsFromDoc(webXmlDoc, "web-app", "security-constraint"); - removeElementsFromDoc(webXmlDoc, "web-app", "login-config"); - removeElementsFromDoc(webXmlDoc, "web-app", "security-role"); - } archive.add(new StringAsset((documentToString(webXmlDoc))), WEBXML_PATH); } - - private void addInitParam(Document webXmlDoc, Element filter, String initParamName, String initParamValue) { - // Limitation that all deployments of annotated class use same skipPattern. Refactor if something more flexible is needed (would require more tricky web.xml parsing though...) - if (initParamValue != null && !initParamValue.isEmpty()) { - Element initParam = webXmlDoc.createElement("init-param"); - - Element paramName = webXmlDoc.createElement("param-name"); - paramName.setTextContent(initParamName); - - Element paramValue = webXmlDoc.createElement("param-value"); - paramValue.setTextContent(initParamValue); - - initParam.appendChild(paramName); - initParam.appendChild(paramValue); - - filter.appendChild(initParam); - } - } - - private String getKeycloakResolverClass(Document doc) { - try { - XPathFactory factory = XPathFactory.newInstance(); - XPath xpath = factory.newXPath(); - XPathExpression expr = xpath.compile("//web-app/context-param[param-name='keycloak.config.resolver']/param-value/text()"); - NodeList nodes = (NodeList) expr.evaluate(doc, XPathConstants.NODESET); - if (nodes != null && nodes.getLength() > 0) { - return nodes.item(0).getNodeValue(); - } - } catch(DOMException e) { - throw new IllegalStateException(e); - } catch (XPathExpressionException e) { - throw new IllegalStateException(e); - } - return null; - } } diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterTest.java index 96b4813c5c..8f9598c837 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterTest.java @@ -64,9 +64,6 @@ public abstract class AbstractAdapterTest extends AbstractAuthTest { public static final String UNDERTOW_HANDLERS_CONF = "undertow-handlers.conf"; public static final URL undertowHandlersConf = AbstractServletsAdapterTest.class .getResource("/adapter-test/samesite/undertow-handlers.conf"); - public static final String TOMCAT_CONTEXT_XML = "context.xml"; - public static final URL tomcatContext = AbstractServletsAdapterTest.class - .getResource("/adapter-test/" + TOMCAT_CONTEXT_XML); protected static boolean sslConfigured = false; @@ -262,16 +259,6 @@ public abstract class AbstractAdapterTest extends AbstractAuthTest { } } - public static void addContextXml(Archive archive, String contextPath) { - try { - String contextXmlContent = IOUtils.toString(tomcatContext.openStream(), "UTF-8") - .replace("%CONTEXT_PATH%", contextPath); - archive.add(new StringAsset(contextXmlContent), "/META-INF/context.xml"); - } catch (IOException ex) { - throw new RuntimeException(ex); - } - } - public static void addSameSiteUndertowHandlers(WebArchive archive) { if (SuiteContext.BROWSER_STRICT_COOKIES) { archive.addAsWebInfResource(undertowHandlersConf, UNDERTOW_HANDLERS_CONF); diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractServletsAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractServletsAdapterTest.java index cb3141ea03..f88ee796ed 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractServletsAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractServletsAdapterTest.java @@ -93,8 +93,6 @@ public abstract class AbstractServletsAdapterTest extends AbstractAdapterTest { deployment.addAsWebInfResource(keycloakJSON, "keycloak.json"); } - addContextXml(deployment, name); - return deployment; } @@ -154,8 +152,6 @@ public abstract class AbstractServletsAdapterTest extends AbstractAdapterTest { deployment.addAsWebInfResource(keystore, "keystore.jks"); } - addContextXml(deployment, name); - if (AppServerTestEnricher.isJBossJakartaAppServer()) { DeploymentArchiveProcessorUtils.useJakartaEEServletClass(deployment, "/WEB-INF/web.xml"); } @@ -202,8 +198,6 @@ public abstract class AbstractServletsAdapterTest extends AbstractAdapterTest { Assert.assertNotNull("keystore2Url should be in " + webInfPath + keystore2, keystore2Url); deployment.add(new UrlAsset(keystore2Url), "/WEB-INF/classes/" + keystore2); - addContextXml(deployment, name); - return deployment; } diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/DefaultAuthzConfigAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/DefaultAuthzConfigAdapterTest.java index 54c64873b3..1340604cc5 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/DefaultAuthzConfigAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/DefaultAuthzConfigAdapterTest.java @@ -53,8 +53,6 @@ import static org.keycloak.testsuite.utils.io.IOUtil.loadRealm; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class DefaultAuthzConfigAdapterTest extends AbstractExampleAdapterTest { private static final String REALM_NAME = "hello-world-authz"; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/PermissiveModeAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/PermissiveModeAdapterTest.java index 0c337bc541..2d18e8d41e 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/PermissiveModeAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/PermissiveModeAdapterTest.java @@ -40,8 +40,6 @@ import static org.hamcrest.Matchers.is; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class PermissiveModeAdapterTest extends AbstractBaseServletAuthzAdapterTest { @Deployment(name = RESOURCE_SERVER_ID, managed = false) @@ -56,12 +54,8 @@ public class PermissiveModeAdapterTest extends AbstractBaseServletAuthzAdapterTe login("jdoe", "jdoe"); driver.navigate().to(getResourceServerUrl() + "/enforcing/resource"); - if (AppServerTestEnricher.isEAP6AppServer() || AppServerTestEnricher.isTomcatAppServer()) { - assertThat(driver.getPageSource(), containsString("HTTP Status 404")); - } else { - assertThat(driver.getTitle(), is(equalTo("Error"))); - assertThat(driver.getPageSource(), containsString("Not Found")); - } + assertThat(driver.getTitle(), is(equalTo("Error"))); + assertThat(driver.getPageSource(), containsString("Not Found")); driver.navigate().to(getResourceServerUrl() + "/protected/admin"); assertWasDenied(); diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzCIPAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzCIPAdapterTest.java index 8fc312ff35..85a07677ab 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzCIPAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzCIPAdapterTest.java @@ -52,29 +52,6 @@ public class ServletAuthzCIPAdapterTest extends AbstractServletAuthzAdapterTest } @Test - @AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) - @AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) - public void testClaimInformationPoint() { - performTests(() -> { - login("alice", "alice"); - assertWasNotDenied(); - - this.driver.navigate().to(getResourceServerUrl() + "/protected/context/context.jsp?request-claim=unexpected-value"); - - assertWasDenied(); - - this.driver.navigate().to(getResourceServerUrl() + "/protected/context/context.jsp?request-claim=expected-value"); - assertWasNotDenied(); - hasText("Access granted: true"); - - this.driver.navigate().to(getResourceServerUrl() + "/protected/context/context.jsp"); - - assertWasDenied(); - }); - } - - @Test - // This test doesn't work with Tomcat, because KEYCLOAK-11712 was done only for wildfly public void testReuseBodyAfterClaimProcessing() { performTests(() -> { OAuthClient.AccessTokenResponse response = oauth.realm("servlet-authz").clientId("servlet-authz-app") diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzCacheDisabledAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzCacheDisabledAdapterTest.java index 35468b5e6a..79c7def7fc 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzCacheDisabledAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzCacheDisabledAdapterTest.java @@ -35,8 +35,6 @@ import org.keycloak.testsuite.utils.arquillian.ContainerConstants; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class ServletAuthzCacheDisabledAdapterTest extends AbstractServletAuthzAdapterTest { @Deployment(name = RESOURCE_SERVER_ID, managed = false) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzCacheLifespanAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzCacheLifespanAdapterTest.java index 9078ad6846..4b9a9b69f8 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzCacheLifespanAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzCacheLifespanAdapterTest.java @@ -34,8 +34,6 @@ import org.keycloak.testsuite.utils.arquillian.ContainerConstants; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class ServletAuthzCacheLifespanAdapterTest extends AbstractServletAuthzAdapterTest { @Deployment(name = RESOURCE_SERVER_ID, managed = false) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzLazyLoadPathsAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzLazyLoadPathsAdapterTest.java index 9b4b6604e4..b71559a1a9 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzLazyLoadPathsAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzLazyLoadPathsAdapterTest.java @@ -33,8 +33,6 @@ import org.keycloak.testsuite.utils.arquillian.ContainerConstants; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class ServletAuthzLazyLoadPathsAdapterTest extends AbstractServletAuthzAdapterTest { @Deployment(name = RESOURCE_SERVER_ID, managed = false) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzNoLazyLoadPathsAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzNoLazyLoadPathsAdapterTest.java index e261370040..d73b87b5ec 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzNoLazyLoadPathsAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletAuthzNoLazyLoadPathsAdapterTest.java @@ -31,8 +31,6 @@ import org.keycloak.testsuite.utils.arquillian.ContainerConstants; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class ServletAuthzNoLazyLoadPathsAdapterTest extends AbstractServletAuthzAdapterTest { @Deployment(name = RESOURCE_SERVER_ID, managed = false) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletPolicyEnforcerLifespanTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletPolicyEnforcerLifespanTest.java index 9cee4bbc36..ee6f659af1 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletPolicyEnforcerLifespanTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletPolicyEnforcerLifespanTest.java @@ -31,8 +31,6 @@ import org.keycloak.testsuite.utils.arquillian.ContainerConstants; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class ServletPolicyEnforcerLifespanTest extends AbstractServletPolicyEnforcerTest { @Deployment(name = RESOURCE_SERVER_ID, managed = false) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletPolicyEnforcerTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletPolicyEnforcerTest.java index c00bcea934..a4faf1eb40 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletPolicyEnforcerTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/authz/example/ServletPolicyEnforcerTest.java @@ -29,8 +29,6 @@ import org.keycloak.testsuite.utils.arquillian.ContainerConstants; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class ServletPolicyEnforcerTest extends AbstractServletPolicyEnforcerTest { @Deployment(name = RESOURCE_SERVER_ID, managed = false) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/DemoServletsAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/DemoServletsAdapterTest.java index 01d2742f2e..13de82fdbe 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/DemoServletsAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/DemoServletsAdapterTest.java @@ -142,8 +142,6 @@ import static org.keycloak.testsuite.util.WaitUtils.waitForPageToLoad; @AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class DemoServletsAdapterTest extends AbstractServletsAdapterTest { @Page diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLClockSkewAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLClockSkewAdapterTest.java index 0f7d36a740..b41ca1d2cf 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLClockSkewAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLClockSkewAdapterTest.java @@ -39,7 +39,6 @@ import static org.hamcrest.Matchers.not; import org.jboss.arquillian.graphene.page.Page; import static org.hamcrest.MatcherAssert.assertThat; -import static org.keycloak.testsuite.adapter.AbstractServletsAdapterTest.samlServletDeployment; import org.keycloak.testsuite.adapter.page.SalesPostClockSkewServlet; import static org.keycloak.testsuite.util.SamlClient.Binding.POST; @@ -50,7 +49,6 @@ import static org.keycloak.testsuite.util.SamlClient.Binding.POST; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) @AppServerContainer(ContainerConstants.APP_SERVER_EAP8) -@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94) public class SAMLClockSkewAdapterTest extends AbstractSAMLServletAdapterTest { @Page protected SalesPostClockSkewServlet salesPostClockSkewServletPage; @@ -131,32 +129,4 @@ public class SAMLClockSkewAdapterTest extends AbstractSAMLServletAdapterTest { deployer.undeploy(DEPLOYMENT_NAME_30_SEC); } } - - @Test - @AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) - @AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) - @AppServerContainer(value = ContainerConstants.APP_SERVER_UNDERTOW, skip = true) - @AppServerContainer(value = ContainerConstants.APP_SERVER_WILDFLY, skip = true) - @AppServerContainer(value = ContainerConstants.APP_SERVER_EAP, skip = true) - @AppServerContainer(value = ContainerConstants.APP_SERVER_EAP6, skip = true) - @AppServerContainer(value = ContainerConstants.APP_SERVER_EAP71, skip = true) - @AppServerContainer(value = ContainerConstants.APP_SERVER_EAP8, skip = true) - @AppServerContainer(value = ContainerConstants.APP_SERVER_JETTY94, skip = true) - public void testClockSkewTomcat() throws Exception { - - /* - * Tomcat by default determines context path from name of hot deployed war, - * because of that we need to have this specific test for tomcat containers - */ - - deployer.deploy(SalesPostClockSkewServlet.DEPLOYMENT_NAME); - - try { - assertOutcome(-4, allOf(containsString("request-path:"), containsString("principal=bburke"))); - assertTokenIsNotValid(65); - assertTokenIsNotValid(-65); - } finally { - deployer.undeploy(SalesPostClockSkewServlet.DEPLOYMENT_NAME); - } - } } diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLLoginResponseHandlingTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLLoginResponseHandlingTest.java index 0643a516e9..181ef1644a 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLLoginResponseHandlingTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLLoginResponseHandlingTest.java @@ -60,9 +60,6 @@ import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) @AppServerContainer(ContainerConstants.APP_SERVER_EAP8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) -@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94) public class SAMLLoginResponseHandlingTest extends AbstractSAMLServletAdapterTest { @Page diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLLogoutAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLLogoutAdapterTest.java index cc57ce3d6f..fa59b2587c 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLLogoutAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLLogoutAdapterTest.java @@ -55,8 +55,6 @@ import static org.keycloak.testsuite.util.SamlClient.Binding.REDIRECT; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) @AppServerContainer(ContainerConstants.APP_SERVER_EAP8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class SAMLLogoutAdapterTest extends AbstractServletsAdapterTest { private static final String SP_PROVIDED_ID = "spProvidedId"; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLServletAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLServletAdapterTest.java index fb7f92ac88..20b4836ace 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLServletAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLServletAdapterTest.java @@ -198,8 +198,6 @@ import org.xml.sax.SAXException; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) @AppServerContainer(ContainerConstants.APP_SERVER_EAP8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class SAMLServletAdapterTest extends AbstractSAMLServletAdapterTest { @Page protected BadClientSalesPostSigServlet badClientSalesPostSigServletPage; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLServletSessionTimeoutTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLServletSessionTimeoutTest.java index ecce95f0a0..4d6f3fb1f0 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLServletSessionTimeoutTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLServletSessionTimeoutTest.java @@ -39,9 +39,6 @@ import static org.keycloak.testsuite.util.Matchers.bodyHC; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) @AppServerContainer(ContainerConstants.APP_SERVER_EAP8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) -@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94) public class SAMLServletSessionTimeoutTest extends AbstractSAMLServletAdapterTest { @Page diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SamlSignatureTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SamlSignatureTest.java index 0b5a0fcb9e..88413baea2 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SamlSignatureTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SamlSignatureTest.java @@ -82,8 +82,6 @@ import static org.keycloak.testsuite.saml.AbstractSamlTest.REALM_SIGNING_CERTIFI @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) @AppServerContainer(ContainerConstants.APP_SERVER_EAP8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class SamlSignatureTest extends AbstractAdapterTest { private static final String REQUIRED_ROLE_NAME = "manager"; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SamlXMLAttacksTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SamlXMLAttacksTest.java index ab2888985e..e7184c1faf 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SamlXMLAttacksTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SamlXMLAttacksTest.java @@ -39,8 +39,6 @@ import static org.keycloak.testsuite.util.Matchers.statusCodeIsHC; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) @AppServerContainer(ContainerConstants.APP_SERVER_EAP8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class SamlXMLAttacksTest extends AbstractSamlTest { @Test diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SessionServletAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SessionServletAdapterTest.java index 91c785a591..7f1430d263 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SessionServletAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SessionServletAdapterTest.java @@ -58,8 +58,6 @@ import static org.keycloak.testsuite.util.WaitUtils.waitForPageToLoad; @AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) -@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class SessionServletAdapterTest extends AbstractServletsAdapterTest { @Page diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/jetty/JettyDemoServletAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/jetty/JettyDemoServletAdapterTest.java deleted file mode 100644 index 5826aba360..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/jetty/JettyDemoServletAdapterTest.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet.jetty; - -import org.junit.Ignore; -import org.keycloak.testsuite.adapter.servlet.DemoServletsAdapterTest; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import org.keycloak.testsuite.utils.arquillian.ContainerConstants; - -@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94) -public class JettyDemoServletAdapterTest extends DemoServletsAdapterTest { - - @Ignore("KEYCLOAK-9614") - @Override - public void testAuthenticated() { - - } - - @Ignore("KEYCLOAK-9614") - @Override - public void testAuthenticatedWithCustomSessionConfig() { - - } - - @Ignore("KEYCLOAK-9616") - @Override - public void testOIDCParamsForwarding() { - - } - - @Ignore("KEYCLOAK-9616") - @Override - public void testOIDCUiLocalesParamForwarding() { - - } - - @Ignore("KEYCLOAK-9615") - @Override - public void testInvalidTokenCookie() { - - } - - @Ignore("KEYCLOAK-9615") - @Override - public void testTokenInCookieRefresh() { - - } - - @Ignore("KEYCLOAK-9615") - @Override - public void testTokenInCookieSSO() { - - } - - @Ignore("KEYCLOAK-9615") - @Override - public void testTokenInCookieSSORoot() { - - } - - @Ignore("KEYCLOAK-9617") - @Override - public void testWithoutKeycloakConf() { - - } -} diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/jetty/JettySAMLServletAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/jetty/JettySAMLServletAdapterTest.java deleted file mode 100644 index 4132fe0e67..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/jetty/JettySAMLServletAdapterTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet.jetty; - -import org.junit.Ignore; -import org.keycloak.testsuite.adapter.servlet.SAMLServletAdapterTest; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import org.keycloak.testsuite.utils.arquillian.ContainerConstants; - -@AppServerContainer(ContainerConstants.APP_SERVER_JETTY94) -public class JettySAMLServletAdapterTest extends SAMLServletAdapterTest { - - @Ignore("KEYCLOAK-9687") - @Override - public void multiTenant1SamlTest() throws Exception { - - } - - @Ignore("KEYCLOAK-9687") - @Override - public void multiTenant2SamlTest() throws Exception { - - } -} diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/AdapterServletDeployment.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/AdapterServletDeployment.java index e30a2275d2..04764b253a 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/AdapterServletDeployment.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/AdapterServletDeployment.java @@ -35,11 +35,6 @@ import java.nio.charset.Charset; public class AdapterServletDeployment { public static final String JBOSS_DEPLOYMENT_STRUCTURE_XML = "jboss-deployment-structure.xml"; - public static final String TOMCAT_CONTEXT_XML = "context.xml"; - - // hardcoded for now - public static final URL tomcatContext = AdapterServletDeployment.class - .getResource("/adapter-test/" + TOMCAT_CONTEXT_XML); public static WebArchive oidcDeployment(String name, String configRoot, Class... servletClasses) { return oidcDeployment(name, configRoot, "keycloak.json"); @@ -73,22 +68,6 @@ public class AdapterServletDeployment { } if (jbossDeploymentStructure != null) deployment.addAsWebInfResource(jbossDeploymentStructure, JBOSS_DEPLOYMENT_STRUCTURE_XML); - addContextXml(deployment, name); - return deployment; } - - - public static void addContextXml(Archive archive, String contextPath) { - // hardcoded for now - try { - String contextXmlContent = IOUtils.toString(tomcatContext.openStream(), Charset.defaultCharset()) - .replace("%CONTEXT_PATH%", contextPath); - archive.add(new StringAsset(contextXmlContent), "/META-INF/context.xml"); - } catch (IOException ex) { - throw new RuntimeException(ex); - } - } - - } diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/basic-auth/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/basic-auth/META-INF/context.xml deleted file mode 100644 index e626986964..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/basic-auth/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/basic-auth/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/basic-auth/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/basic-auth/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-linking/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-linking/META-INF/context.xml deleted file mode 100644 index b4ddcce386..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-linking/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-linking/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-linking/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-linking/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal-valid-alg/META-INF/content.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal-valid-alg/META-INF/content.xml deleted file mode 100644 index e90c415660..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal-valid-alg/META-INF/content.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal-valid-alg/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal-valid-alg/WEB-INF/jetty-web.xml deleted file mode 100644 index 78b64a7c4d..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal-valid-alg/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal/META-INF/content.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal/META-INF/content.xml deleted file mode 100644 index b4ddcce386..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal/META-INF/content.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/client-secret-jwt-secure-portal/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/context.xml deleted file mode 100644 index c8aaccb385..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/context.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal-root/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal-root/META-INF/context.xml deleted file mode 100644 index abff3d28be..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal-root/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal-root/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal-root/WEB-INF/jetty-web.xml deleted file mode 100644 index 8df593613b..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal-root/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal/META-INF/context.xml deleted file mode 100644 index abff3d28be..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal/WEB-INF/jetty-web.xml deleted file mode 100644 index 8df593613b..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-cookie-portal/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-audience-required/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-audience-required/META-INF/context.xml deleted file mode 100644 index b4ddcce386..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-audience-required/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-audience-required/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-audience-required/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-audience-required/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-error-page/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-error-page/META-INF/context.xml deleted file mode 100644 index ea344d662c..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-error-page/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db/META-INF/context.xml deleted file mode 100644 index b4ddcce386..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-db/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-noconf/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-noconf/META-INF/context.xml deleted file mode 100644 index 8d1c0d63e9..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-noconf/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-noconf/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-noconf/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-noconf/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-subsystem/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-subsystem/META-INF/context.xml deleted file mode 100644 index ed36f5613a..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-subsystem/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-subsystem/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-subsystem/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal-subsystem/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal/META-INF/context.xml deleted file mode 100644 index b4ddcce386..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/customer-portal/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/exchange-linking/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/exchange-linking/META-INF/context.xml deleted file mode 100644 index b4ddcce386..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/exchange-linking/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/exchange-linking/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/exchange-linking/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/exchange-linking/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/input-portal/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/input-portal/META-INF/context.xml deleted file mode 100644 index b4ddcce386..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/input-portal/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/input-portal/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/input-portal/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/input-portal/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/multi-tenant/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/multi-tenant/META-INF/context.xml deleted file mode 100644 index 7d047a597d..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/multi-tenant/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/no-access-token/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/no-access-token/META-INF/context.xml deleted file mode 100644 index 12ec58cf17..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/no-access-token/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/no-access-token/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/no-access-token/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/no-access-token/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/META-INF/context.xml deleted file mode 100644 index b4ddcce386..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal-autodetect-bearer-only/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal-autodetect-bearer-only/META-INF/context.xml deleted file mode 100644 index 5fb1b92098..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal-autodetect-bearer-only/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal-subsystem/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal-subsystem/META-INF/context.xml deleted file mode 100644 index 5fb1b92098..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal-subsystem/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal-subsystem/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal-subsystem/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal-subsystem/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal/META-INF/context.xml deleted file mode 100644 index 5fb1b92098..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/product-portal/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-custom-session-config/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-custom-session-config/META-INF/context.xml deleted file mode 100644 index b4ddcce386..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-custom-session-config/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-custom-session-config/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-custom-session-config/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-custom-session-config/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-rewrite-redirect-uri/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-rewrite-redirect-uri/META-INF/context.xml deleted file mode 100644 index b4ddcce386..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-rewrite-redirect-uri/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-rewrite-redirect-uri/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-rewrite-redirect-uri/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal-with-rewrite-redirect-uri/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal/META-INF/context.xml deleted file mode 100644 index b4ddcce386..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/secure-portal/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal-distributable/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal-distributable/META-INF/context.xml deleted file mode 100644 index 067e33d2e3..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal-distributable/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal-distributable/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal-distributable/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal-distributable/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal/META-INF/context.xml deleted file mode 100644 index b4ddcce386..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/session-portal/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-min-ttl/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-min-ttl/META-INF/context.xml deleted file mode 100644 index bb1f6f14a0..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-min-ttl/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-min-ttl/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-min-ttl/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-min-ttl/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-refresh/META-INF/context.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-refresh/META-INF/context.xml deleted file mode 100644 index 8050b11f39..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-refresh/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-refresh/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-refresh/WEB-INF/jetty-web.xml deleted file mode 100644 index 8c59313878..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/token-refresh/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/pom.xml b/testsuite/integration-arquillian/tests/pom.xml index 6f8e3bfd4f..2b1ac304bd 100644 --- a/testsuite/integration-arquillian/tests/pom.xml +++ b/testsuite/integration-arquillian/tests/pom.xml @@ -133,7 +133,6 @@ ${app.server.keystore.dir}/adapter.jks secret - false ${containers.home}/cache-server-${cache.server} @@ -553,7 +552,6 @@ ${app.server.1.jboss.jvm.debug.args} ${app.server.2.jboss.jvm.debug.args} ${app.server.jvm.args.extra} - ${tomcat.javax.net.ssl.properties} ${frontend.console.output} ${backend.console.output} @@ -2091,18 +2089,6 @@ - - set-javax.net.ssl-properties-for-tomcat - - - app.server.ssl.required - - - - -Djavax.net.ssl.trustStore=${app.server.home}/lib/keycloak.truststore -Djavax.net.ssl.trustStorePassword=secret - - - cache-auth diff --git a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/annotation/UseServletFilter.java b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/annotation/UseServletFilter.java deleted file mode 100644 index 647f0fc118..0000000000 --- a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/annotation/UseServletFilter.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.keycloak.testsuite.utils.annotation; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -/** - * @author mhajas - */ -@Documented -@Retention(RUNTIME) -@Target({ElementType.TYPE}) -@Inherited -public @interface UseServletFilter { - - String filterDependency(); - String filterName(); - String filterClass(); - String filterPattern() default "/*"; - String dispatcherType() default ""; - String skipPattern() default ""; - String idMapper() default ""; -} diff --git a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/ContainerConstants.java b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/ContainerConstants.java index fa82d79e7f..80f99110da 100644 --- a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/ContainerConstants.java +++ b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/ContainerConstants.java @@ -35,10 +35,4 @@ public interface ContainerConstants { String APP_SERVER_FUSE63 = APP_SERVER_PREFIX + "fuse63"; String APP_SERVER_FUSE7X = APP_SERVER_PREFIX + "fuse7x"; - - String APP_SERVER_JETTY94 = APP_SERVER_PREFIX + "jetty94"; - - String APP_SERVER_TOMCAT8 = APP_SERVER_PREFIX + "tomcat8"; - String APP_SERVER_TOMCAT9 = APP_SERVER_PREFIX + "tomcat9"; - } diff --git a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/DeploymentArchiveProcessorUtils.java b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/DeploymentArchiveProcessorUtils.java index be7f937c19..849f3bf451 100644 --- a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/DeploymentArchiveProcessorUtils.java +++ b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/DeploymentArchiveProcessorUtils.java @@ -24,7 +24,6 @@ import org.jboss.shrinkwrap.api.asset.Asset; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.keycloak.representations.adapters.config.AdapterConfig; -import org.keycloak.testsuite.utils.annotation.UseServletFilter; import org.keycloak.testsuite.utils.io.IOUtil; import org.keycloak.util.JsonSerialization; import org.w3c.dom.DOMException; @@ -60,15 +59,10 @@ public class DeploymentArchiveProcessorUtils { private static final boolean AUTH_SERVER_SSL_REQUIRED = Boolean.parseBoolean(System.getProperty("auth.server.ssl.required")); private static final boolean APP_SERVER_SSL_REQUIRED = Boolean.parseBoolean(System.getProperty("app.server.ssl.required")); - private static final String APP_SERVER_SCHEMA = APP_SERVER_SSL_REQUIRED ? "https" : "http"; - private static final String APP_SERVER_PORT_PROPERTY = "auth.server." + APP_SERVER_SCHEMA + ".port"; private static final String AUTH_SERVER_REPLACED_URL = "http://localhost:8080"; - private static final String APP_SERVER_CONTAINER = System.getProperty("app.server", ""); public static final String WEBXML_PATH = "/WEB-INF/web.xml"; public static final String ADAPTER_CONFIG_PATH = "/WEB-INF/keycloak.json"; - public static final String ADAPTER_CONFIG_PATH_TENANT1 = "/WEB-INF/classes/tenant1-keycloak.json"; - public static final String ADAPTER_CONFIG_PATH_TENANT2 = "/WEB-INF/classes/tenant2-keycloak.json"; public static final String ADAPTER_CONFIG_PATH_JS = "/keycloak.json"; public static final String SAML_ADAPTER_CONFIG_PATH = "/WEB-INF/keycloak-saml.xml"; public static final String JBOSS_DEPLOYMENT_XML_PATH = "/WEB-INF/jboss-deployment-structure.xml"; @@ -85,124 +79,6 @@ public class DeploymentArchiveProcessorUtils { return archive.getName().equals("run-on-server-classes.war"); } - public static void modifyWebXMLForServletFilter(Archive archive, TestClass testClass) { - Document webXmlDoc; - try { - webXmlDoc = IOUtil.loadXML( - archive.get(WEBXML_PATH).getAsset().openStream()); - } catch (Exception ex) { - throw new RuntimeException("Error when processing " + archive.getName(), ex); - } - - //We need to add filter declaration to web.xml - log.info("Adding filter to " + testClass.getAnnotation(UseServletFilter.class).filterClass() + - " with mapping " + testClass.getAnnotation(UseServletFilter.class).filterPattern() + - " for " + archive.getName()); - - Element filter = webXmlDoc.createElement("filter"); - Element filterName = webXmlDoc.createElement("filter-name"); - Element filterClass = webXmlDoc.createElement("filter-class"); - - filterName.setTextContent(testClass.getAnnotation(UseServletFilter.class).filterName()); - filterClass.setTextContent(testClass.getAnnotation(UseServletFilter.class).filterClass()); - - filter.appendChild(filterName); - filter.appendChild(filterClass); - IOUtil.appendChildInDocument(webXmlDoc, "web-app", filter); - - filter.appendChild(filterName); - filter.appendChild(filterClass); - - // check if there was a resolver for OIDC and set as a filter param - String keycloakResolverClass = getKeycloakResolverClass(webXmlDoc); - if (keycloakResolverClass != null) { - Element initParam = webXmlDoc.createElement("init-param"); - Element paramName = webXmlDoc.createElement("param-name"); - paramName.setTextContent("keycloak.config.resolver"); - Element paramValue = webXmlDoc.createElement("param-value"); - paramValue.setTextContent(keycloakResolverClass); - initParam.appendChild(paramName); - initParam.appendChild(paramValue); - filter.appendChild(initParam); - } - - IOUtil.appendChildInDocument(webXmlDoc, "web-app", filter); - - Element filterMapping = webXmlDoc.createElement("filter-mapping"); - - Element urlPattern = webXmlDoc.createElement("url-pattern"); - - filterName = webXmlDoc.createElement("filter-name"); - - filterName.setTextContent(testClass.getAnnotation(UseServletFilter.class).filterName()); - urlPattern.setTextContent(IOUtil.getElementTextContent(webXmlDoc, "web-app/security-constraint/web-resource-collection/url-pattern")); - - filterMapping.appendChild(filterName); - filterMapping.appendChild(urlPattern); - - if (!testClass.getAnnotation(UseServletFilter.class).dispatcherType().isEmpty()) { - Element dispatcher = webXmlDoc.createElement("dispatcher"); - dispatcher.setTextContent(testClass.getAnnotation(UseServletFilter.class).dispatcherType()); - filterMapping.appendChild(dispatcher); - } - IOUtil.appendChildInDocument(webXmlDoc, "web-app", filterMapping); - - //finally we need to remove all keycloak related configuration from web.xml - IOUtil.removeElementsFromDoc(webXmlDoc, "web-app", "security-constraint"); - IOUtil.removeElementsFromDoc(webXmlDoc, "web-app", "login-config"); - IOUtil.removeElementsFromDoc(webXmlDoc, "web-app", "security-role"); - - archive.add(new StringAsset((IOUtil.documentToString(webXmlDoc))), WEBXML_PATH); - } - - private static void addInitParam(Document webXmlDoc, Element filter, String initParamName, String initParamValue) { - // Limitation that all deployments of annotated class use same skipPattern. Refactor if something more flexible is needed (would require more tricky web.xml parsing though...) - if (initParamValue != null && !initParamValue.isEmpty()) { - Element initParam = webXmlDoc.createElement("init-param"); - - Element paramName = webXmlDoc.createElement("param-name"); - paramName.setTextContent(initParamName); - - Element paramValue = webXmlDoc.createElement("param-value"); - paramValue.setTextContent(initParamValue); - - initParam.appendChild(paramName); - initParam.appendChild(paramValue); - - filter.appendChild(initParam); - } - } - - public static String getKeycloakResolverClass(Document doc) { - try { - XPathFactory factory = XPathFactory.newInstance(); - XPath xpath = factory.newXPath(); - XPathExpression expr = xpath.compile("//web-app/context-param[param-name='keycloak.config.resolver']/param-value/text()"); - NodeList nodes = (NodeList) expr.evaluate(doc, XPathConstants.NODESET); - if (nodes != null && nodes.getLength() > 0) { - return nodes.item(0).getNodeValue(); - } - } catch(DOMException e) { - throw new IllegalStateException(e); - } catch (XPathExpressionException e) { - throw new IllegalStateException(e); - } - return null; - } - - public static void addFilterDependencies(Archive archive, TestClass testClass) { - log.info("Adding filter dependencies to " + archive.getName()); - - String dependency = testClass.getAnnotation(UseServletFilter.class).filterDependency(); - ((WebArchive) archive).addAsLibraries(KeycloakDependenciesResolver.resolveDependencies((dependency + ":" + System.getProperty("project.version")))); - - Document jbossXmlDoc = IOUtil.loadXML(archive.get(JBOSS_DEPLOYMENT_XML_PATH).getAsset().openStream()); - IOUtil.removeNodeByAttributeValue(jbossXmlDoc, "dependencies", "module", "name", "org.keycloak.keycloak-saml-core"); - IOUtil.removeNodeByAttributeValue(jbossXmlDoc, "dependencies", "module", "name", "org.keycloak.keycloak-adapter-spi"); - - archive.add(new StringAsset((IOUtil.documentToString(jbossXmlDoc))), JBOSS_DEPLOYMENT_XML_PATH); - } - public static void modifyOIDCAdapterConfig(Archive archive, String adapterConfigPath) { try { AdapterConfig adapterConfig = IOUtil.loadJson(archive.get(adapterConfigPath) diff --git a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/tomcat/TomcatAppServerConfigurationUtils.java b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/tomcat/TomcatAppServerConfigurationUtils.java deleted file mode 100644 index da84b173a5..0000000000 --- a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/tomcat/TomcatAppServerConfigurationUtils.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.keycloak.testsuite.utils.arquillian.tomcat; - -import org.jboss.shrinkwrap.descriptor.spi.node.Node; - -public class TomcatAppServerConfigurationUtils { - - private static void createChild(Node configuration, String name, String text) { - configuration.createChild("property").attribute("name", name).text(text); - } - - /** - * Original XSL transformation - *

- * - * - * true - * org.jboss.arquillian.container.tomcat.managed_7.TomcatManagedContainer - * ${app.server.home} - * ${app.server.home} - * ${app.server.http.port} - * ${app.server.management.port} - * manager - * arquillian - * ${adapter.test.props} - * - * - * - * @return arquillian configuration for tomcat container - */ - public static Node getStandaloneConfiguration(Node container, String adapterImplClass, - String catalinaHome, String bindHttpPort, String jmxPort, - String user, String pass, String startupTimeoutInSeconds) { - Node configuration = container.createChild("configuration"); - createChild(configuration, "enabled", "true"); - createChild(configuration, "adapterImplClass", adapterImplClass); - createChild(configuration, "catalinaHome", catalinaHome); - createChild(configuration, "catalinaBase", catalinaHome); - createChild(configuration, "bindHttpPort", bindHttpPort); - createChild(configuration, "jmxPort", jmxPort); - createChild(configuration, "user", user); - createChild(configuration, "pass", pass); - createChild(configuration, "javaVmArguments", - System.getProperty("adapter.test.props", " ") + " " + - System.getProperty("app.server.jboss.jvm.debug.args", " ") + " " + - System.getProperty("tomcat.javax.net.ssl.properties", " ")); - createChild(configuration,"startupTimeoutInSeconds", startupTimeoutInSeconds); - - return container; - } -} diff --git a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/tomcat/TomcatDeploymentArchiveProcessorUtils.java b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/tomcat/TomcatDeploymentArchiveProcessorUtils.java deleted file mode 100644 index 8170c4a999..0000000000 --- a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/tomcat/TomcatDeploymentArchiveProcessorUtils.java +++ /dev/null @@ -1,138 +0,0 @@ -package org.keycloak.testsuite.utils.arquillian.tomcat; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.io.IOUtils; -import org.jboss.logging.Logger; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.Node; -import org.jboss.shrinkwrap.api.asset.ClassAsset; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.keycloak.testsuite.utils.arquillian.DeploymentArchiveProcessorUtils; -import org.w3c.dom.Document; - -import jakarta.ws.rs.ApplicationPath; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Set; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import static org.keycloak.testsuite.utils.io.IOUtil.documentToString; -import static org.keycloak.testsuite.utils.io.IOUtil.loadXML; -import static org.keycloak.testsuite.utils.io.IOUtil.modifyDocElementValue; -import static org.keycloak.testsuite.utils.io.IOUtil.removeElementFromDoc; - -public class TomcatDeploymentArchiveProcessorUtils { - - private static final String WAR_CLASSPATH = "/WEB-INF/classes/"; - private static final String CONTEXT_PATH = "/META-INF/context.xml"; - private static final String OIDC_VALVE_CLASS = "org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve"; - private static final String SAML_VALVE_CLASS = "org.keycloak.adapters.saml.tomcat.SamlAuthenticatorValve"; - private static final Logger LOG = Logger.getLogger(DeploymentArchiveProcessorUtils.class); - - - /** - * Tomcat doesn't load files (e. g. secure-portal keystore) from webarchive classpath - * we need to copy it to common classpath /catalina_home/lib - * @param archive - */ - public static void copyWarClasspathFilesToCommonTomcatClasspath(Archive archive) { - Stream contentOfArchiveClasspath = archive.getContent(archivePath -> - archivePath.get().startsWith(WAR_CLASSPATH)).values().stream() // get all nodes in WAR classpath - .filter(node -> StringUtils.countMatches(node.toString(), "/") - == StringUtils.countMatches(WAR_CLASSPATH, "/") // get only files not directories - && node.toString().contains(".")); - - - String catalinaHome = System.getProperty("app.server.home"); - contentOfArchiveClasspath.forEach( - (Node node) -> { - Path p = Paths.get(node.toString()); - File outputFile = new File(catalinaHome + "/lib/" + p.getFileName().toString()); - if (!outputFile.exists()) { - try { - Files.copy(node.getAsset().openStream(), outputFile.toPath()); - } catch (IOException e) { - throw new RuntimeException("Couldn't copy classpath files from deployed war to common classpath of tomcat", e); - } - } - } - ); - } - - public static void replaceKEYCLOAKMethodWithBASIC(Archive archive) { - if (!archive.contains(DeploymentArchiveProcessorUtils.WEBXML_PATH)) return; - - try { - Document webXmlDoc = loadXML(archive.get(DeploymentArchiveProcessorUtils.WEBXML_PATH).getAsset().openStream()); - - LOG.debug("Setting BASIC as auth-method in WEB.XML for " + archive.getName()); - modifyDocElementValue(webXmlDoc, "auth-method", "KEYCLOAK-SAML", "BASIC"); - modifyDocElementValue(webXmlDoc, "auth-method", "KEYCLOAK", "BASIC"); - - archive.add(new StringAsset((documentToString(webXmlDoc))), DeploymentArchiveProcessorUtils.WEBXML_PATH); - } catch (IllegalArgumentException ex) { - throw new RuntimeException("Error when processing " + archive.getName(), ex); - } - } - - public static void removeServletConfigurationInWebXML(Archive archive) { - if (!archive.contains(DeploymentArchiveProcessorUtils.WEBXML_PATH)) return; - - try { - Document webXmlDoc = loadXML(archive.get(DeploymentArchiveProcessorUtils.WEBXML_PATH).getAsset().openStream()); - - LOG.debug("Removing web.xml servlet configuration for " + archive.getName()); - removeElementFromDoc(webXmlDoc, "web-app/servlet"); - removeElementFromDoc(webXmlDoc, "web-app/servlet-mapping"); - - archive.add(new StringAsset((documentToString(webXmlDoc))), DeploymentArchiveProcessorUtils.WEBXML_PATH); - } catch (IllegalArgumentException ex) { - throw new RuntimeException("Error when processing " + archive.getName(), ex); - } - } - - public static void replaceOIDCValveWithSAMLValve(Archive archive) { - try { - String contextXmlContent = IOUtils.toString(archive.get(CONTEXT_PATH).getAsset().openStream(), "UTF-8") - .replace(OIDC_VALVE_CLASS, SAML_VALVE_CLASS); - archive.add(new StringAsset(contextXmlContent), CONTEXT_PATH); - } catch (IOException ex) { - throw new RuntimeException(ex); - } - } - - public static boolean isJaxRSApp(Archive archive) { - WebArchive webArchive = (WebArchive) archive; - Set> classes = webArchive.getContent(archivePath -> - archivePath.get().startsWith("/WEB-INF/classes/") && - archivePath.get().endsWith(".class") - ).values().stream() - .filter(node -> node.getAsset() instanceof ClassAsset) - .map(node -> ((ClassAsset)node.getAsset()).getSource()) - .filter(clazz -> clazz.isAnnotationPresent(jakarta.ws.rs.Path.class)) - .collect(Collectors.toSet()); - - return !classes.isEmpty(); - } - - public static Set> getApplicationConfigClasses(Archive archive) { - WebArchive webArchive = (WebArchive) archive; - return webArchive.getContent(archivePath -> - archivePath.get().startsWith("/WEB-INF/classes/") && - archivePath.get().endsWith(".class") - ).values().stream() - .filter(node -> node.getAsset() instanceof ClassAsset) - .map(node -> ((ClassAsset)node.getAsset()).getSource()) - .filter(clazz -> clazz.isAnnotationPresent(ApplicationPath.class)) - .collect(Collectors.toSet()); - } - - public static boolean containsApplicationConfigClass(Archive archive) { - return !getApplicationConfigClasses(archive).isEmpty(); - } -}