From 8a750c7fca1defe386528af87e97240c021256c9 Mon Sep 17 00:00:00 2001 From: mhajas Date: Wed, 13 Feb 2019 12:53:45 +0100 Subject: [PATCH] KEYCLOAK-6750 Adapt Tomcat adapter tests to new structure --- adapters/oidc/fuse7/pom.xml | 2 +- adapters/oidc/tomcat/tomcat7/pom.xml | 2 +- adapters/oidc/tomcat/tomcat8/pom.xml | 2 +- adapters/saml/tomcat/tomcat7/pom.xml | 2 +- adapters/saml/tomcat/tomcat8/pom.xml | 2 +- pom.xml | 5 + .../integration-arquillian/HOW-TO-RUN.md | 15 +- testsuite/integration-arquillian/README.md | 1 - testsuite/integration-arquillian/pom.xml | 3 + .../integration-arquillian/servers/README.md | 18 +- .../servers/app-server/README.md | 1 + .../common-files/keystore/keycloak.truststore | Bin 0 -> 1857 bytes .../{ => common-files}/tomcat-users.xsl | 2 +- .../servers/app-server/tomcat/common/pom.xml | 28 + .../servlet/TomcatConfigApplication.java | 12 + .../AbstractTomcatAppServerProvider.java | 81 +++ ...ommonTomcatDeploymentArchiveProcessor.java | 78 ++ .../servers/app-server/tomcat/pom.xml | 173 +++-- .../servers/app-server/tomcat/tomcat7/pom.xml | 19 +- .../Tomcat7AppServerArquillianExtension.java} | 22 +- .../container/Tomcat7AppServerProvider.java | 41 ++ .../Tomcat7DeploymentArchiveProcessor.java | 113 +++ ...boss.arquillian.core.spi.LoadableExtension | 1 + ...llian.container.AppServerContainerProvider | 1 + .../tomcat/tomcat7/src/tomcat-submodule | 1 + .../servers/app-server/tomcat/tomcat8/pom.xml | 17 +- .../Tomcat8AppServerArquillianExtension.java | 30 + .../container/Tomcat8AppServerProvider.java | 40 ++ ...boss.arquillian.core.spi.LoadableExtension | 1 + ...llian.container.AppServerContainerProvider | 1 + .../tomcat/tomcat8/src/tomcat-submodule | 1 + .../servers/app-server/tomcat/tomcat9/pom.xml | 23 +- .../Tomcat9AppServerArquillianExtension.java | 30 + .../container/Tomcat9AppServerProvider.java} | 25 +- ...boss.arquillian.core.spi.LoadableExtension | 1 + ...llian.container.AppServerContainerProvider | 1 + .../tomcat/tomcat9/src/tomcat-submodule | 1 + .../integration-arquillian/servers/pom.xml | 3 - .../src/main/webapp}/META-INF/context.xml | 2 +- .../src/main/webapp}/META-INF/context.xml | 2 +- .../src/main/webapp}/META-INF/context.xml | 2 +- .../adapter/servlet/SendUsernameServlet.java | 11 +- .../integration-arquillian/tests/base/pom.xml | 99 +++ .../arquillian/AppServerTestEnricher.java | 2 +- .../containers/ContainerConstants.java | 4 + .../adapter/AbstractAdapterTest.java | 8 +- .../adapter/AbstractExampleAdapterTest.java | 15 +- .../DefaultAuthzConfigAdapterTest.java | 3 + .../PermissiveModeAdapterTest.java | 16 +- .../ServletAuthzCIPAdapterTest.java | 3 + .../ServletAuthzCacheDisabledAdapterTest.java | 3 + .../ServletAuthzCacheLifespanAdapterTest.java | 3 + .../ServletAuthzLazyLoadPathsAdapterTest.java | 3 + ...ervletAuthzNoLazyLoadPathsAdapterTest.java | 3 + .../ServletPolicyEnforcerTest.java | 3 + .../ClientInitiatedAccountLinkTest.java | 3 - .../servlet/DemoServletsAdapterTest.java | 3 + .../servlet/SAMLServletAdapterTest.java | 15 +- .../servlet/SessionServletAdapterTest.java | 8 +- .../resources/adapter-test/demorealm.json | 2 +- .../tests/other/adapters/pom.xml | 1 - .../tomcat/common/xslt/arquillian.xsl | 56 -- .../tests/other/adapters/tomcat/pom.xml | 65 -- .../other/adapters/tomcat/tomcat7/pom.xml | 46 -- .../adapter/Tomcat7OIDCAdapterTest.java | 13 - .../Tomcat7OIDCSessionAdapterTest.java | 13 - .../other/adapters/tomcat/tomcat8/pom.xml | 46 -- .../adapter/Tomcat8OIDCAdapterTest.java | 13 - .../Tomcat8OIDCSessionAdapterTest.java | 13 - .../other/adapters/tomcat/tomcat9/pom.xml | 46 -- .../adapter/Tomcat9OIDCAdapterTest.java | 13 - .../Tomcat9OIDCSessionAdapterTest.java | 13 - testsuite/integration-arquillian/util/pom.xml | 16 + .../DeploymentArchiveProcessorUtils.java | 4 + .../TomcatAppServerConfigurationUtils.java | 49 ++ ...TomcatDeploymentArchiveProcessorUtils.java | 138 ++++ .../helper/adapter/AdapterTestStrategy.java | 653 ----------------- .../adapter/SamlAdapterTestStrategy.java | 675 ------------------ .../helper/adapter/SamlKeycloakRule.java | 140 ---- .../helper/adapter/SendUsernameServlet.java | 95 --- .../testsuite/pages/AccountSessionsPage.java | 74 -- .../keycloak/testsuite/pages/InputPage.java | 52 -- testsuite/pom.xml | 23 - testsuite/tomcat7/pom.xml | 398 ----------- .../org/keycloak/testsuite/Tomcat7Test.java | 205 ------ .../keycloak/testsuite/TomcatSamlTest.java | 207 ------ .../META-INF/context.xml | 20 - .../WEB-INF/keycloak.json | 10 - .../customer-db-error-page/WEB-INF/web.xml | 96 --- .../customer-db/WEB-INF/keycloak.json | 10 - .../adapter-test/customer-db/WEB-INF/web.xml | 57 -- .../customer-portal/WEB-INF/keycloak.json | 11 - .../customer-portal/WEB-INF/web.xml | 76 -- .../resources/adapter-test/demorealm.json | 164 ----- .../input-portal/WEB-INF/keycloak.json | 10 - .../adapter-test/input-portal/WEB-INF/web.xml | 57 -- .../product-portal/META-INF/context.xml | 20 - .../product-portal/WEB-INF/keycloak.json | 10 - .../product-portal/WEB-INF/web.xml | 57 -- .../secure-portal/META-INF/context.xml | 20 - .../secure-portal/WEB-INF/keycloak.json | 10 - .../secure-portal/WEB-INF/web.xml | 47 -- .../session-portal/META-INF/context.xml | 20 - .../session-portal/WEB-INF/keycloak.json | 10 - .../session-portal/WEB-INF/web.xml | 57 -- .../META-INF/context.xml | 20 - .../WEB-INF/keycloak-saml.xml | 64 -- .../WEB-INF/keystore.jks | Bin 1739 -> 0 bytes .../bad-client-signed-post/WEB-INF/web.xml | 60 -- .../META-INF/context.xml | 20 - .../WEB-INF/keycloak-saml.xml | 64 -- .../WEB-INF/keystore.jks | Bin 1715 -> 0 bytes .../bad-realm-signed-post/WEB-INF/web.xml | 88 --- .../encrypted-post/META-INF/context.xml | 20 - .../encrypted-post/WEB-INF/keycloak-saml.xml | 64 -- .../encrypted-post/WEB-INF/keystore.jks | Bin 1707 -> 0 bytes .../encrypted-post/WEB-INF/web.xml | 60 -- .../mappers/META-INF/context.xml | 20 - .../mappers/WEB-INF/keycloak-saml.xml | 44 -- .../keycloak-saml/mappers/WEB-INF/web.xml | 73 -- .../signed-front-get/META-INF/context.xml | 20 - .../WEB-INF/keycloak-saml.xml | 63 -- .../signed-front-get/WEB-INF/keystore.jks | Bin 1701 -> 0 bytes .../signed-front-get/WEB-INF/web.xml | 60 -- .../signed-get/META-INF/context.xml | 20 - .../signed-get/WEB-INF/keycloak-saml.xml | 63 -- .../signed-get/WEB-INF/keystore.jks | Bin 1701 -> 0 bytes .../keycloak-saml/signed-get/WEB-INF/web.xml | 88 --- .../signed-metadata/META-INF/context.xml | 20 - .../signed-metadata/WEB-INF/keycloak-saml.xml | 64 -- .../signed-metadata/WEB-INF/keystore.jks | Bin 1705 -> 0 bytes .../signed-metadata/WEB-INF/web.xml | 60 -- .../signed-post-email/META-INF/context.xml | 20 - .../WEB-INF/keycloak-saml.xml | 63 -- .../signed-post-email/WEB-INF/keystore.jks | Bin 1705 -> 0 bytes .../signed-post-email/WEB-INF/web.xml | 60 -- .../META-INF/context.xml | 20 - .../WEB-INF/keycloak-saml.xml | 64 -- .../WEB-INF/keystore.jks | Bin 1705 -> 0 bytes .../signed-post-persistent/WEB-INF/web.xml | 60 -- .../META-INF/context.xml | 20 - .../WEB-INF/keycloak-saml.xml | 64 -- .../WEB-INF/keystore.jks | Bin 1705 -> 0 bytes .../signed-post-transient/WEB-INF/web.xml | 60 -- .../signed-post/META-INF/context.xml | 20 - .../signed-post/WEB-INF/keycloak-saml.xml | 64 -- .../signed-post/WEB-INF/keystore.jks | Bin 1705 -> 0 bytes .../keycloak-saml/signed-post/WEB-INF/web.xml | 60 -- .../simple-input/META-INF/context.xml | 20 - .../simple-input/WEB-INF/keycloak-saml.xml | 43 -- .../simple-input/WEB-INF/web.xml | 60 -- .../simple-post/META-INF/context.xml | 20 - .../simple-post/WEB-INF/keycloak-saml.xml | 43 -- .../keycloak-saml/simple-post/WEB-INF/web.xml | 60 -- .../simple-post2/META-INF/context.xml | 20 - .../simple-post2/WEB-INF/keycloak-saml.xml | 43 -- .../simple-post2/WEB-INF/web.xml | 60 -- .../resources/keycloak-saml/sp-metadata.xml | 55 -- .../resources/keycloak-saml/testsaml.json | 452 ------------ testsuite/tomcat8/pom.xml | 418 ----------- .../keycloak/testsuite/TomcatSamlTest.java | 190 ----- .../org/keycloak/testsuite/TomcatTest.java | 204 ------ .../META-INF/context.xml | 20 - .../WEB-INF/keycloak.json | 10 - .../customer-db-error-page/WEB-INF/web.xml | 96 --- .../customer-db/META-INF/context.xml | 20 - .../customer-db/WEB-INF/keycloak.json | 9 - .../adapter-test/customer-db/WEB-INF/web.xml | 57 -- .../customer-portal/META-INF/context.xml | 20 - .../customer-portal/WEB-INF/keycloak.json | 11 - .../customer-portal/WEB-INF/web.xml | 76 -- .../resources/adapter-test/demorealm.json | 164 ----- .../input-portal/META-INF/context.xml | 20 - .../input-portal/WEB-INF/keycloak.json | 10 - .../adapter-test/input-portal/WEB-INF/web.xml | 57 -- .../product-portal/META-INF/context.xml | 20 - .../product-portal/WEB-INF/keycloak.json | 10 - .../product-portal/WEB-INF/web.xml | 57 -- .../secure-portal/META-INF/context.xml | 20 - .../secure-portal/WEB-INF/keycloak.json | 10 - .../secure-portal/WEB-INF/web.xml | 47 -- .../session-portal/META-INF/context.xml | 20 - .../session-portal/WEB-INF/keycloak.json | 10 - .../session-portal/WEB-INF/web.xml | 57 -- .../META-INF/context.xml | 20 - .../WEB-INF/keycloak-saml.xml | 64 -- .../WEB-INF/keystore.jks | Bin 1739 -> 0 bytes .../bad-client-signed-post/WEB-INF/web.xml | 60 -- .../META-INF/context.xml | 20 - .../WEB-INF/keycloak-saml.xml | 64 -- .../WEB-INF/keystore.jks | Bin 1715 -> 0 bytes .../bad-realm-signed-post/WEB-INF/web.xml | 88 --- .../encrypted-post/META-INF/context.xml | 20 - .../encrypted-post/WEB-INF/keycloak-saml.xml | 64 -- .../encrypted-post/WEB-INF/keystore.jks | Bin 1707 -> 0 bytes .../encrypted-post/WEB-INF/web.xml | 60 -- .../mappers/META-INF/context.xml | 20 - .../mappers/WEB-INF/keycloak-saml.xml | 44 -- .../keycloak-saml/mappers/WEB-INF/web.xml | 73 -- .../signed-front-get/META-INF/context.xml | 20 - .../WEB-INF/keycloak-saml.xml | 63 -- .../signed-front-get/WEB-INF/keystore.jks | Bin 1701 -> 0 bytes .../signed-front-get/WEB-INF/web.xml | 60 -- .../signed-get/META-INF/context.xml | 20 - .../signed-get/WEB-INF/keycloak-saml.xml | 63 -- .../signed-get/WEB-INF/keystore.jks | Bin 1701 -> 0 bytes .../keycloak-saml/signed-get/WEB-INF/web.xml | 88 --- .../signed-metadata/META-INF/context.xml | 20 - .../signed-metadata/WEB-INF/keycloak-saml.xml | 64 -- .../signed-metadata/WEB-INF/keystore.jks | Bin 1705 -> 0 bytes .../signed-metadata/WEB-INF/web.xml | 60 -- .../signed-post-email/META-INF/context.xml | 20 - .../WEB-INF/keycloak-saml.xml | 63 -- .../signed-post-email/WEB-INF/keystore.jks | Bin 1705 -> 0 bytes .../signed-post-email/WEB-INF/web.xml | 60 -- .../META-INF/context.xml | 20 - .../WEB-INF/keycloak-saml.xml | 64 -- .../WEB-INF/keystore.jks | Bin 1705 -> 0 bytes .../signed-post-persistent/WEB-INF/web.xml | 60 -- .../META-INF/context.xml | 20 - .../WEB-INF/keycloak-saml.xml | 64 -- .../WEB-INF/keystore.jks | Bin 1705 -> 0 bytes .../signed-post-transient/WEB-INF/web.xml | 60 -- .../signed-post/META-INF/context.xml | 20 - .../signed-post/WEB-INF/keycloak-saml.xml | 64 -- .../signed-post/WEB-INF/keystore.jks | Bin 1705 -> 0 bytes .../keycloak-saml/signed-post/WEB-INF/web.xml | 60 -- .../simple-input/META-INF/context.xml | 20 - .../simple-input/WEB-INF/keycloak-saml.xml | 43 -- .../simple-input/WEB-INF/web.xml | 60 -- .../simple-post/META-INF/context.xml | 20 - .../simple-post/WEB-INF/keycloak-saml.xml | 43 -- .../keycloak-saml/simple-post/WEB-INF/web.xml | 60 -- .../simple-post2/META-INF/context.xml | 20 - .../simple-post2/WEB-INF/keycloak-saml.xml | 43 -- .../simple-post2/WEB-INF/web.xml | 60 -- .../resources/keycloak-saml/sp-metadata.xml | 55 -- .../resources/keycloak-saml/testsaml.json | 452 ------------ .../test/resources/tomcat-test/demorealm.json | 56 -- .../tomcat-test/webapp/META-INF/context.xml | 20 - .../tomcat-test/webapp/WEB-INF/keycloak.json | 10 - .../tomcat-test/webapp/WEB-INF/web.xml | 57 -- travis-run-tests.sh | 2 - 243 files changed, 1077 insertions(+), 10554 deletions(-) create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/keystore/keycloak.truststore rename testsuite/integration-arquillian/servers/app-server/tomcat/common/{ => common-files}/tomcat-users.xsl (97%) create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/adapter/servlet/TomcatConfigApplication.java create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/AbstractTomcatAppServerProvider.java create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/CommonTomcatDeploymentArchiveProcessor.java rename testsuite/integration-arquillian/{tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8PhotozExampleAdapterTest.java => servers/app-server/tomcat/tomcat7/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat7AppServerArquillianExtension.java} (50%) create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat7AppServerProvider.java create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat7DeploymentArchiveProcessor.java create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/tomcat-submodule create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat8AppServerArquillianExtension.java create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat8AppServerProvider.java create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/tomcat-submodule create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat9AppServerArquillianExtension.java rename testsuite/integration-arquillian/{tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8DefaultAuthzConfigAdapterTest.java => servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat9AppServerProvider.java} (56%) create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/tomcat-submodule rename testsuite/{tomcat7/src/test/resources/adapter-test/input-portal => integration-arquillian/test-apps/hello-world-authz-service/src/main/webapp}/META-INF/context.xml (94%) mode change 100755 => 100644 rename testsuite/{tomcat7/src/test/resources/adapter-test/customer-db => integration-arquillian/test-apps/servlet-authz/src/main/webapp}/META-INF/context.xml (95%) mode change 100755 => 100644 rename testsuite/{tomcat7/src/test/resources/adapter-test/customer-portal => integration-arquillian/test-apps/servlet-policy-enforcer/src/main/webapp}/META-INF/context.xml (94%) mode change 100755 => 100644 delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/common/xslt/arquillian.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCSessionAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCSessionAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCSessionAdapterTest.java create mode 100644 testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/tomcat/TomcatAppServerConfigurationUtils.java create mode 100644 testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/tomcat/TomcatDeploymentArchiveProcessorUtils.java delete mode 100755 testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/AdapterTestStrategy.java delete mode 100755 testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/SamlAdapterTestStrategy.java delete mode 100755 testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/SamlKeycloakRule.java delete mode 100755 testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/SendUsernameServlet.java delete mode 100755 testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountSessionsPage.java delete mode 100755 testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/InputPage.java delete mode 100755 testsuite/tomcat7/pom.xml delete mode 100755 testsuite/tomcat7/src/test/java/org/keycloak/testsuite/Tomcat7Test.java delete mode 100755 testsuite/tomcat7/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/customer-db-error-page/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/customer-db/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/customer-db/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/customer-portal/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/customer-portal/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/demorealm.json delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/input-portal/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/input-portal/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/product-portal/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/product-portal/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/product-portal/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/secure-portal/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/secure-portal/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/secure-portal/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/session-portal/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/session-portal/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat7/src/test/resources/adapter-test/session-portal/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/bad-realm-signed-post/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/mappers/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/mappers/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/mappers/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/simple-input/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/simple-input/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/simple-input/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post2/META-INF/context.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post2/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post2/WEB-INF/web.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/sp-metadata.xml delete mode 100755 testsuite/tomcat7/src/test/resources/keycloak-saml/testsaml.json delete mode 100755 testsuite/tomcat8/pom.xml delete mode 100755 testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java delete mode 100755 testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatTest.java delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/customer-db-error-page/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/customer-db/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/customer-db/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/customer-db/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/customer-portal/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/customer-portal/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/customer-portal/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/demorealm.json delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/input-portal/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/input-portal/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/input-portal/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/product-portal/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/product-portal/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/product-portal/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/secure-portal/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/secure-portal/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/secure-portal/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/session-portal/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/session-portal/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat8/src/test/resources/adapter-test/session-portal/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/bad-realm-signed-post/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/mappers/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/mappers/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/mappers/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/WEB-INF/keystore.jks delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/simple-input/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/simple-input/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/simple-input/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post2/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post2/WEB-INF/keycloak-saml.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post2/WEB-INF/web.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/sp-metadata.xml delete mode 100755 testsuite/tomcat8/src/test/resources/keycloak-saml/testsaml.json delete mode 100755 testsuite/tomcat8/src/test/resources/tomcat-test/demorealm.json delete mode 100755 testsuite/tomcat8/src/test/resources/tomcat-test/webapp/META-INF/context.xml delete mode 100755 testsuite/tomcat8/src/test/resources/tomcat-test/webapp/WEB-INF/keycloak.json delete mode 100755 testsuite/tomcat8/src/test/resources/tomcat-test/webapp/WEB-INF/web.xml diff --git a/adapters/oidc/fuse7/pom.xml b/adapters/oidc/fuse7/pom.xml index af11b8aa5a..83c3e464f1 100644 --- a/adapters/oidc/fuse7/pom.xml +++ b/adapters/oidc/fuse7/pom.xml @@ -32,7 +32,7 @@ 7.0.1-SNAPSHOT - 8.0.14 + ${tomcat8.version} 9.4.2.v20170220 diff --git a/adapters/oidc/tomcat/tomcat7/pom.xml b/adapters/oidc/tomcat/tomcat7/pom.xml index 16d740ba4f..d6646de91f 100755 --- a/adapters/oidc/tomcat/tomcat7/pom.xml +++ b/adapters/oidc/tomcat/tomcat7/pom.xml @@ -30,7 +30,7 @@ Keycloak Tomcat 7 Integration - 7.0.52 + ${tomcat7.version} diff --git a/adapters/oidc/tomcat/tomcat8/pom.xml b/adapters/oidc/tomcat/tomcat8/pom.xml index 3c0a919515..c7ef9a5c7c 100755 --- a/adapters/oidc/tomcat/tomcat8/pom.xml +++ b/adapters/oidc/tomcat/tomcat8/pom.xml @@ -32,7 +32,7 @@ 1.7 1.7 - 8.0.14 + ${tomcat8.version} diff --git a/adapters/saml/tomcat/tomcat7/pom.xml b/adapters/saml/tomcat/tomcat7/pom.xml index a56d9387a3..50db075098 100755 --- a/adapters/saml/tomcat/tomcat7/pom.xml +++ b/adapters/saml/tomcat/tomcat7/pom.xml @@ -30,7 +30,7 @@ Keycloak Tomcat 7 SAML Integration - 7.0.52 + ${tomcat7.version} diff --git a/adapters/saml/tomcat/tomcat8/pom.xml b/adapters/saml/tomcat/tomcat8/pom.xml index c68c2f9e0f..342390cbf4 100755 --- a/adapters/saml/tomcat/tomcat8/pom.xml +++ b/adapters/saml/tomcat/tomcat8/pom.xml @@ -32,7 +32,7 @@ 1.7 1.7 - 8.0.14 + ${tomcat8.version} diff --git a/pom.xml b/pom.xml index 227589118c..10e4caf7b7 100755 --- a/pom.xml +++ b/pom.xml @@ -150,6 +150,11 @@ -Xms512m -Xmx2048m -XX:MetaspaceSize=96m -XX:MaxMetaspaceSize=256m + + + 7.0.92 + 8.5.38 + 9.0.16 http://keycloak.org diff --git a/testsuite/integration-arquillian/HOW-TO-RUN.md b/testsuite/integration-arquillian/HOW-TO-RUN.md index 8dbb7ed429..2bcf1e4eec 100644 --- a/testsuite/integration-arquillian/HOW-TO-RUN.md +++ b/testsuite/integration-arquillian/HOW-TO-RUN.md @@ -96,7 +96,7 @@ Each version has its corresponding profile: Here's how to run the tests with Jetty `9.4`: - mvn -f testsuite/integration-arquillian/tests/base/pom.xml \ + mvn -f testsuite/integration-arquillian/pom.xml \ -Papp-server-jetty94 \ -Dtest=org.keycloak.testsuite.adapter.**.*Test @@ -108,6 +108,19 @@ 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.** +```` + ### Wildfly with legacy non-elytron adapter mvn -f testsuite/integration-arquillian/pom.xml \ diff --git a/testsuite/integration-arquillian/README.md b/testsuite/integration-arquillian/README.md index c2f7add02a..9dab3859a7 100644 --- a/testsuite/integration-arquillian/README.md +++ b/testsuite/integration-arquillian/README.md @@ -175,7 +175,6 @@ integration-arquillian │ ├──adapters (common settings for all adapter test modules - will be moved into base) │ ├──jboss - │ ├──tomcat │ └──karaf │ ├──console diff --git a/testsuite/integration-arquillian/pom.xml b/testsuite/integration-arquillian/pom.xml index 37e1b31ff6..55102dba06 100644 --- a/testsuite/integration-arquillian/pom.xml +++ b/testsuite/integration-arquillian/pom.xml @@ -64,6 +64,9 @@ 1.0.0.CR3 2.2.0.Final 1.2.0.Beta2 + 1.0.1.Final + 1.0.1.Final + 1.0.1.Final 1.0.0.Alpha2 1.6.1 1.5.1 diff --git a/testsuite/integration-arquillian/servers/README.md b/testsuite/integration-arquillian/servers/README.md index d29f470f69..748e5544b3 100644 --- a/testsuite/integration-arquillian/servers/README.md +++ b/testsuite/integration-arquillian/servers/README.md @@ -13,23 +13,23 @@ The artifacts are used by the Arquillian TestSuite. ### Auth Server - JBoss - - Wildfly 10 - - EAP 7 + - Wildfly 10 + - EAP 7 - Undertow ### App Server - JBoss - - JBossAS 7 - - Wildfly 8, 9, 10 - - EAP 6, 7 - - Relative (Wildfly 10 / EAP 7) + - JBossAS 7 + - Wildfly 8, 9, 10 + - EAP 6, 7 + - Relative (Wildfly 10 / EAP 7) - Karaf / Fuse - - Karaf 3 - - Fuse 6.1, 6.2 + - Karaf 3 + - Fuse 6.1, 6.2 - Tomcat - - Tomcat 7, 8 + - 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 ba60e857d7..dd52e8cf55 100644 --- a/testsuite/integration-arquillian/servers/app-server/README.md +++ b/testsuite/integration-arquillian/servers/app-server/README.md @@ -44,3 +44,4 @@ Submodules are enabled with profiles: `-Papp-server-MODULE` ### Modules * __`tomcat7` Tomcat 7__ * __`tomcat8` Tomcat 8__ +* __`tomcat9` Tomcat 9__ diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/keystore/keycloak.truststore b/testsuite/integration-arquillian/servers/app-server/tomcat/common/common-files/keystore/keycloak.truststore new file mode 100644 index 0000000000000000000000000000000000000000..2df5170f9b39756055850ed3ad0c5d012aab1402 GIT binary patch literal 1857 zcmezO_TO6u1_mZL=E})WPRz;3FD@}+U|MkMHlk@H8W4_LHnT8m&Fogw@|!Tij3-^a(24 zxS>4i;cs@HcH8_*%IE9ah3cCew{CaLFt^eX*I#(vlzYZ~#}B!TZPKMP5B0A8S79P0 zYrOhInU0UA*R##KSyv|aPRzPi@8jH1Uc5u^_%-Vft$&(iLtlN&IB=xKB_y`(W9Xub zjGBj^E2i(#=aHJeBk-#5xywcFGn5P%)o!M~s`~vzYUaoMPeFBpU#))>D;(~exz3P7 z`!C0{`zzP|OMe-((NeALrS`Pzb5_OQ;w?6M@lyQC4vmk}a;7`C&tJLjq4O2qKW)*6 zXIc6@7B!2FXJTe#U|g(dAa5WGj6zvH7BLo)FUuHABUY@FT*999?~z={<7W-mB#;9U zn2Lab$jIPcmbaJLw7lu;(A@;P(=-?N{B zKh9n4n;4ug%(47H=^2ZE5@`%Kr7Wt?-mUZsaa|W)@V{)5&FSsS?_61}5o=ZUd^2X`h;i+|kZX3@n30%2Qu2X-{lW8kT_B{!n9GZAOX>+hL=hl7g zDXVmLAKB3K;ppUbS1sMywK?bW9P->E=+Mn+W_rEiZxxfmPmdq-T#S4^_D<7TQ2%`X z-5<-(y5CxRHkF0(@XvX7`u0>Tyq)j#-ey61qG0t;sV4QsZ679V@zhM+@a0IPgiNf@ z%s`2`3)ee_Zn^Sd!|4a^%i{RD**_cm>S=QCW@ebaYaa9yiMmTDBE3bSUY(6+|nM{e3Hea`KDZEj@x%^88TqL zVC6JT>!{9&ySHc`T$iG>%jz^*Is#`%=Kf!Hn<}3Cn=@Brd%6D#?RWk&BP6yoGWA)` z-)MbHGcSy1OP;h_-iK93KD9nIsx%SiogA(ZTv5j`XHS(&_uDgHi~cmLOx^VE`k8yS zf%aXot3N1eMn`LXN-_L#WB(ZwjbrHtnjdr<*|2SB+OW;`Jg@wLdr!O8NYyqg-kbPZ z;;7Ke8Cw{|W8YpYnjiciZ&Re|xy@b&T&^E^UMIM(e7Cf0P4lP67X;OPnl9-xZO6Ih7^bG<^O+sfvUc1({JQodpT)7J%o~$D z`DSmJD^)tb$MaEXf5Tp{t?I@Xh3@f(^ - + diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/common/pom.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/common/pom.xml new file mode 100644 index 0000000000..8c4d644e4e --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/common/pom.xml @@ -0,0 +1,28 @@ + + + + integration-arquillian-servers-app-server-tomcat + org.keycloak.testsuite + 5.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} + + + + \ 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 new file mode 100644 index 0000000000..21d639fa95 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/adapter/servlet/TomcatConfigApplication.java @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000000..5d5f7f4379 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/AbstractTomcatAppServerProvider.java @@ -0,0 +1,81 @@ +/* + * 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 new file mode 100644 index 0000000000..8380d4f7c9 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/common/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/CommonTomcatDeploymentArchiveProcessor.java @@ -0,0 +1,78 @@ +/* + * 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 index 5b2a02b968..782f0c670e 100644 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/pom.xml +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/pom.xml @@ -30,9 +30,20 @@ App Server - Tomcat - ${project.parent.basedir}/common + ${project.parent.basedir}/common/common-files ${project.parent.basedir}/assembly.xml ${containers.home}/${app.server.tomcat.unpacked.folder.name} + ${resteasy.version} + true + true + + 1.0.3 + 3.18.2-GA + 7.0 + 2.2 + 1.0.2 + 1.0 + 1.0.0.GA @@ -40,7 +51,7 @@ app-server-tomcat-submodules - src + src/tomcat-submodule @@ -99,29 +110,98 @@ - libs-for-tomcat + libs-for-tomcat-7 generate-test-resources copy + ${skip.dependencies.for.tomcat7} org.jboss.resteasy - resteasy-client + resteasy-jaxrs + ${tomcat.resteasy.version} + + org.scannotation + scannotation + ${tomcat.scannotation.version} + + + org.javassist + javassist + ${tomcat.javassist.version} + + + javax + javaee-api + ${tomcat.javaee-api.version} + + + + org.glassfish.web + el-impl + ${tomcat.org.glassfish.web.el-impl.version} + + + ${app.server.tomcat.home}/lib + true + + + + libs-for-tomcat-8-and-9 + generate-test-resources + + copy + + + ${skip.dependencies.for.tomcat8} + org.jboss.spec.javax.ws.rs jboss-jaxrs-api_2.1_spec - + ${jboss-jaxrs-api_2.1_spec} + org.jboss.resteasy resteasy-jaxrs + ${tomcat.resteasy.version} - commons-io - commons-io - 1.4 + org.jboss.resteasy + resteasy-servlet-initializer + ${tomcat.resteasy.version} + + + org.apache.httpcomponents + httpcore + ${apache.httpcomponents.httpcore.version} + + + org.reactivestreams + reactive-streams + ${tomcat.reactive-streams.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + org.jboss.logging + jboss-logging + ${jboss.logging.version} + + + 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 @@ -155,50 +235,6 @@ - - - maven-antrun-plugin - - - parametrize-server-ports - process-test-resources - - run - - - - - 8005 - ${tomcat.server.port} - - - 8080 - ${tomcat.http.port} - - - 8443 - ${tomcat.server.port} - - - 8009 - ${tomcat.ajp.port} - - - - - - - - - - - - - - - maven-assembly-plugin @@ -273,6 +309,34 @@ + + + maven-resources-plugin + + + copy-keycloak-truststore + generate-resources + + copy-resources + + + ${app.server.tomcat.home}/lib + + + ${common.resources} + + keycloak.truststore + + true + + + + truststore + + + + + @@ -281,22 +345,23 @@ app-server-tomcat7 tomcat7 + common app-server-tomcat8 tomcat8 + common app-server-tomcat9 tomcat9 + common - - diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/pom.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/pom.xml index 7c264f267e..4fb4fbdc29 100644 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/pom.xml +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/pom.xml @@ -26,8 +26,7 @@ 4.0.0 integration-arquillian-servers-app-server-tomcat7 - pom - App Server - Tomcat - Tomcat 7 + App Server - Tomcat 7 tomcat7 @@ -39,6 +38,22 @@ keycloak-tomcat7-adapter-dist keycloak-saml-tomcat7-adapter-dist + + + 2.3.1.GA + false + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-tomcat-common + ${project.version} + + + org.jboss.arquillian.container + arquillian-tomcat-managed-7 + ${arquillian-tomcat7-container-version} + + diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8PhotozExampleAdapterTest.java b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat7AppServerArquillianExtension.java similarity index 50% rename from testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8PhotozExampleAdapterTest.java rename to testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat7AppServerArquillianExtension.java index 33349aa0bf..1c3592acad 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8PhotozExampleAdapterTest.java +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat7AppServerArquillianExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Red Hat, Inc. and/or its affiliates + * 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"); @@ -14,17 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.keycloak.testsuite.adapter.example; +package org.keycloak.testsuite.arquillian.tomcat; -import org.keycloak.testsuite.adapter.example.authorization.AbstractPhotozExampleAdapterTest; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; +import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; +import org.jboss.arquillian.core.spi.LoadableExtension; +import org.keycloak.testsuite.arquillian.tomcat.container.Tomcat7DeploymentArchiveProcessor; -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-tomcat8") -//@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class Tomcat8PhotozExampleAdapterTest extends AbstractPhotozExampleAdapterTest { +public class Tomcat7AppServerArquillianExtension implements LoadableExtension { + + @Override + public void register(ExtensionBuilder builder) { + builder.service(ApplicationArchiveProcessor.class, Tomcat7DeploymentArchiveProcessor.class); + } } diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat7AppServerProvider.java b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat7AppServerProvider.java new file mode 100644 index 0000000000..51dc5934fb --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat7AppServerProvider.java @@ -0,0 +1,41 @@ +/* + * 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.Tomcat7ManagedContainer; +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 Tomcat7AppServerProvider extends AbstractTomcatAppServerProvider { + + + @Override + public String getName() { + return "tomcat7"; + } + + @Override + protected String getContainerClassName() { + return Tomcat7ManagedContainer.class.getName(); + } +} diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat7DeploymentArchiveProcessor.java b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat7DeploymentArchiveProcessor.java new file mode 100644 index 0000000000..720a78b0e0 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat7DeploymentArchiveProcessor.java @@ -0,0 +1,113 @@ +/* + * 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.asset.StringAsset; +import org.keycloak.testsuite.utils.annotation.UseServletFilter; +import org.keycloak.testsuite.utils.arquillian.DeploymentArchiveProcessorUtils; +import org.keycloak.testsuite.utils.arquillian.tomcat.TomcatDeploymentArchiveProcessorUtils; +import org.keycloak.testsuite.utils.io.IOUtil; +import org.w3c.dom.Document; +import org.w3c.dom.Element; + +import java.util.Set; + +import static org.keycloak.testsuite.utils.arquillian.DeploymentArchiveProcessorUtils.WEBXML_PATH; +import static org.keycloak.testsuite.utils.io.IOUtil.documentToString; + +public class Tomcat7DeploymentArchiveProcessor extends CommonTomcatDeploymentArchiveProcessor { + + @Override + public void process(Archive archive, TestClass testClass) { + super.process(archive, testClass); + if (DeploymentArchiveProcessorUtils.checkRunOnServerDeployment(archive)) return; + + Set> configClasses = TomcatDeploymentArchiveProcessorUtils.getApplicationConfigClasses(archive); + + if (!configClasses.isEmpty()) { + // Tomcat 7 doesn't work with resteasy-servlet-initializer therefore we need to configure Tomcat the old way + // jax-rs docs: http://docs.jboss.org/resteasy/docs/3.6.1.Final/userguide/html_single/#d4e161 + Document webXmlDoc; + try { + webXmlDoc = IOUtil.loadXML( + archive.get(WEBXML_PATH).getAsset().openStream()); + } catch (Exception ex) { + throw new RuntimeException("Error when processing " + archive.getName(), ex); + } + + addContextParam(webXmlDoc); + addServlet(webXmlDoc, configClasses.iterator().next().getName()); + addServletMapping(webXmlDoc); + + archive.add(new StringAsset((documentToString(webXmlDoc))), DeploymentArchiveProcessorUtils.WEBXML_PATH); + } + } + + private void addServletMapping(Document doc) { + Element servletMapping = doc.createElement("servlet-mapping"); + Element servetName = doc.createElement("servlet-name"); + Element urlPattern = doc.createElement("url-pattern"); + + servetName.setTextContent("Resteasy"); + urlPattern.setTextContent("/*"); + + servletMapping.appendChild(servetName); + servletMapping.appendChild(urlPattern); + IOUtil.appendChildInDocument(doc, "web-app", servletMapping); + } + + private void addServlet(Document doc, String configClassName) { + Element servlet = doc.createElement("servlet"); + Element servletName = doc.createElement("servlet-name"); + Element servletClass = doc.createElement("servlet-class"); + Element initParam = doc.createElement("init-param"); + Element paramName = doc.createElement("param-name"); + Element paramValue = doc.createElement("param-value"); + + servletName.setTextContent("Resteasy"); + servletClass.setTextContent("org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher"); + paramName.setTextContent("javax.ws.rs.Application"); + paramValue.setTextContent(configClassName); + + servlet.appendChild(servletName); + servlet.appendChild(servletClass); + + initParam.appendChild(paramName); + initParam.appendChild(paramValue); + + servlet.appendChild(initParam); + + IOUtil.appendChildInDocument(doc, "web-app", servlet); + } + + private void addContextParam(Document doc) { + Element contextParam = doc.createElement("context-param"); + Element paramName = doc.createElement("param-name"); + Element paramValue = doc.createElement("param-value"); + + paramName.setTextContent("resteasy.scan.resources"); + paramValue.setTextContent("true"); + + contextParam.appendChild(paramName); + contextParam.appendChild(paramValue); + IOUtil.appendChildInDocument(doc, "web-app", contextParam); + } +} diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension new file mode 100644 index 0000000000..d4399d19e9 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension @@ -0,0 +1 @@ +org.keycloak.testsuite.arquillian.tomcat.Tomcat7AppServerArquillianExtension \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider new file mode 100644 index 0000000000..eb593bf635 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider @@ -0,0 +1 @@ +org.keycloak.testsuite.arquillian.tomcat.container.Tomcat7AppServerProvider diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/tomcat-submodule b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/tomcat-submodule new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/tomcat-submodule @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/pom.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/pom.xml index c5dbb5a119..116fc45c38 100644 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/pom.xml +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/pom.xml @@ -26,8 +26,7 @@ 4.0.0 integration-arquillian-servers-app-server-tomcat8 - pom - App Server - Tomcat - Tomcat 8 + App Server - Tomcat 8 tomcat8 @@ -39,6 +38,20 @@ keycloak-tomcat8-adapter-dist keycloak-saml-tomcat8-adapter-dist + 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 new file mode 100644 index 0000000000..3c65265bbc --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat8AppServerArquillianExtension.java @@ -0,0 +1,30 @@ +/* + * 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 new file mode 100644 index 0000000000..07e0d533d7 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat8AppServerProvider.java @@ -0,0 +1,40 @@ +/* + * 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 new file mode 100644 index 0000000000..9d4bf2a791 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension @@ -0,0 +1 @@ +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 new file mode 100644 index 0000000000..0913f7ad5b --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider @@ -0,0 +1 @@ +org.keycloak.testsuite.arquillian.tomcat.container.Tomcat8AppServerProvider 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 new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/tomcat-submodule @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/pom.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/pom.xml index 55f7d69134..3e14082656 100644 --- a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/pom.xml +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/pom.xml @@ -26,19 +26,34 @@ 4.0.0 integration-arquillian-servers-app-server-tomcat9 - pom - App Server - Tomcat - Tomcat 9 + App Server - Tomcat 9 tomcat9 - + org.apache.tomcat tomcat ${tomcat9.version} apache-tomcat-${tomcat9.version} - + + keycloak-tomcat8-adapter-dist keycloak-saml-tomcat8-adapter-dist + 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 new file mode 100644 index 0000000000..ff17479a79 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/Tomcat9AppServerArquillianExtension.java @@ -0,0 +1,30 @@ +/* + * 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/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8DefaultAuthzConfigAdapterTest.java b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat9AppServerProvider.java similarity index 56% rename from testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8DefaultAuthzConfigAdapterTest.java rename to testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat9AppServerProvider.java index 4a25510347..92aebbb7b9 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8DefaultAuthzConfigAdapterTest.java +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/java/org/keycloak/testsuite/arquillian/tomcat/container/Tomcat9AppServerProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Red Hat, Inc. and/or its affiliates + * 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"); @@ -14,17 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.keycloak.testsuite.adapter.example; -import org.keycloak.testsuite.adapter.example.authorization.DefaultAuthzConfigAdapterTest; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; +package org.keycloak.testsuite.arquillian.tomcat.container; -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-tomcat8") -//@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class Tomcat8DefaultAuthzConfigAdapterTest extends DefaultAuthzConfigAdapterTest { +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 new file mode 100644 index 0000000000..d0e1e3d09e --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension @@ -0,0 +1 @@ +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 new file mode 100644 index 0000000000..91f4a4852a --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider @@ -0,0 +1 @@ +org.keycloak.testsuite.arquillian.tomcat.container.Tomcat9AppServerProvider 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 new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/tomcat-submodule @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/pom.xml b/testsuite/integration-arquillian/servers/pom.xml index 0ed6bd5f06..f86117a87c 100644 --- a/testsuite/integration-arquillian/servers/pom.xml +++ b/testsuite/integration-arquillian/servers/pom.xml @@ -36,9 +36,6 @@ 7.5.21.Final-redhat-1 7.1.5.GA-redhat-00002 7.1.1.Final - 7.0.68 - 8.0.32 - 9.0.0.M3 3.0.3 6.1.0.redhat-379 diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/input-portal/META-INF/context.xml b/testsuite/integration-arquillian/test-apps/hello-world-authz-service/src/main/webapp/META-INF/context.xml old mode 100755 new mode 100644 similarity index 94% rename from testsuite/tomcat7/src/test/resources/adapter-test/input-portal/META-INF/context.xml rename to testsuite/integration-arquillian/test-apps/hello-world-authz-service/src/main/webapp/META-INF/context.xml index b4ddcce386..d0786c7d29 --- a/testsuite/tomcat7/src/test/resources/adapter-test/input-portal/META-INF/context.xml +++ b/testsuite/integration-arquillian/test-apps/hello-world-authz-service/src/main/webapp/META-INF/context.xml @@ -15,6 +15,6 @@ ~ limitations under the License. --> - + \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/customer-db/META-INF/context.xml b/testsuite/integration-arquillian/test-apps/servlet-authz/src/main/webapp/META-INF/context.xml old mode 100755 new mode 100644 similarity index 95% rename from testsuite/tomcat7/src/test/resources/adapter-test/customer-db/META-INF/context.xml rename to testsuite/integration-arquillian/test-apps/servlet-authz/src/main/webapp/META-INF/context.xml index b4ddcce386..081ed58bf8 --- a/testsuite/tomcat7/src/test/resources/adapter-test/customer-db/META-INF/context.xml +++ b/testsuite/integration-arquillian/test-apps/servlet-authz/src/main/webapp/META-INF/context.xml @@ -15,6 +15,6 @@ ~ limitations under the License. --> - + \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/customer-portal/META-INF/context.xml b/testsuite/integration-arquillian/test-apps/servlet-policy-enforcer/src/main/webapp/META-INF/context.xml old mode 100755 new mode 100644 similarity index 94% rename from testsuite/tomcat7/src/test/resources/adapter-test/customer-portal/META-INF/context.xml rename to testsuite/integration-arquillian/test-apps/servlet-policy-enforcer/src/main/webapp/META-INF/context.xml index b4ddcce386..16a4b79956 --- a/testsuite/tomcat7/src/test/resources/adapter-test/customer-portal/META-INF/context.xml +++ b/testsuite/integration-arquillian/test-apps/servlet-policy-enforcer/src/main/webapp/META-INF/context.xml @@ -15,6 +15,6 @@ ~ limitations under the License. --> - + \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/servlets/src/main/java/org/keycloak/testsuite/adapter/servlet/SendUsernameServlet.java b/testsuite/integration-arquillian/test-apps/servlets/src/main/java/org/keycloak/testsuite/adapter/servlet/SendUsernameServlet.java index d4a7f64156..bfcc9e98a4 100755 --- a/testsuite/integration-arquillian/test-apps/servlets/src/main/java/org/keycloak/testsuite/adapter/servlet/SendUsernameServlet.java +++ b/testsuite/integration-arquillian/test-apps/servlets/src/main/java/org/keycloak/testsuite/adapter/servlet/SendUsernameServlet.java @@ -25,7 +25,6 @@ import org.keycloak.adapters.spi.AuthenticationError; import org.keycloak.saml.processing.core.saml.v2.constants.X500SAMLProfileConstants; import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.GET; import javax.ws.rs.POST; @@ -48,7 +47,7 @@ import java.util.List; * @version $Revision: 1 $ */ @Path("/") -public class SendUsernameServlet extends HttpServlet { +public class SendUsernameServlet { private static boolean checkRoles = false; private static SamlAuthenticationError authError; @@ -60,7 +59,7 @@ public class SendUsernameServlet extends HttpServlet { @GET @NoCache - public Response doGet(@QueryParam("checkRoles") boolean checkRolesFlag) throws ServletException, IOException { + public Response doGet(@QueryParam("checkRoles") boolean checkRolesFlag) throws IOException { System.out.println("In SendUsername Servlet doGet() check roles is " + (checkRolesFlag || checkRoles)); if (httpServletRequest.getUserPrincipal() != null && (checkRolesFlag || checkRoles) && !checkRoles()) { return Response.status(Response.Status.FORBIDDEN).entity("Forbidden").build(); @@ -71,7 +70,7 @@ public class SendUsernameServlet extends HttpServlet { @POST @NoCache - public Response doPost(@QueryParam("checkRoles") boolean checkRolesFlag) throws ServletException, IOException { + public Response doPost(@QueryParam("checkRoles") boolean checkRolesFlag) { System.out.println("In SendUsername Servlet doPost() check roles is " + (checkRolesFlag || checkRoles)); if (httpServletRequest.getUserPrincipal() != null && (checkRolesFlag || checkRoles) && !checkRoles()) { @@ -94,14 +93,14 @@ public class SendUsernameServlet extends HttpServlet { @GET @Path("{path}") - public Response doGetElseWhere(@PathParam("path") String path, @QueryParam("checkRoles") boolean checkRolesFlag) throws ServletException, IOException { + public Response doGetElseWhere(@PathParam("path") String path, @QueryParam("checkRoles") boolean checkRolesFlag) throws IOException { System.out.println("In SendUsername Servlet doGetElseWhere() - path: " + path); return doGet(checkRolesFlag); } @POST @Path("{path}") - public Response doPostElseWhere(@PathParam("path") String path, @QueryParam("checkRoles") boolean checkRolesFlag) throws ServletException, IOException { + public Response doPostElseWhere(@PathParam("path") String path, @QueryParam("checkRoles") boolean checkRolesFlag) throws IOException { System.out.println("In SendUsername Servlet doPostElseWhere() - path: " + path); return doPost(checkRolesFlag); } diff --git a/testsuite/integration-arquillian/tests/base/pom.xml b/testsuite/integration-arquillian/tests/base/pom.xml index 596a97f8ca..ffb8bfa6c1 100644 --- a/testsuite/integration-arquillian/tests/base/pom.xml +++ b/testsuite/integration-arquillian/tests/base/pom.xml @@ -817,6 +817,105 @@ + + app-server-tomcat7 + + + app.server + tomcat7 + + + + tomcat7 + false + integration-arquillian-servers-app-server-tomcat7 + 0 + 8080 + 9990 + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-tomcat7 + ${project.version} + runtime + + + + + + org.commonjava.maven.plugins + directory-maven-plugin + + + + + + app-server-tomcat8 + + + app.server + tomcat8 + + + + tomcat8 + false + integration-arquillian-servers-app-server-tomcat8 + 0 + 8080 + 9990 + + + + 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 + + + + 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 68d49ca562..5ff5da82c4 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 @@ -267,7 +267,7 @@ public class AppServerTestEnricher { } public static boolean isTomcatAppServer() { - return CURRENT_APP_SERVER.equals("tomcat"); + return CURRENT_APP_SERVER.startsWith("tomcat"); } public static boolean isEAP6AppServer() { diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/ContainerConstants.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/ContainerConstants.java index cdd7b64754..54eb8a41a6 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/ContainerConstants.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/ContainerConstants.java @@ -42,4 +42,8 @@ public interface ContainerConstants { public static final String APP_SERVER_JETTY93 = APP_SERVER_PREFIX + "jetty93"; public static final String APP_SERVER_JETTY92 = APP_SERVER_PREFIX + "jetty92"; + public static final String APP_SERVER_TOMCAT7 = APP_SERVER_PREFIX + "tomcat7"; + public static final String APP_SERVER_TOMCAT8 = APP_SERVER_PREFIX + "tomcat8"; + public static final String APP_SERVER_TOMCAT9 = APP_SERVER_PREFIX + "tomcat9"; + } 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 aad688cce0..176f515bd8 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 @@ -89,7 +89,7 @@ public abstract class AbstractAdapterTest extends AbstractAuthTest { log.info("Setting redirect-uris in test realm '" + tr.getRealm() + "' as " + (isRelative() ? "" : "non-") + "relative"); modifyClientRedirectUris(tr, "http://localhost:8080", ""); - modifyClientRedirectUris(tr, "^(/.*/\\*)", + modifyClientRedirectUris(tr, "^(.*/\\*)", "http://localhost:" + System.getProperty("app.server.http.port", "8280") + "$1", "http://localhost:" + System.getProperty("auth.server.http.port", "8180") + "$1", "https://localhost:" + System.getProperty("app.server.https.port", "8643") + "$1", @@ -102,6 +102,8 @@ public abstract class AbstractAdapterTest extends AbstractAuthTest { "https://localhost:" + System.getProperty("auth.server.http.port", "8543")); modifyClientUrls(tr, "http://localhost:8080", ""); + modifySamlMasterURLs(tr, "http://localhost:8080", ""); + modifySAMLClientsAttributes(tr, "http://localhost:8080", ""); if (isRelative()) { modifyClientUrls(tr, appServerContextRootPage.toString(), ""); @@ -109,8 +111,8 @@ public abstract class AbstractAdapterTest extends AbstractAuthTest { modifySAMLClientsAttributes(tr, "8080", System.getProperty("auth.server.http.port", "8180")); } else { modifyClientUrls(tr, "^(/.*)", appServerContextRootPage.toString() + "$1"); - modifySamlMasterURLs(tr, "8080", AUTH_SERVER_PORT); - modifySAMLClientsAttributes(tr, "http://localhost:8080", appServerContextRootPage.toString()); + modifySamlMasterURLs(tr, "^(/.*)", appServerContextRootPage.toString() + "$1"); + modifySAMLClientsAttributes(tr, "^(/.*)", appServerContextRootPage.toString() + "$1"); modifyClientJWKSUrl(tr, "^(/.*)", appServerContextRootPage.toString() + "$1"); } if (AUTH_SERVER_SSL_REQUIRED) { diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractExampleAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractExampleAdapterTest.java index 19cd73810f..ce1051ed7b 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractExampleAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractExampleAdapterTest.java @@ -20,7 +20,7 @@ package org.keycloak.testsuite.adapter; import org.apache.commons.io.IOUtils; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.jboss.shrinkwrap.api.importer.ZipImporter; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Assert; import org.keycloak.testsuite.utils.arquillian.DeploymentArchiveProcessorUtils; @@ -30,7 +30,6 @@ import java.io.IOException; import java.net.URL; import java.nio.file.Paths; import java.util.function.Consumer; -import java.util.function.Supplier; /** * @@ -63,9 +62,10 @@ public abstract class AbstractExampleAdapterTest extends AbstractAdapterTest { } protected static WebArchive exampleDeployment(String name, Consumer additionalResources) { - WebArchive webArchive = ShrinkWrap.createFromZipFile(WebArchive.class, - new File(EXAMPLES_HOME + "/" + name + "-" + EXAMPLES_VERSION_SUFFIX + ".war")) - .addAsWebInfResource(jbossDeploymentStructure, JBOSS_DEPLOYMENT_STRUCTURE_XML); + WebArchive webArchive = ShrinkWrap.create(ZipImporter.class, name + ".war") + .importFrom(new File(EXAMPLES_HOME + "/" + name + "-" + EXAMPLES_VERSION_SUFFIX + ".war")) + .as(WebArchive.class) + .addAsWebInfResource(jbossDeploymentStructure, JBOSS_DEPLOYMENT_STRUCTURE_XML); additionalResources.accept(webArchive); @@ -92,8 +92,9 @@ public abstract class AbstractExampleAdapterTest extends AbstractAdapterTest { URL webXML = Paths.get(EXAMPLES_WEB_XML).toUri().toURL(); String webXmlContent = IOUtils.toString(webXML.openStream(), "UTF-8") .replace("%CONTEXT_PATH%", contextPath); - WebArchive webArchive = ShrinkWrap.createFromZipFile(WebArchive.class, - new File(EXAMPLES_HOME + "/" + name + "-" + EXAMPLES_VERSION_SUFFIX + ".war")) + WebArchive webArchive = ShrinkWrap.create(ZipImporter.class, name + ".war") + .importFrom(new File(EXAMPLES_HOME + "/" + name + "-" + EXAMPLES_VERSION_SUFFIX + ".war")) + .as(WebArchive.class) .addAsWebInfResource(jbossDeploymentStructure, JBOSS_DEPLOYMENT_STRUCTURE_XML) .add(new StringAsset(webXmlContent), "/WEB-INF/web.xml"); diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/DefaultAuthzConfigAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/DefaultAuthzConfigAdapterTest.java index 5cc3410d2a..0a11991b8a 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/DefaultAuthzConfigAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/DefaultAuthzConfigAdapterTest.java @@ -52,6 +52,9 @@ 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_TOMCAT7) +@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/example/authorization/PermissiveModeAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/PermissiveModeAdapterTest.java index 66cbc7368f..311c28e80f 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/PermissiveModeAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/PermissiveModeAdapterTest.java @@ -16,17 +16,18 @@ */ package org.keycloak.testsuite.adapter.example.authorization; -import static org.junit.Assert.assertTrue; - import java.io.File; import java.io.IOException; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Test; +import org.keycloak.testsuite.arquillian.AppServerTestEnricher; import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; import org.keycloak.testsuite.arquillian.containers.ContainerConstants; +import static org.assertj.core.api.Java6Assertions.assertThat; + /** * @author Pedro Igor */ @@ -36,6 +37,9 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT7) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class PermissiveModeAdapterTest extends AbstractBaseServletAuthzAdapterTest { @Deployment(name = RESOURCE_SERVER_ID, managed = false) @@ -50,11 +54,11 @@ public class PermissiveModeAdapterTest extends AbstractBaseServletAuthzAdapterTe login("jdoe", "jdoe"); driver.navigate().to(getResourceServerUrl() + "/enforcing/resource"); - if (System.getProperty("app.server","").startsWith("eap6")) { - assertTrue(driver.getPageSource().contains("HTTP Status 404")); + if (AppServerTestEnricher.isEAP6AppServer() || AppServerTestEnricher.isTomcatAppServer()) { + assertThat(driver.getPageSource()).contains("HTTP Status 404"); } else { - assertTrue(driver.getTitle().equals("Error")); - assertTrue(driver.getPageSource().contains("Not Found")); + assertThat(driver.getTitle()).isEqualTo("Error"); + assertThat(driver.getPageSource()).contains("Not Found"); } driver.navigate().to(getResourceServerUrl() + "/protected/admin"); diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzCIPAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzCIPAdapterTest.java index 547ab66c74..c1c5f7d547 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzCIPAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzCIPAdapterTest.java @@ -34,6 +34,9 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT7) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class ServletAuthzCIPAdapterTest extends AbstractServletAuthzAdapterTest { @Deployment(name = RESOURCE_SERVER_ID, managed = false) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzCacheDisabledAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzCacheDisabledAdapterTest.java index d9b57b6e67..947d02273c 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzCacheDisabledAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzCacheDisabledAdapterTest.java @@ -36,6 +36,9 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT7) +@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/example/authorization/ServletAuthzCacheLifespanAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzCacheLifespanAdapterTest.java index 59c467f8d5..80344b4ad5 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzCacheLifespanAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzCacheLifespanAdapterTest.java @@ -35,6 +35,9 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT7) +@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/example/authorization/ServletAuthzLazyLoadPathsAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzLazyLoadPathsAdapterTest.java index 47e171d1dd..351db5f444 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzLazyLoadPathsAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzLazyLoadPathsAdapterTest.java @@ -34,6 +34,9 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT7) +@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/example/authorization/ServletAuthzNoLazyLoadPathsAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzNoLazyLoadPathsAdapterTest.java index ace86d76ce..ee8db4051e 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzNoLazyLoadPathsAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletAuthzNoLazyLoadPathsAdapterTest.java @@ -32,6 +32,9 @@ import org.keycloak.testsuite.arquillian.containers.ContainerConstants; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT7) +@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/example/authorization/ServletPolicyEnforcerTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletPolicyEnforcerTest.java index 1f05e2585e..e1542ceca3 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletPolicyEnforcerTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/authorization/ServletPolicyEnforcerTest.java @@ -58,6 +58,9 @@ import org.openqa.selenium.By; @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_UNDERTOW) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT7) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class ServletPolicyEnforcerTest extends AbstractExampleAdapterTest { protected static final String REALM_NAME = "servlet-policy-enforcer-authz"; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/ClientInitiatedAccountLinkTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/ClientInitiatedAccountLinkTest.java index 491132c45d..b5ef81d642 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/ClientInitiatedAccountLinkTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/ClientInitiatedAccountLinkTest.java @@ -126,9 +126,6 @@ public class ClientInitiatedAccountLinkTest extends AbstractServletsAdapterTest servlet.setClientId("client-linking"); servlet.setProtocol(OIDCLoginProtocol.LOGIN_PROTOCOL); String uri = "/client-linking"; - if (!isRelative()) { - uri = appServerContextRootPage.toString() + uri; - } servlet.setAdminUrl(uri); servlet.setDirectAccessGrantsEnabled(true); servlet.setBaseUrl(uri); 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 d93355b351..60923e12ef 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 @@ -132,6 +132,9 @@ 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_TOMCAT7) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class DemoServletsAdapterTest extends AbstractServletsAdapterTest { // Javascript browser needed KEYCLOAK-4703 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 d9106d24d2..0cfd7e9d56 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 @@ -172,6 +172,9 @@ import org.xml.sax.SAXException; @AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT7) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class SAMLServletAdapterTest extends AbstractServletsAdapterTest { @Page protected BadClientSalesPostSigServlet badClientSalesPostSigServletPage; @@ -267,13 +270,13 @@ public class SAMLServletAdapterTest extends AbstractServletsAdapterTest { @Page protected MultiTenant1Saml multiTenant1SamlPage; - + @Page protected MultiTenant2Saml multiTenant2SamlPage; - + @Page protected SAMLPostLoginTenant1 tenant1RealmSAMLPostLoginPage; - + @Page protected SAMLPostLoginTenant2 tenant2RealmSAMLPostLoginPage; @@ -423,9 +426,9 @@ public class SAMLServletAdapterTest extends AbstractServletsAdapterTest { @Deployment(name = MultiTenant1Saml.DEPLOYMENT_NAME) protected static WebArchive multiTenant() { - return samlServletDeploymentMultiTenant(MultiTenant1Saml.DEPLOYMENT_NAME, "multi-tenant-saml/WEB-INF/web.xml", + return samlServletDeploymentMultiTenant(MultiTenant1Saml.DEPLOYMENT_NAME, "multi-tenant-saml/WEB-INF/web.xml", "tenant1-keycloak-saml.xml", "tenant2-keycloak-saml.xml", - "keystore-tenant1.jks", "keystore-tenant2.jks", + "keystore-tenant1.jks", "keystore-tenant2.jks", SendUsernameServlet.class, SamlMultiTenantResolver.class); } @@ -468,7 +471,7 @@ public class SAMLServletAdapterTest extends AbstractServletsAdapterTest { || driver.getPageSource().contains(FORBIDDEN_TEXT) || driver.getPageSource().contains(WEBSPHERE_FORBIDDEN_TEXT)); // WebSphere } - + private void assertFailedLogin(AbstractPage page, UserRepresentation user, Login loginPage) { page.navigateTo(); assertCurrentUrlStartsWith(loginPage); 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 c70c74c158..0442f9da7e 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 @@ -55,6 +55,9 @@ import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlStartsWithLo @AppServerContainer(ContainerConstants.APP_SERVER_EAP) @AppServerContainer(ContainerConstants.APP_SERVER_EAP6) @AppServerContainer(ContainerConstants.APP_SERVER_EAP71) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT7) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT8) +@AppServerContainer(ContainerConstants.APP_SERVER_TOMCAT9) public class SessionServletAdapterTest extends AbstractServletsAdapterTest { @Page @@ -171,7 +174,7 @@ public class SessionServletAdapterTest extends AbstractServletsAdapterTest { // logout mposolda with admin client UserRepresentation mposolda = testRealmResource().users().search("mposolda", null, null, null, null, null).get(0); testRealmResource().users().get(mposolda.getId()).logout(); - + // bburke should be still logged with original httpSession in our browser window sessionPortalPage.navigateTo(); assertCurrentUrlEquals(sessionPortalPage); @@ -192,7 +195,7 @@ public class SessionServletAdapterTest extends AbstractServletsAdapterTest { // Assert I need to login again (logout was propagated to the app) loginAndCheckSession(testRealmLoginPage); } - + private void loginAndCheckSession(Login login) { sessionPortalPage.navigateTo(); assertCurrentUrlStartsWithLoginUrlOf(testRealmPage); @@ -208,3 +211,4 @@ public class SessionServletAdapterTest extends AbstractServletsAdapterTest { } } + diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/demorealm.json b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/demorealm.json index c2bdb90753..f9094e63d1 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/demorealm.json +++ b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/demorealm.json @@ -175,7 +175,7 @@ "enabled": true, "baseUrl": "/", "redirectUris": [ - "http://localhost:8280/*" + "http://localhost:8080/*" ], "secret": "password" }, diff --git a/testsuite/integration-arquillian/tests/other/adapters/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/pom.xml index e6a2b3879a..4473564dc8 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/pom.xml +++ b/testsuite/integration-arquillian/tests/other/adapters/pom.xml @@ -100,7 +100,6 @@ jboss karaf - tomcat was wls diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/common/xslt/arquillian.xsl b/testsuite/integration-arquillian/tests/other/adapters/tomcat/common/xslt/arquillian.xsl deleted file mode 100644 index 911242da21..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/common/xslt/arquillian.xsl +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - 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} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/tomcat/pom.xml deleted file mode 100644 index 350ca380bc..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - 4.0.0 - - - org.keycloak.testsuite - integration-arquillian-tests-adapters - 5.0.0-SNAPSHOT - - - integration-arquillian-tests-adapters-tomcat - - pom - - Adapter Tests - Tomcat - - - ${project.parent.basedir}/common - - 0 - 8080 - 9990 - - - - - app-server-tomcat7 - - tomcat7 - - - - app-server-tomcat8 - - tomcat8 - - - - app-server-tomcat9 - - tomcat9 - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/pom.xml deleted file mode 100644 index 35d1bfbf3a..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - 4.0.0 - - - org.keycloak.testsuite - integration-arquillian-tests-adapters-tomcat - 5.0.0-SNAPSHOT - - - integration-arquillian-tests-adapters-tomcat7 - - Adapter Tests - Tomcat - Tomcat 7 - - - tomcat7 - - - - - org.jboss.arquillian.container - arquillian-tomcat-managed-7 - 1.0.0.CR7 - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCAdapterTest.java deleted file mode 100644 index c94e9d71a6..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCAdapterTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.keycloak.testsuite.adapter; - -import org.keycloak.testsuite.adapter.servlet.DemoServletsAdapterTest; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-tomcat7") -public class Tomcat7OIDCAdapterTest extends DemoServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCSessionAdapterTest.java deleted file mode 100644 index 88f3e7dd63..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCSessionAdapterTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.keycloak.testsuite.adapter; - -import org.keycloak.testsuite.adapter.servlet.SessionServletAdapterTest; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-tomcat7") -public class Tomcat7OIDCSessionAdapterTest extends SessionServletAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/pom.xml deleted file mode 100644 index 5aeff9ba48..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - 4.0.0 - - - org.keycloak.testsuite - integration-arquillian-tests-adapters-tomcat - 5.0.0-SNAPSHOT - - - integration-arquillian-tests-adapters-tomcat8 - - Adapter Tests - Tomcat - Tomcat 8 - - - tomcat8 - - - - - org.jboss.arquillian.container - arquillian-tomcat-managed-7 - 1.0.0.CR7 - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCAdapterTest.java deleted file mode 100644 index f7290fb324..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCAdapterTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.keycloak.testsuite.adapter; - -import org.keycloak.testsuite.adapter.servlet.DemoServletsAdapterTest; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-tomcat8") -public class Tomcat8OIDCAdapterTest extends DemoServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCSessionAdapterTest.java deleted file mode 100644 index 2bf8a17034..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCSessionAdapterTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.keycloak.testsuite.adapter; - -import org.keycloak.testsuite.adapter.servlet.SessionServletAdapterTest; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-tomcat8") -public class Tomcat8OIDCSessionAdapterTest extends SessionServletAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/pom.xml deleted file mode 100644 index 7313c1c9d9..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - 4.0.0 - - - org.keycloak.testsuite - integration-arquillian-tests-adapters-tomcat - 5.0.0-SNAPSHOT - - - integration-arquillian-tests-adapters-tomcat9 - - Adapter Tests - Tomcat - Tomcat 9 - - - tomcat9 - - - - - org.jboss.arquillian.container - arquillian-tomcat-managed-7 - 1.0.0.CR7 - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCAdapterTest.java deleted file mode 100644 index df150d871e..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCAdapterTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.keycloak.testsuite.adapter; - -import org.keycloak.testsuite.adapter.servlet.DemoServletsAdapterTest; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-tomcat9") -public class Tomcat9OIDCAdapterTest extends DemoServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCSessionAdapterTest.java deleted file mode 100644 index eb5fb48254..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCSessionAdapterTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.keycloak.testsuite.adapter; - -import org.keycloak.testsuite.adapter.servlet.SessionServletAdapterTest; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-tomcat9") -public class Tomcat9OIDCSessionAdapterTest extends SessionServletAdapterTest { - -} diff --git a/testsuite/integration-arquillian/util/pom.xml b/testsuite/integration-arquillian/util/pom.xml index 29a0decaa9..652427c21e 100644 --- a/testsuite/integration-arquillian/util/pom.xml +++ b/testsuite/integration-arquillian/util/pom.xml @@ -71,5 +71,21 @@ jastow 2.1.0.Final + + org.apache.commons + commons-lang3 + 3.5 + + + commons-io + commons-io + 2.6 + compile + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.1_spec + 1.0.1.Final + 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 1f4289e6b0..68f35656ad 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 @@ -18,6 +18,8 @@ package org.keycloak.testsuite.utils.arquillian; import java.io.File; import java.io.IOException; +import java.util.Arrays; +import java.util.Collection; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpression; @@ -59,6 +61,8 @@ public class DeploymentArchiveProcessorUtils { public static final String SAML_ADAPTER_CONFIG_PATH_TENANT1 = "/WEB-INF/classes/tenant1-keycloak-saml.xml"; public static final String SAML_ADAPTER_CONFIG_PATH_TENANT2 = "/WEB-INF/classes/tenant2-keycloak-saml.xml"; public static final String TRUSTSTORE_PASSWORD = "secret"; + public static final Collection SAML_CONFIGS = Arrays.asList(SAML_ADAPTER_CONFIG_PATH, + SAML_ADAPTER_CONFIG_PATH_TENANT1, SAML_ADAPTER_CONFIG_PATH_TENANT2); /** * @return true iff archive's name equals run-on-server-classes.war 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 new file mode 100644 index 0000000000..80de599b4b --- /dev/null +++ b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/tomcat/TomcatAppServerConfigurationUtils.java @@ -0,0 +1,49 @@ +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", " ")); + 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 new file mode 100644 index 0000000000..017c663a64 --- /dev/null +++ b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/tomcat/TomcatDeploymentArchiveProcessorUtils.java @@ -0,0 +1,138 @@ +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 javax.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(javax.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(); + } +} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/AdapterTestStrategy.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/AdapterTestStrategy.java deleted file mode 100755 index e6d3200164..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/AdapterTestStrategy.java +++ /dev/null @@ -1,653 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.helper.adapter; - -import org.keycloak.testsuite.pages.InputPage; -import org.junit.Assert; -import org.junit.rules.ExternalResource; -import org.keycloak.OAuth2Constants; -import org.keycloak.adapters.OIDCAuthenticationError; -import org.keycloak.admin.client.Keycloak; -import org.keycloak.common.util.Time; -import org.keycloak.models.ClientModel; -import org.keycloak.models.Constants; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmModel; -import org.keycloak.models.UserModel; -import org.keycloak.models.utils.SessionTimeoutHelper; -import org.keycloak.protocol.oidc.OIDCLoginProtocolService; -import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.representations.idm.UserRepresentation; -import org.keycloak.services.managers.RealmManager; -import org.keycloak.services.managers.ResourceAdminManager; -import org.keycloak.testsuite.KeycloakServer; -import org.keycloak.testsuite.OAuthClient; -import org.keycloak.testsuite.pages.AccountSessionsPage; -import org.keycloak.testsuite.pages.LoginPage; -import org.keycloak.testsuite.rule.AbstractKeycloakRule; -import org.keycloak.testsuite.rule.ErrorServlet; -import org.keycloak.testsuite.rule.KeycloakRule; -import org.keycloak.testsuite.rule.WebResource; -import org.keycloak.testsuite.rule.WebRule; -import org.keycloak.util.BasicAuthHelper; -import org.openqa.selenium.WebDriver; - -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; -import javax.ws.rs.client.Entity; -import javax.ws.rs.client.WebTarget; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriBuilder; -import java.net.URI; -import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * Tests Jetty/Tomcat Adapter - * - * Methods from this class are used by testsuite/jetty/* and testsuite/tomcat* modules - * - * TODO: remove this when testsuite/jetty/* and testsuite/tomcat* modules will be migrated to arquillian testsuite - * - * @author Bill Burke - * @author John Ament - */ -public class AdapterTestStrategy extends ExternalResource { - - protected String AUTH_SERVER_URL = "http://localhost:8081/auth"; - protected String APP_SERVER_BASE_URL = "http://localhost:8081"; - protected AbstractKeycloakRule keycloakRule; - // some servlet containers redirect to root + "/" if you visit root context - protected String slash = ""; - - public WebRule webRule = new WebRule(this); - - @WebResource - protected WebDriver driver; - - @WebResource - protected OAuthClient oauth; - - @WebResource - protected LoginPage loginPage; - - @WebResource - protected InputPage inputPage; - - @WebResource - protected AccountSessionsPage accountSessionsPage; - - protected String LOGIN_URL = OIDCLoginProtocolService.authUrl(UriBuilder.fromUri(AUTH_SERVER_URL)).build("demo").toString(); - - public AdapterTestStrategy(String AUTH_SERVER_URL, String APP_SERVER_BASE_URL, AbstractKeycloakRule keycloakRule) { - this.AUTH_SERVER_URL = AUTH_SERVER_URL; - this.APP_SERVER_BASE_URL = APP_SERVER_BASE_URL; - this.keycloakRule = keycloakRule; - } - - public AdapterTestStrategy(String AUTH_SERVER_URL, String APP_SERVER_BASE_URL, AbstractKeycloakRule keycloakRule, boolean addSlash) { - this.AUTH_SERVER_URL = AUTH_SERVER_URL; - this.APP_SERVER_BASE_URL = APP_SERVER_BASE_URL; - this.keycloakRule = keycloakRule; - // some servlet containers redirect to root + "/" if you visit root context - if (addSlash) slash = "/"; - } - - public static RealmModel baseAdapterTestInitialization(KeycloakSession session, RealmManager manager, RealmModel adminRealm, Class clazz) { - RealmRepresentation representation = KeycloakServer.loadJson(clazz.getResourceAsStream("/adapter-test/demorealm.json"), RealmRepresentation.class); - RealmModel demoRealm = manager.importRealm(representation); - return demoRealm; - } - - @Override - protected void before() throws Throwable { - super.before(); - webRule.before(); - } - - @Override - protected void after() { - super.after(); - webRule.after(); - - // Revert notBefore - KeycloakSession session = keycloakRule.startSession(); - RealmModel realm = session.realms().getRealmByName("demo"); - session.getContext().setRealm(realm); - UserModel user = session.users().getUserByUsername("bburke@redhat.com", realm); - session.users().setNotBeforeForUser(realm, user, 0); - session.getTransactionManager().commit(); - session.close(); - } - - public void testSavedPostRequest() throws Exception { - // test login to customer-portal which does a bearer request to customer-db - driver.navigate().to(APP_SERVER_BASE_URL + "/input-portal"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/input-portal" + slash); - inputPage.execute("hello"); - - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - loginPage.login("bburke@redhat.com", "password"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/input-portal/secured/post"); - String pageSource = driver.getPageSource(); - System.out.println(pageSource); - Assert.assertTrue(pageSource.contains("parameter=hello")); - // test that user principal and KeycloakSecurityContext available - driver.navigate().to(APP_SERVER_BASE_URL + "/input-portal/insecure"); - System.out.println("insecure: "); - System.out.println(driver.getPageSource()); - Assert.assertTrue(driver.getPageSource().contains("Insecure Page")); - if (System.getProperty("insecure.user.principal.unsupported") == null) - Assert.assertTrue(driver.getPageSource().contains("UserPrincipal")); - - // test logout - - String logoutUri = OIDCLoginProtocolService.logoutUrl(UriBuilder.fromUri(AUTH_SERVER_URL)) - .queryParam(OAuth2Constants.REDIRECT_URI, APP_SERVER_BASE_URL + "/customer-portal").build("demo").toString(); - driver.navigate().to(logoutUri); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - driver.navigate().to(APP_SERVER_BASE_URL + "/product-portal"); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - - // test unsecured POST KEYCLOAK-901 - - Client client = ClientBuilder.newClient(); - Form form = new Form(); - form.param("parameter", "hello"); - String text = client.target(APP_SERVER_BASE_URL + "/input-portal/unsecured").request().post(Entity.form(form), String.class); - Assert.assertTrue(text.contains("parameter=hello")); - client.close(); - - } - - - public void testLoginSSOAndLogout() throws Exception { - // test login to customer-portal which does a bearer request to customer-db - driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - loginPage.login("bburke@redhat.com", "password"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/customer-portal" + slash); - String pageSource = driver.getPageSource(); - System.out.println(pageSource); - Assert.assertTrue(pageSource.contains("Bill Burke") && pageSource.contains("Stian Thorgersen")); - - // test SSO - driver.navigate().to(APP_SERVER_BASE_URL + "/product-portal"); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/product-portal" + slash); - pageSource = driver.getPageSource(); - System.out.println(pageSource); - Assert.assertTrue(pageSource.contains("iPhone") && pageSource.contains("iPad")); - - // View stats - try (Keycloak adminClient = Keycloak.getInstance("http://localhost:8081/auth", "master", "admin", "admin", Constants.ADMIN_CLI_CLIENT_ID)) { - List> stats = adminClient.realm("demo").getClientSessionStats(); - Map customerPortalStats = null; - Map productPortalStats = null; - for (Map s : stats) { - if (s.get("clientId").equals("customer-portal")) { - customerPortalStats = s; - } else if (s.get("clientId").equals("product-portal")) { - productPortalStats = s; - } - } - Assert.assertEquals(1, Integer.parseInt(customerPortalStats.get("active"))); - Assert.assertEquals(1, Integer.parseInt(productPortalStats.get("active"))); - } - - // test logout - String logoutUri = OIDCLoginProtocolService.logoutUrl(UriBuilder.fromUri(AUTH_SERVER_URL)) - .queryParam(OAuth2Constants.REDIRECT_URI, APP_SERVER_BASE_URL + "/customer-portal").build("demo").toString(); - driver.navigate().to(logoutUri); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - driver.navigate().to(APP_SERVER_BASE_URL + "/product-portal"); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - } - - /** - * KEYCLOAK-3509 - * - * @throws Exception - */ - public void testLoginEncodedRedirectUri() throws Exception { - // test login to customer-portal which does a bearer request to customer-db - driver.navigate().to(APP_SERVER_BASE_URL + "/product-portal?encodeTest=a%3Cb"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - loginPage.login("bburke@redhat.com", "password"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/product-portal" + slash + "?encodeTest=a%3Cb"); - String pageSource = driver.getPageSource(); - System.out.println(pageSource); - Assert.assertTrue(pageSource.contains("iPhone")); - Assert.assertTrue(pageSource.contains("uriEncodeTest=true")); - - // test logout - String logoutUri = OIDCLoginProtocolService.logoutUrl(UriBuilder.fromUri(AUTH_SERVER_URL)) - .queryParam(OAuth2Constants.REDIRECT_URI, APP_SERVER_BASE_URL + "/product-portal").build("demo").toString(); - driver.navigate().to(logoutUri); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - driver.navigate().to(APP_SERVER_BASE_URL + "/product-portal"); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - } - - - public void testServletRequestLogout() throws Exception { - // test login to customer-portal which does a bearer request to customer-db - driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - loginPage.login("bburke@redhat.com", "password"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/customer-portal" + slash); - String pageSource = driver.getPageSource(); - System.out.println(pageSource); - Assert.assertTrue(pageSource.contains("Bill Burke") && pageSource.contains("Stian Thorgersen")); - - // test SSO - driver.navigate().to(APP_SERVER_BASE_URL + "/product-portal"); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/product-portal" + slash); - pageSource = driver.getPageSource(); - System.out.println(pageSource); - Assert.assertTrue(pageSource.contains("iPhone") && pageSource.contains("iPad")); - - // back - driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/customer-portal" + slash); - pageSource = driver.getPageSource(); - System.out.println(pageSource); - Assert.assertTrue(pageSource.contains("Bill Burke") && pageSource.contains("Stian Thorgersen")); - // test logout - - driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal/logout"); - Assert.assertTrue(driver.getPageSource().contains("servlet logout ok")); - - - driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.startsWith(LOGIN_URL)); - driver.navigate().to(APP_SERVER_BASE_URL + "/product-portal"); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - - - } - - public void testLoginSSOIdle() throws Exception { - // test login to customer-portal which does a bearer request to customer-db - driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - loginPage.login("bburke@redhat.com", "password"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/customer-portal" + slash); - String pageSource = driver.getPageSource(); - System.out.println(pageSource); - Assert.assertTrue(pageSource.contains("Bill Burke") && pageSource.contains("Stian Thorgersen")); - - KeycloakSession session = keycloakRule.startSession(); - RealmModel realm = session.realms().getRealmByName("demo"); - session.getContext().setRealm(realm); - int originalIdle = realm.getSsoSessionIdleTimeout(); - realm.setSsoSessionIdleTimeout(1); - session.getTransactionManager().commit(); - session.close(); - - // Needs to add some additional time due the tolerance allowed by IDLE_TIMEOUT_WINDOW_SECONDS - Time.setOffset(2 + SessionTimeoutHelper.IDLE_TIMEOUT_WINDOW_SECONDS); - - // test SSO - driver.navigate().to(APP_SERVER_BASE_URL + "/product-portal"); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - - session = keycloakRule.startSession(); - realm = session.realms().getRealmByName("demo"); - session.getContext().setRealm(realm); - realm.setSsoSessionIdleTimeout(originalIdle); - session.getTransactionManager().commit(); - session.close(); - - Time.setOffset(0); - } - - public void testLoginSSOIdleRemoveExpiredUserSessions() throws Exception { - // test login to customer-portal which does a bearer request to customer-db - driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - loginPage.login("bburke@redhat.com", "password"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/customer-portal" + slash); - String pageSource = driver.getPageSource(); - System.out.println(pageSource); - Assert.assertTrue(pageSource.contains("Bill Burke") && pageSource.contains("Stian Thorgersen")); - - KeycloakSession session = keycloakRule.startSession(); - RealmModel realm = session.realms().getRealmByName("demo"); - session.getContext().setRealm(realm); - int originalIdle = realm.getSsoSessionIdleTimeout(); - realm.setSsoSessionIdleTimeout(1); - session.getTransactionManager().commit(); - session.close(); - - // Needs to add some additional time due the tolerance allowed by IDLE_TIMEOUT_WINDOW_SECONDS - Time.setOffset(2 + SessionTimeoutHelper.IDLE_TIMEOUT_WINDOW_SECONDS); - - session = keycloakRule.startSession(); - realm = session.realms().getRealmByName("demo"); - session.getContext().setRealm(realm); - session.sessions().removeExpired(realm); - session.getTransactionManager().commit(); - session.close(); - - // test SSO - driver.navigate().to(APP_SERVER_BASE_URL + "/product-portal"); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - - session = keycloakRule.startSession(); - realm = session.realms().getRealmByName("demo"); - session.getContext().setRealm(realm); - // need to cleanup so other tests don't fail, so invalidate http sessions on remote clients. - UserModel user = session.users().getUserByUsername("bburke@redhat.com", realm); - new ResourceAdminManager(session).logoutUser(null, realm, user, session); - realm.setSsoSessionIdleTimeout(originalIdle); - session.getTransactionManager().commit(); - session.close(); - - Time.setOffset(0); - } - - public void testLoginSSOMax() throws Exception { - // test login to customer-portal which does a bearer request to customer-db - driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - loginPage.login("bburke@redhat.com", "password"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/customer-portal" + slash); - String pageSource = driver.getPageSource(); - System.out.println(pageSource); - Assert.assertTrue(pageSource.contains("Bill Burke") && pageSource.contains("Stian Thorgersen")); - - KeycloakSession session = keycloakRule.startSession(); - RealmModel realm = session.realms().getRealmByName("demo"); - session.getContext().setRealm(realm); - int original = realm.getSsoSessionMaxLifespan(); - realm.setSsoSessionMaxLifespan(1); - session.getTransactionManager().commit(); - session.close(); - - Time.setOffset(2); - - - // test SSO - driver.navigate().to(APP_SERVER_BASE_URL + "/product-portal"); - Assert.assertTrue(driver.getCurrentUrl().startsWith(LOGIN_URL)); - - session = keycloakRule.startSession(); - realm = session.realms().getRealmByName("demo"); - session.getContext().setRealm(realm); - realm.setSsoSessionMaxLifespan(original); - session.getTransactionManager().commit(); - session.close(); - - Time.setOffset(0); - } - - /** - * KEYCLOAK-518 - * @throws Exception - */ - public void testNullBearerToken() throws Exception { - Client client = ClientBuilder.newClient(); - WebTarget target = client.target(APP_SERVER_BASE_URL + "/customer-db/"); - Response response = target.request().get(); - Assert.assertEquals(401, response.getStatus()); - response.close(); - response = target.request().header(HttpHeaders.AUTHORIZATION, "Bearer null").get(); - Assert.assertEquals(401, response.getStatus()); - response.close(); - client.close(); - - } - - /** - * KEYCLOAK-1368 - * @throws Exception - */ - public void testNullBearerTokenCustomErrorPage() throws Exception { - ErrorServlet.authError = null; - Client client = ClientBuilder.newClient(); - WebTarget target = client.target(APP_SERVER_BASE_URL + "/customer-db-error-page/"); - - Response response = target.request().get(); - - // TODO: follow redirects automatically if possible - if (response.getStatus() == 302) { - String location = response.getHeaderString(HttpHeaders.LOCATION); - response.close(); - response = client.target(location).request().get(); - } - Assert.assertEquals(401, response.getStatus()); - String errorPageResponse = response.readEntity(String.class); - Assert.assertTrue(errorPageResponse.contains("Error Page")); - response.close(); - Assert.assertNotNull(ErrorServlet.authError); - OIDCAuthenticationError error = (OIDCAuthenticationError) ErrorServlet.authError; - Assert.assertEquals(OIDCAuthenticationError.Reason.NO_BEARER_TOKEN, error.getReason()); - - ErrorServlet.authError = null; - response = target.request().header(HttpHeaders.AUTHORIZATION, "Bearer null").get(); - // TODO: follow redirects automatically if possible - if (response.getStatus() == 302) { - String location = response.getHeaderString(HttpHeaders.LOCATION); - response.close(); - response = client.target(location).request().get(); - } - Assert.assertEquals(401, response.getStatus()); - errorPageResponse = response.readEntity(String.class); - Assert.assertTrue(errorPageResponse.contains("Error Page")); - response.close(); - Assert.assertNotNull(ErrorServlet.authError); - error = (OIDCAuthenticationError) ErrorServlet.authError; - Assert.assertEquals(OIDCAuthenticationError.Reason.INVALID_TOKEN, error.getReason()); - - client.close(); - - } - - /** - * KEYCLOAK-518 - * @throws Exception - */ - public void testBadUser() throws Exception { - Client client = ClientBuilder.newClient(); - UriBuilder builder = UriBuilder.fromUri(AUTH_SERVER_URL); - URI uri = OIDCLoginProtocolService.tokenUrl(builder).build("demo"); - WebTarget target = client.target(uri); - String header = BasicAuthHelper.createHeader("customer-portal", "password"); - Form form = new Form(); - form.param(OAuth2Constants.GRANT_TYPE, OAuth2Constants.PASSWORD) - .param("username", "monkey@redhat.com") - .param("password", "password"); - Response response = target.request() - .header(HttpHeaders.AUTHORIZATION, header) - .post(Entity.form(form)); - Assert.assertEquals(401, response.getStatus()); - response.close(); - client.close(); - - } - - /** - * KEYCLOAK-732 - * - * @throws Throwable - */ - public void testSingleSessionInvalidated() throws Throwable { - AdapterTestStrategy browser1 = this; - AdapterTestStrategy browser2 = new AdapterTestStrategy(AUTH_SERVER_URL, APP_SERVER_BASE_URL, keycloakRule); - - loginAndCheckSession(browser1.driver, browser1.loginPage); - - // Open browser2 - browser2.webRule.before(); - try { - loginAndCheckSession(browser2.driver, browser2.loginPage); - - // Logout in browser1 - String logoutUri = OIDCLoginProtocolService.logoutUrl(UriBuilder.fromUri(AUTH_SERVER_URL)) - .queryParam(OAuth2Constants.REDIRECT_URI, APP_SERVER_BASE_URL + "/session-portal").build("demo").toString(); - browser1.driver.navigate().to(logoutUri); - Assert.assertTrue(browser1.driver.getCurrentUrl().startsWith(LOGIN_URL)); - - // Assert that I am logged out in browser1 - browser1.driver.navigate().to(APP_SERVER_BASE_URL + "/session-portal"); - Assert.assertTrue(browser1.driver.getCurrentUrl().startsWith(LOGIN_URL)); - - // Assert that I am still logged in browser2 and same session is still preserved - browser2.driver.navigate().to(APP_SERVER_BASE_URL + "/session-portal"); - Assert.assertEquals(browser2.driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/session-portal" + slash); - String pageSource = browser2.driver.getPageSource(); - Assert.assertTrue(pageSource.contains("Counter=3")); - - browser2.driver.navigate().to(logoutUri); - Assert.assertTrue(browser2.driver.getCurrentUrl().startsWith(LOGIN_URL)); - } finally { - browser2.webRule.after(); - } - } - - /** - * KEYCLOAK-741 - */ - public void testSessionInvalidatedAfterFailedRefresh() throws Throwable { - final AtomicInteger origTokenLifespan = new AtomicInteger(); - - // Delete adminUrl and set short accessTokenLifespan - keycloakRule.update(new KeycloakRule.KeycloakSetup() { - @Override - public void config(RealmManager manager, RealmModel adminstrationRealm, RealmModel demoRealm) { - ClientModel sessionPortal = demoRealm.getClientByClientId("session-portal"); - sessionPortal.setManagementUrl(null); - - origTokenLifespan.set(demoRealm.getAccessTokenLifespan()); - demoRealm.setAccessTokenLifespan(1); - } - }, "demo"); - - // Login - loginAndCheckSession(driver, loginPage); - - // Logout - String logoutUri = OIDCLoginProtocolService.logoutUrl(UriBuilder.fromUri(AUTH_SERVER_URL)) - .queryParam(OAuth2Constants.REDIRECT_URI, APP_SERVER_BASE_URL + "/session-portal").build("demo").toString(); - driver.navigate().to(logoutUri); - - // Wait until accessToken is expired - Time.setOffset(2); - - // Assert that http session was invalidated - driver.navigate().to(APP_SERVER_BASE_URL + "/session-portal"); - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.startsWith(LOGIN_URL)); - loginPage.login("bburke@redhat.com", "password"); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/session-portal" + slash); - String pageSource = driver.getPageSource(); - Assert.assertTrue(pageSource.contains("Counter=1")); - - keycloakRule.update(new KeycloakRule.KeycloakSetup() { - - @Override - public void config(RealmManager manager, RealmModel adminstrationRealm, RealmModel demoRealm) { - ClientModel sessionPortal = demoRealm.getClientByClientId("session-portal"); - sessionPortal.setManagementUrl(APP_SERVER_BASE_URL + "/session-portal"); - - demoRealm.setAccessTokenLifespan(origTokenLifespan.get()); - } - - }, "demo"); - - Time.setOffset(0); - } - - /** - * KEYCLOAK-942 - */ - public void testAdminApplicationLogout() throws Throwable { - // login as bburke - loginAndCheckSession(driver, loginPage); - - // logout mposolda with admin client - try (Keycloak keycloakAdmin = Keycloak.getInstance(AUTH_SERVER_URL, "master", "admin", "admin", Constants.ADMIN_CLI_CLIENT_ID)) { - UserRepresentation mposolda = keycloakAdmin.realm("demo").users().search("mposolda", null, null, null, null, null).get(0); - keycloakAdmin.realm("demo").users().get(mposolda.getId()).logout(); - - // bburke should be still logged with original httpSession in our browser window - driver.navigate().to(APP_SERVER_BASE_URL + "/session-portal"); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/session-portal" + slash); - String pageSource = driver.getPageSource(); - Assert.assertTrue(pageSource.contains("Counter=3")); - } - } - - /** - * KEYCLOAK-1216 - */ - public void testAccountManagementSessionsLogout() throws Throwable { - // login as bburke - loginAndCheckSession(driver, loginPage); - - // logout sessions in account management - accountSessionsPage.realm("demo"); - accountSessionsPage.open(); - Assert.assertTrue(accountSessionsPage.isCurrent()); - accountSessionsPage.logoutAll(); - - // Assert I need to login again (logout was propagated to the app) - loginAndCheckSession(driver, loginPage); - } - - protected void loginAndCheckSession(WebDriver driver, LoginPage loginPage) { - driver.navigate().to(APP_SERVER_BASE_URL + "/session-portal"); - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.startsWith(LOGIN_URL)); - loginPage.login("bburke@redhat.com", "password"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/session-portal" + slash); - String pageSource = driver.getPageSource(); - Assert.assertTrue(pageSource.contains("Counter=1")); - - // Counter increased now - driver.navigate().to(APP_SERVER_BASE_URL + "/session-portal"); - pageSource = driver.getPageSource(); - Assert.assertTrue(pageSource.contains("Counter=2")); - - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/SamlAdapterTestStrategy.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/SamlAdapterTestStrategy.java deleted file mode 100755 index 55aa991966..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/SamlAdapterTestStrategy.java +++ /dev/null @@ -1,675 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.helper.adapter; - -import org.apache.commons.io.IOUtils; -import org.junit.Assert; -import org.junit.rules.ExternalResource; -import org.keycloak.adapters.saml.SamlAuthenticationError; -import org.keycloak.adapters.saml.SamlPrincipal; -import org.keycloak.admin.client.Keycloak; -import org.keycloak.admin.client.resource.RealmResource; -import org.keycloak.common.util.KeyUtils; -import org.keycloak.common.util.Retry; -import org.keycloak.models.ClientModel; -import org.keycloak.models.Constants; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.ProtocolMapperModel; -import org.keycloak.models.RealmModel; -import org.keycloak.protocol.saml.mappers.*; -import org.keycloak.representations.idm.ClientRepresentation; -import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.saml.BaseSAML2BindingBuilder; -import org.keycloak.saml.SAML2ErrorResponseBuilder; -import org.keycloak.saml.SignatureAlgorithm; -import org.keycloak.saml.common.constants.GeneralConstants; -import org.keycloak.saml.common.constants.JBossSAMLURIConstants; -import org.keycloak.saml.processing.core.saml.v2.constants.X500SAMLProfileConstants; -import org.keycloak.services.managers.RealmManager; -import org.keycloak.testsuite.KeycloakServer; -import org.keycloak.testsuite.PageUtils; -import org.keycloak.testsuite.adapter.servlet.SamlSPFacade; -import org.keycloak.testsuite.pages.InputPage; -import org.keycloak.testsuite.pages.LoginPage; -import org.keycloak.testsuite.rule.AbstractKeycloakRule; -import org.keycloak.testsuite.rule.ErrorServlet; -import org.keycloak.testsuite.rule.KeycloakRule; -import org.keycloak.testsuite.rule.WebResource; -import org.keycloak.testsuite.rule.WebRule; -import org.openqa.selenium.WebDriver; -import org.w3c.dom.Document; - -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.Response; -import java.io.IOException; -import java.net.URI; -import java.security.KeyFactory; -import java.security.NoSuchAlgorithmException; -import java.security.PrivateKey; -import java.security.PublicKey; -import java.security.spec.InvalidKeySpecException; -import java.security.spec.PKCS8EncodedKeySpec; -import java.security.spec.X509EncodedKeySpec; -import java.util.*; -import java.util.logging.Level; -import java.util.logging.Logger; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; -import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -public class SamlAdapterTestStrategy extends ExternalResource { - protected String AUTH_SERVER_URL = "http://localhost:8081/auth"; - protected String APP_SERVER_BASE_URL = "http://localhost:8081"; - protected AbstractKeycloakRule keycloakRule; - - private static final String REALM_PRIVATE_KEY_STR = "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y="; - private static PrivateKey REALM_PRIVATE_KEY; - private static final String REALM_PUBLIC_KEY_STR = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB"; - private static PublicKey REALM_PUBLIC_KEY; - - static { - try { - KeyFactory kf = KeyFactory.getInstance("RSA"); - byte[] encoded = Base64.getDecoder().decode(REALM_PUBLIC_KEY_STR); - REALM_PUBLIC_KEY = (PublicKey) kf.generatePublic(new X509EncodedKeySpec(encoded)); - - encoded = Base64.getDecoder().decode(REALM_PRIVATE_KEY_STR); - REALM_PRIVATE_KEY = (PrivateKey) kf.generatePrivate(new PKCS8EncodedKeySpec(encoded)); - } catch (NoSuchAlgorithmException | InvalidKeySpecException ex) { - Logger.getLogger(SamlAdapterTestStrategy.class.getName()).log(Level.SEVERE, null, ex); - } - } - - public SamlAdapterTestStrategy(String AUTH_SERVER_URL, String APP_SERVER_BASE_URL, AbstractKeycloakRule keycloakRule) { - this.AUTH_SERVER_URL = AUTH_SERVER_URL; - this.APP_SERVER_BASE_URL = APP_SERVER_BASE_URL; - this.keycloakRule = keycloakRule; - } - - public WebRule webRule = new WebRule(this); - - - @WebResource - protected WebDriver driver; - @WebResource - protected LoginPage loginPage; - @WebResource - protected InputPage inputPage; - - @Override - protected void before() throws Throwable { - super.before(); - webRule.before(); - } - - @Override - protected void after() { - super.after(); - webRule.after(); - } - - public static RealmModel baseAdapterTestInitialization(KeycloakSession session, RealmManager manager, RealmModel adminRealm, Class clazz) { - RealmRepresentation representation = KeycloakServer.loadJson(clazz.getResourceAsStream("/keycloak-saml/testsaml.json"), RealmRepresentation.class); - RealmModel demoRealm = manager.importRealm(representation); - return demoRealm; - } - - - - protected void checkLoggedOut(String mainUrl, boolean postBinding) { - String pageSource = driver.getPageSource(); - System.out.println("*** logout pagesource ***"); - System.out.println(pageSource); - System.out.println("driver url: " + driver.getCurrentUrl()); - Assert.assertTrue(pageSource.contains("request-path: /logout.jsp")); - driver.navigate().to(mainUrl); - checkAtLoginPage(postBinding); - } - - protected void checkAtLoginPage(boolean postBinding) { - if (postBinding) assertAtLoginPagePostBinding(); - else assertAtLoginPageRedirectBinding(); - } - - protected void assertAtLoginPageRedirectBinding() { - Assert.assertTrue(driver.getCurrentUrl().startsWith(AUTH_SERVER_URL + "/realms/demo/protocol/saml")); - } - protected void assertAtLoginPagePostBinding() { - Assert.assertTrue(driver.getCurrentUrl().startsWith(AUTH_SERVER_URL + "/realms/demo/login-actions/authenticate")); - } - - public void testSavedPostRequest() throws Exception { - // test login to customer-portal which does a bearer request to customer-db - driver.navigate().to(APP_SERVER_BASE_URL + "/input-portal"); - System.err.println("*********** Current url: " + driver.getCurrentUrl()); - Assert.assertTrue(driver.getCurrentUrl().startsWith(APP_SERVER_BASE_URL + "/input-portal")); - inputPage.execute("hello"); - - assertAtLoginPagePostBinding(); - loginPage.login("bburke@redhat.com", "password"); - System.out.println("Current url: " + driver.getCurrentUrl()); - Assert.assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/input-portal/secured/post"); - String pageSource = driver.getPageSource(); - System.out.println(pageSource); - Assert.assertTrue(pageSource.contains("parameter=hello")); - // test that user principal and KeycloakSecurityContext available - driver.navigate().to(APP_SERVER_BASE_URL + "/input-portal/insecure"); - System.out.println("insecure: "); - System.out.println(driver.getPageSource()); - Assert.assertTrue(driver.getPageSource().contains("Insecure Page")); - if (System.getProperty("insecure.user.principal.unsupported") == null) Assert.assertTrue(driver.getPageSource().contains("UserPrincipal")); - - // test logout - - driver.navigate().to(APP_SERVER_BASE_URL + "/input-portal?GLO=true"); - - // test unsecured POST KEYCLOAK-901 - - Client client = ClientBuilder.newClient(); - Form form = new Form(); - form.param("parameter", "hello"); - String text = client.target(APP_SERVER_BASE_URL + "/input-portal/unsecured").request().post(Entity.form(form), String.class); - Assert.assertTrue(text.contains("parameter=hello")); - client.close(); - - } - - - - public void testErrorHandlingUnsigned() throws Exception { - ErrorServlet.authError = null; - Client client = ClientBuilder.newClient(); - // make sure - Response response = client.target(APP_SERVER_BASE_URL + "/employee-sig/").request().get(); - response.close(); - SAML2ErrorResponseBuilder builder = new SAML2ErrorResponseBuilder() - .destination(APP_SERVER_BASE_URL + "/employee-sig/saml") - .issuer(AUTH_SERVER_URL + "/realms/demo") - .status(JBossSAMLURIConstants.STATUS_REQUEST_DENIED.get()); - BaseSAML2BindingBuilder binding = new BaseSAML2BindingBuilder() - .relayState(null); - Document document = builder.buildDocument(); - URI uri = binding.redirectBinding(document).generateURI(APP_SERVER_BASE_URL + "/employee-sig/saml", false); - response = client.target(uri).request().get(); - String errorPage = response.readEntity(String.class); - response.close(); - Assert.assertTrue(errorPage.contains("Error Page")); - client.close(); - Assert.assertNotNull(ErrorServlet.authError); - SamlAuthenticationError error = (SamlAuthenticationError)ErrorServlet.authError; - Assert.assertEquals(SamlAuthenticationError.Reason.INVALID_SIGNATURE, error.getReason()); - Assert.assertNotNull(error.getStatus()); - ErrorServlet.authError = null; - - } - - public void testErrorHandlingSigned() throws Exception { - ErrorServlet.authError = null; - Client client = ClientBuilder.newClient(); - // make sure - Response response = client.target(APP_SERVER_BASE_URL + "/employee-sig/").request().get(); - response.close(); - SAML2ErrorResponseBuilder builder = new SAML2ErrorResponseBuilder() - .destination(APP_SERVER_BASE_URL + "/employee-sig/saml") - .issuer(AUTH_SERVER_URL + "/realms/demo") - .status(JBossSAMLURIConstants.STATUS_REQUEST_DENIED.get()); - BaseSAML2BindingBuilder binding = new BaseSAML2BindingBuilder() - .relayState(null) - .signatureAlgorithm(SignatureAlgorithm.RSA_SHA256) - .signWith(KeyUtils.createKeyId(REALM_PRIVATE_KEY), REALM_PRIVATE_KEY, REALM_PUBLIC_KEY) - .signDocument(); - Document document = builder.buildDocument(); - URI uri = binding.generateRedirectUri(GeneralConstants.SAML_RESPONSE_KEY, APP_SERVER_BASE_URL + "/employee-sig/saml", document); - response = client.target(uri).request().get(); - String errorPage = response.readEntity(String.class); - response.close(); - Assert.assertTrue(errorPage.contains("Error Page")); - client.close(); - Assert.assertNotNull(ErrorServlet.authError); - SamlAuthenticationError error = (SamlAuthenticationError)ErrorServlet.authError; - Assert.assertEquals(SamlAuthenticationError.Reason.ERROR_STATUS, error.getReason()); - Assert.assertNotNull(error.getStatus()); - ErrorServlet.authError = null; - - } - - public void testPostSimpleLoginLogout() { - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post/"); - assertAtLoginPagePostBinding(); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/sales-post/"); - System.out.println(driver.getPageSource()); - Assert.assertTrue(driver.getPageSource().contains("bburke")); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/sales-post/", true); - } - - public void testPostPassiveLoginLogout(boolean forbiddenIfNotauthenticated) { - // first request on passive app - no login page shown, user not logged in as we are in passive mode. - // Shown page depends on used authentication mechanism, some may return forbidden error, some return requested page with anonymous user (not logged in) - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-passive/"); - assertEquals(APP_SERVER_BASE_URL + "/sales-post-passive/saml", driver.getCurrentUrl()); - System.out.println(driver.getPageSource()); - if (forbiddenIfNotauthenticated) { - Assert.assertTrue(driver.getPageSource().contains("HTTP status code: 403")); - } else { - Assert.assertTrue(driver.getPageSource().contains("principal=null")); - } - - // login user by asking login from other app - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post/"); - loginPage.login("bburke", "password"); - - // navigate to the passive app again, we have to be logged in now - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-passive/"); - assertEquals(APP_SERVER_BASE_URL + "/sales-post-passive/", driver.getCurrentUrl()); - System.out.println(driver.getPageSource()); - Assert.assertTrue(driver.getPageSource().contains("bburke")); - - // logout from both app - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-passive?GLO=true"); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post?GLO=true"); - - // refresh passive app page, not logged in again as we are in passive mode - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-passive/"); - assertEquals(APP_SERVER_BASE_URL + "/sales-post-passive/saml", driver.getCurrentUrl()); - Assert.assertFalse(driver.getPageSource().contains("bburke")); - } - - public void testPostSimpleUnauthorized(CheckAuthError error) { - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post/"); - assertAtLoginPagePostBinding(); - loginPage.login("unauthorized", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/sales-post/"); - System.out.println(driver.getPageSource()); - error.check(driver); - } - - public void testPostSimpleLoginLogoutIdpInitiated() { - driver.navigate().to(AUTH_SERVER_URL + "/realms/demo/protocol/saml/clients/sales-post"); - loginPage.login("bburke", "password"); - Assert.assertTrue(driver.getCurrentUrl().startsWith(APP_SERVER_BASE_URL + "/sales-post")); - System.out.println(driver.getPageSource()); - Assert.assertTrue(driver.getPageSource().contains("bburke")); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/sales-post/", true); - } - - public void testPostSimpleLoginLogoutIdpInitiatedRedirectTo() { - driver.navigate().to(AUTH_SERVER_URL + "/realms/demo/protocol/saml/clients/sales-post2"); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/sales-post2/foo"); - System.out.println(driver.getPageSource()); - Assert.assertTrue(driver.getPageSource().contains("bburke")); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post2?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/sales-post2/", true); - } - - public void testPostSignedLoginLogout() { - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-sig/"); - assertAtLoginPagePostBinding(); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/sales-post-sig/"); - Assert.assertTrue(driver.getPageSource().contains("bburke")); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-sig?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/sales-post-sig/", true); - - } - public void testPostSignedResponseAndAssertionLoginLogout() { - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-assertion-and-response-sig/"); - assertAtLoginPagePostBinding(); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/sales-post-assertion-and-response-sig/"); - Assert.assertTrue(driver.getPageSource().contains("bburke")); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-assertion-and-response-sig?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/sales-post-assertion-and-response-sig/", true); - - } - public void testPostSignedLoginLogoutTransientNameID() { - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-sig-transient/"); - assertAtLoginPagePostBinding(); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/sales-post-sig-transient/"); - System.out.println(driver.getPageSource()); - Assert.assertFalse(driver.getPageSource().contains("bburke")); - Assert.assertTrue(driver.getPageSource().contains("principal=G-")); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-sig-transient?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/sales-post-sig-transient/", true); - - } - public void testPostSignedLoginLogoutPersistentNameID() { - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-sig-persistent/"); - assertAtLoginPagePostBinding(); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/sales-post-sig-persistent/"); - System.out.println(driver.getPageSource()); - Assert.assertFalse(driver.getPageSource().contains("bburke")); - Assert.assertTrue(driver.getPageSource().contains("principal=G-")); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-sig-persistent?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/sales-post-sig-persistent/", true); - - } - public void testPostSignedLoginLogoutEmailNameID() { - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-sig-email/"); - assertAtLoginPagePostBinding(); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/sales-post-sig-email/"); - System.out.println(driver.getPageSource()); - Assert.assertTrue(driver.getPageSource().contains("principal=bburke@redhat.com")); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-sig-email?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/sales-post-sig-email/", true); - - } - - public void testRelayStateEncoding() throws Exception { - // this test has a hardcoded SAMLRequest and we hack a SP face servlet to get the SAMLResponse so we can look - // at the relay state - SamlSPFacade.samlResponse = null; - driver.navigate().to(APP_SERVER_BASE_URL + "/employee/"); - assertAtLoginPageRedirectBinding(); - System.out.println(driver.getCurrentUrl()); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/employee/"); - assertEquals(SamlSPFacade.sentRelayState, SamlSPFacade.RELAY_STATE); - Assert.assertNotNull(SamlSPFacade.samlResponse); - - } - - public void testAttributes() throws Exception { - keycloakRule.update(new KeycloakRule.KeycloakSetup() { - @Override - public void config(RealmManager manager, RealmModel adminstrationRealm, RealmModel appRealm) { - ClientModel app = appRealm.getClientByClientId(APP_SERVER_BASE_URL + "/employee2/"); - app.addProtocolMapper(GroupMembershipMapper.create("groups", "group", null, null, true)); - app.addProtocolMapper(UserAttributeStatementMapper.createAttributeMapper("topAttribute", "topAttribute", "topAttribute", "Basic", null)); - app.addProtocolMapper(UserAttributeStatementMapper.createAttributeMapper("level2Attribute", "level2Attribute", "level2Attribute", "Basic", null)); - app.addProtocolMapper(ScriptBasedMapper.create("test-script-mapper1", "script-single-value", "Basic", null, "'hello_' + user.getUsername()", true)); - app.addProtocolMapper(ScriptBasedMapper.create("test-script-mapper2", "script-multiple-values-single-attribute-array", "Basic", null, "Java.to(['A', 'B', 'C'], Java.type('java.lang.String[]'))", true)); - app.addProtocolMapper(ScriptBasedMapper.create("test-script-mapper3", "script-multiple-values-single-attribute-list", "Basic", null, "new java.util.ArrayList(['D', 'E', 'F'])", true)); - app.addProtocolMapper(ScriptBasedMapper.create("test-script-mapper4", "script-multiple-values-multiple-attributes-set", "Basic", null, "new java.util.HashSet(['G', 'H', 'I'])", false)); - } - }, "demo"); - { - SendUsernameServlet.sentPrincipal = null; - SendUsernameServlet.checkRoles = null; - driver.navigate().to(APP_SERVER_BASE_URL + "/employee2/"); - assertAtLoginPagePostBinding(); - List requiredRoles = new LinkedList<>(); - requiredRoles.add("manager"); - requiredRoles.add("user"); - SendUsernameServlet.checkRoles = requiredRoles; - loginPage.login("level2GroupUser", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/employee2/"); - SendUsernameServlet.checkRoles = null; - SamlPrincipal principal = (SamlPrincipal) SendUsernameServlet.sentPrincipal; - Assert.assertNotNull(principal); - assertEquals("level2@redhat.com", principal.getAttribute(X500SAMLProfileConstants.EMAIL.get())); - assertEquals("true", principal.getAttribute("topAttribute")); - assertEquals("true", principal.getAttribute("level2Attribute")); - List groups = principal.getAttributes("group"); - Assert.assertNotNull(groups); - Set groupSet = new HashSet<>(); - assertEquals("level2@redhat.com", principal.getFriendlyAttribute("email")); - assertEquals("hello_level2groupuser", principal.getAttribute("script-single-value")); - assertThat(principal.getAttributes("script-multiple-values-single-attribute-array"), containsInAnyOrder("A","B","C")); - assertEquals(1, principal.getAssertion().getAttributeStatements().stream(). - flatMap(x -> x.getAttributes().stream()). - filter(x -> x.getAttribute().getName().equals("script-multiple-values-single-attribute-array")) - .count()); - assertThat(principal.getAttributes("script-multiple-values-single-attribute-list"), containsInAnyOrder("D","E","F")); - assertEquals(1, principal.getAssertion().getAttributeStatements().stream(). - flatMap(x -> x.getAttributes().stream()). - filter(x -> x.getAttribute().getName().equals("script-multiple-values-single-attribute-list")) - .count()); - assertThat(principal.getAttributes("script-multiple-values-multiple-attributes-set"), containsInAnyOrder("G","H","I")); - assertEquals(3, principal.getAssertion().getAttributeStatements().stream(). - flatMap(x -> x.getAttributes().stream()). - filter(x -> x.getAttribute().getName().equals("script-multiple-values-multiple-attributes-set")) - .count()); - driver.navigate().to(APP_SERVER_BASE_URL + "/employee2/?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/employee2/", true); - - } - { - SendUsernameServlet.sentPrincipal = null; - SendUsernameServlet.checkRoles = null; - driver.navigate().to(APP_SERVER_BASE_URL + "/employee2/"); - assertAtLoginPagePostBinding(); - List requiredRoles = new LinkedList<>(); - requiredRoles.add("manager"); - requiredRoles.add("employee"); - requiredRoles.add("user"); - SendUsernameServlet.checkRoles = requiredRoles; - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/employee2/"); - SendUsernameServlet.checkRoles = null; - SamlPrincipal principal = (SamlPrincipal) SendUsernameServlet.sentPrincipal; - Assert.assertNotNull(principal); - assertEquals("bburke@redhat.com", principal.getAttribute(X500SAMLProfileConstants.EMAIL.get())); - assertEquals("bburke@redhat.com", principal.getFriendlyAttribute("email")); - assertEquals("617", principal.getAttribute("phone")); - Assert.assertNull(principal.getFriendlyAttribute("phone")); - assertEquals("hello_bburke", principal.getAttribute("script-single-value")); - driver.navigate().to(APP_SERVER_BASE_URL + "/employee2/?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/employee2/", true); - - } - keycloakRule.update(new KeycloakRule.KeycloakSetup() { - @Override - public void config(RealmManager manager, RealmModel adminstrationRealm, RealmModel appRealm) { - ClientModel app = appRealm.getClientByClientId(APP_SERVER_BASE_URL + "/employee2/"); - for (ProtocolMapperModel mapper : app.getProtocolMappers()) { - if (mapper.getName().equals("role-list")) { - app.removeProtocolMapper(mapper); - mapper.setId(null); - mapper.getConfig().put(RoleListMapper.SINGLE_ROLE_ATTRIBUTE, "true"); - mapper.getConfig().put(AttributeStatementHelper.SAML_ATTRIBUTE_NAME, "memberOf"); - app.addProtocolMapper(mapper); - } - } - app.addProtocolMapper(HardcodedAttributeMapper.create("hardcoded-attribute", "hardcoded-attribute", "Basic", null, "hard")); - app.addProtocolMapper(HardcodedRole.create("hardcoded-role", "hardcoded-role")); - app.addProtocolMapper(RoleNameMapper.create("renamed-role", "manager", "el-jefe")); - app.addProtocolMapper(RoleNameMapper.create("renamed-employee-role", APP_SERVER_BASE_URL + "/employee/.employee", "pee-on")); - } - }, "demo"); - - System.out.println(">>>>>>>>>> single role attribute <<<<<<<<"); - - { - SendUsernameServlet.sentPrincipal = null; - SendUsernameServlet.checkRoles = null; - driver.navigate().to(APP_SERVER_BASE_URL + "/employee2/"); - assertAtLoginPagePostBinding(); - List requiredRoles = new LinkedList<>(); - requiredRoles.add("el-jefe"); - requiredRoles.add("user"); - requiredRoles.add("hardcoded-role"); - requiredRoles.add("pee-on"); - SendUsernameServlet.checkRoles = requiredRoles; - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/employee2/"); - SendUsernameServlet.checkRoles = null; - SamlPrincipal principal = (SamlPrincipal) SendUsernameServlet.sentPrincipal; - Assert.assertNotNull(principal); - assertEquals("hard", principal.getAttribute("hardcoded-attribute")); - - - } - } - - public void testRedirectSignedLoginLogout() { - driver.navigate().to(APP_SERVER_BASE_URL + "/employee-sig/"); - assertAtLoginPageRedirectBinding(); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/employee-sig/"); - Assert.assertTrue(driver.getPageSource().contains("bburke")); - driver.navigate().to(APP_SERVER_BASE_URL + "/employee-sig?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/employee-sig/", false); - - } - - public void testRedirectSignedLoginLogoutFrontNoSSO() { - driver.navigate().to(APP_SERVER_BASE_URL + "/employee-sig-front/"); - assertAtLoginPageRedirectBinding(); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/employee-sig-front/"); - Assert.assertTrue(driver.getPageSource().contains("bburke")); - driver.navigate().to(APP_SERVER_BASE_URL + "/employee-sig-front?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/employee-sig-front/", false); - - } - - public void testRedirectSignedLoginLogoutFront() { - // visit 1st app an logg in - System.out.println("visit 1st app "); - driver.navigate().to(APP_SERVER_BASE_URL + "/employee-sig/"); - assertAtLoginPageRedirectBinding(); - System.out.println("login to form"); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/employee-sig/"); - Assert.assertTrue(driver.getPageSource().contains("bburke")); - - // visit 2nd app - System.out.println("visit 2nd app "); - driver.navigate().to(APP_SERVER_BASE_URL + "/employee-sig-front/"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/employee-sig-front/"); - Assert.assertTrue(driver.getPageSource().contains("bburke")); - - // visit 3rd app - System.out.println("visit 3rd app "); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-sig/"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/sales-post-sig/"); - Assert.assertTrue(driver.getPageSource().contains("bburke")); - - // logout of first app - System.out.println("GLO"); - driver.navigate().to(APP_SERVER_BASE_URL + "/employee-sig?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/employee-sig/", false); - driver.navigate().to(APP_SERVER_BASE_URL + "/employee-sig-front/"); - String currentUrl = driver.getCurrentUrl(); - Assert.assertTrue(currentUrl.startsWith(AUTH_SERVER_URL + "/realms/demo/protocol/saml")); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-sig/"); - assertAtLoginPagePostBinding(); - - } - - public void testPostEncryptedLoginLogout() { - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-enc/"); - assertAtLoginPagePostBinding(); - loginPage.login("bburke", "password"); - Retry.execute(new Runnable() { - @Override - public void run() { - assertEquals(APP_SERVER_BASE_URL + "/sales-post-enc/", driver.getCurrentUrl()); - } - }, 10, 100); - Assert.assertTrue(driver.getPageSource().contains("bburke")); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-post-enc?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/sales-post-enc/", true); - - } - public void testPostBadClientSignature() { - driver.navigate().to(APP_SERVER_BASE_URL + "/bad-client-sales-post-sig/"); - System.out.println(driver.getCurrentUrl()); - Assert.assertTrue(driver.getCurrentUrl().startsWith(AUTH_SERVER_URL + "/realms/demo/protocol/saml")); - assertEquals(PageUtils.getPageTitle(driver), "We're sorry..."); - - } - public static interface CheckAuthError { - void check(WebDriver driver); - } - - public void testPostBadRealmSignature() { - ErrorServlet.authError = null; - driver.navigate().to(APP_SERVER_BASE_URL + "/bad-realm-sales-post-sig/"); - assertAtLoginPagePostBinding(); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/bad-realm-sales-post-sig/saml"); - System.out.println(driver.getPageSource()); - Assert.assertNotNull(ErrorServlet.authError); - SamlAuthenticationError error = (SamlAuthenticationError)ErrorServlet.authError; - Assert.assertEquals(SamlAuthenticationError.Reason.INVALID_SIGNATURE, error.getReason()); - ErrorServlet.authError = null; - } - - public void testPostBadAssertionSignature() { - ErrorServlet.authError = null; - driver.navigate().to(APP_SERVER_BASE_URL + "/bad-assertion-sales-post-sig/"); - assertAtLoginPagePostBinding(); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/bad-assertion-sales-post-sig/saml"); - System.out.println(driver.getPageSource()); - Assert.assertNotNull(ErrorServlet.authError); - SamlAuthenticationError error = (SamlAuthenticationError)ErrorServlet.authError; - Assert.assertEquals(SamlAuthenticationError.Reason.INVALID_SIGNATURE, error.getReason()); - ErrorServlet.authError = null; - } - - public void testMissingAssertionSignature() { - ErrorServlet.authError = null; - driver.navigate().to(APP_SERVER_BASE_URL + "/missing-assertion-sig/"); - assertAtLoginPagePostBinding(); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/missing-assertion-sig/saml"); - System.out.println(driver.getPageSource()); - Assert.assertNotNull(ErrorServlet.authError); - SamlAuthenticationError error = (SamlAuthenticationError)ErrorServlet.authError; - Assert.assertEquals(SamlAuthenticationError.Reason.INVALID_SIGNATURE, error.getReason()); - ErrorServlet.authError = null; - } - - public void testMetadataPostSignedLoginLogout() throws Exception { - - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-metadata/"); - assertAtLoginPagePostBinding(); - loginPage.login("bburke", "password"); - assertEquals(driver.getCurrentUrl(), APP_SERVER_BASE_URL + "/sales-metadata/"); - String pageSource = driver.getPageSource(); - Assert.assertTrue(pageSource.contains("bburke")); - driver.navigate().to(APP_SERVER_BASE_URL + "/sales-metadata?GLO=true"); - checkLoggedOut(APP_SERVER_BASE_URL + "/sales-metadata/", true); - - } - - public static void uploadSP(String AUTH_SERVER_URL) { - try { - Keycloak keycloak = Keycloak.getInstance(AUTH_SERVER_URL, "master", "admin", "admin", Constants.ADMIN_CLI_CLIENT_ID, (String) null); - RealmResource admin = keycloak.realm("demo"); - - admin.toRepresentation(); - - ClientRepresentation clientRep = admin.convertClientDescription(IOUtils.toString(SamlAdapterTestStrategy.class.getResourceAsStream("/keycloak-saml/sp-metadata.xml"))); - Response response = admin.clients().create(clientRep); - - assertEquals(201, response.getStatus()); - - keycloak.close(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/SamlKeycloakRule.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/SamlKeycloakRule.java deleted file mode 100755 index f3199d6de9..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/SamlKeycloakRule.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.helper.adapter; - -import io.undertow.security.idm.Account; -import io.undertow.security.idm.Credential; -import io.undertow.security.idm.IdentityManager; -import io.undertow.server.handlers.resource.Resource; -import io.undertow.server.handlers.resource.ResourceChangeListener; -import io.undertow.server.handlers.resource.ResourceManager; -import io.undertow.server.handlers.resource.URLResource; -import io.undertow.servlet.api.DeploymentInfo; -import io.undertow.servlet.api.FilterInfo; -import io.undertow.servlet.api.ServletInfo; -import org.keycloak.adapters.saml.servlet.SamlFilter; -import org.keycloak.adapters.saml.undertow.SamlServletExtension; -import org.keycloak.testsuite.helper.adapter.SendUsernameServlet; -import org.keycloak.testsuite.rule.AbstractKeycloakRule; - -import javax.servlet.DispatcherType; -import java.io.IOException; -import java.net.URL; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -public abstract class SamlKeycloakRule extends AbstractKeycloakRule { - - public static class TestResourceManager implements ResourceManager { - - private final String basePath; - - public TestResourceManager(String basePath){ - this.basePath = basePath; - } - - @Override - public Resource getResource(String path) throws IOException { - String temp = path; - String fullPath = basePath + temp; - URL url = getClass().getResource(fullPath); - if (url == null) { - System.out.println("url is null: " + fullPath); - } - return new URLResource(url, url.openConnection(), path); - } - - @Override - public boolean isResourceChangeListenerSupported() { - throw new RuntimeException(); - } - - @Override - public void registerResourceChangeListener(ResourceChangeListener listener) { - throw new RuntimeException(); - } - - @Override - public void removeResourceChangeListener(ResourceChangeListener listener) { - throw new RuntimeException(); - } - - @Override - public void close() throws IOException { - throw new RuntimeException(); - } - } - - public static class TestIdentityManager implements IdentityManager { - @Override - public Account verify(Account account) { - return account; - } - - @Override - public Account verify(String userName, Credential credential) { - throw new RuntimeException("WTF"); - } - - @Override - public Account verify(Credential credential) { - throw new RuntimeException(); - } - } - - @Override - protected void setupKeycloak() { - String realmJson = getRealmJson(); - server.importRealm(getClass().getResourceAsStream(realmJson)); - initWars(); - } - - public abstract void initWars(); - - public void initializeSamlSecuredWar(String warResourcePath, String contextPath, String warDeploymentName, ClassLoader classLoader) { - - ServletInfo regularServletInfo = new ServletInfo("servlet", SendUsernameServlet.class) - .addMapping("/*"); - - FilterInfo samlFilter = new FilterInfo("saml-filter", SamlFilter.class); - - - ResourceManager resourceManager = new TestResourceManager(warResourcePath); - - DeploymentInfo deploymentInfo = new DeploymentInfo() - .setClassLoader(classLoader) - .setIdentityManager(new TestIdentityManager()) - .setContextPath(contextPath) - .setDeploymentName(warDeploymentName) - .setResourceManager(resourceManager) - .addServlets(regularServletInfo) - .addFilter(samlFilter) - .addFilterUrlMapping("saml-filter", "/*", DispatcherType.REQUEST) - .addServletExtension(new SamlServletExtension()); - addErrorPage("/error.html", deploymentInfo); - server.getServer().deploy(deploymentInfo); - } - - public String getRealmJson() { - return "/keycloak-saml/testsaml.json"; - } - - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/SendUsernameServlet.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/SendUsernameServlet.java deleted file mode 100755 index 9543da4ab8..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/helper/adapter/SendUsernameServlet.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.helper.adapter; - -import org.junit.Assert; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.OutputStream; -import java.security.Principal; -import java.util.List; - -/** -* @author Bill Burke -* @version $Revision: 1 $ -*/ -public class SendUsernameServlet extends HttpServlet { - - public static Principal sentPrincipal; - public static List checkRoles; - - @Override - protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { - System.out.println("In SendUsername Servlet doGet()"); - if (checkRoles != null) { - for (String role : checkRoles) { - System.out.println("check role: " + role); - //Assert.assertTrue(req.isUserInRole(role)); - if (!req.isUserInRole(role)) { - resp.sendError(403); - return; - } - } - - } - resp.setContentType("text/plain"); - OutputStream stream = resp.getOutputStream(); - Principal principal = req.getUserPrincipal(); - stream.write("request-path: ".getBytes()); - if (req.getPathInfo() != null) stream.write(req.getPathInfo().getBytes()); - stream.write("\n".getBytes()); - stream.write("principal=".getBytes()); - if (principal == null) { - stream.write("null".getBytes()); - return; - } - String name = principal.getName(); - stream.write(name.getBytes()); - sentPrincipal = principal; - - } - @Override - protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { - System.out.println("In SendUsername Servlet doPost()"); - if (checkRoles != null) { - for (String role : checkRoles) { - System.out.println("check role: " + role); - Assert.assertTrue(req.isUserInRole(role)); - } - - } - resp.setContentType("text/plain"); - OutputStream stream = resp.getOutputStream(); - Principal principal = req.getUserPrincipal(); - stream.write("request-path: ".getBytes()); - stream.write(req.getPathInfo().getBytes()); - stream.write("\n".getBytes()); - stream.write("principal=".getBytes()); - if (principal == null) { - stream.write("null".getBytes()); - return; - } - String name = principal.getName(); - stream.write(name.getBytes()); - sentPrincipal = principal; - } -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountSessionsPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountSessionsPage.java deleted file mode 100755 index 753570b1f6..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/AccountSessionsPage.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.pages; - -import org.keycloak.services.Urls; -import org.keycloak.testsuite.Constants; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -import javax.ws.rs.core.UriBuilder; -import java.util.LinkedList; -import java.util.List; - -/** - * @author Stian Thorgersen - */ -public class AccountSessionsPage extends AbstractAccountPage { - - private String realmName = "test"; - - private String path = Urls.accountSessionsPage(UriBuilder.fromUri(Constants.AUTH_SERVER_ROOT).build(), "test").toString(); - - @FindBy(id = "logout-all-sessions") - private WebElement logoutAllLink; - - public boolean isCurrent() { - return driver.getTitle().contains("Account Management") && driver.getCurrentUrl().endsWith("/account/sessions"); - } - - public void realm(String realmName) { - this.realmName = realmName; - } - - public String getPath() { - return Urls.accountSessionsPage(UriBuilder.fromUri(Constants.AUTH_SERVER_ROOT).build(), realmName).toString(); - } - - public void open() { - driver.navigate().to(getPath()); - } - - public void logoutAll() { - logoutAllLink.click(); - } - - public List> getSessions() { - List> table = new LinkedList>(); - for (WebElement r : driver.findElements(By.tagName("tr"))) { - List row = new LinkedList(); - for (WebElement col : r.findElements(By.tagName("td"))) { - row.add(col.getText()); - } - table.add(row); - } - table.remove(0); - return table; - } - -} diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/InputPage.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/InputPage.java deleted file mode 100755 index b99ac5ad99..0000000000 --- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/pages/InputPage.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.pages; - -import org.keycloak.testsuite.pages.AbstractPage; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -public class InputPage extends AbstractPage { - @FindBy(id = "parameter") - private WebElement parameter; - - @FindBy(name = "submit") - private WebElement submit; - - public void execute(String param) { - parameter.clear(); - parameter.sendKeys(param); - - submit.click(); - } - - - public boolean isCurrent() { - return driver.getTitle().equals("Input Page"); - } - - @Override - public void open() { - } - - -} diff --git a/testsuite/pom.xml b/testsuite/pom.xml index 1516759595..eeb68f2ae9 100755 --- a/testsuite/pom.xml +++ b/testsuite/pom.xml @@ -44,34 +44,11 @@ integration-deprecated - tomcat8 integration-arquillian utils - - community - - - !product - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - - tomcat7 - - performance diff --git a/testsuite/tomcat7/pom.xml b/testsuite/tomcat7/pom.xml deleted file mode 100755 index e50ccca4ca..0000000000 --- a/testsuite/tomcat7/pom.xml +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - keycloak-testsuite-pom - org.keycloak - 5.0.0-SNAPSHOT - ../pom.xml - - 4.0.0 - - keycloak-testsuite-tomcat7 - Keycloak Tomcat 7 Integration TestSuite - - 1.7 - 1.7 - - - 7.0.59 - - - - - - org.apache.tomcat - tomcat-catalina - 7.0.59 - - - org.apache.tomcat - tomcat-util - 7.0.59 - - - org.apache.tomcat.embed - tomcat-embed-core - 7.0.59 - - - - - io.undertow.jastow - jastow - 2.0.0.Final - - - org.jboss.spec.javax.servlet.jsp - jboss-jsp-api_2.3_spec - 1.0.1.Final - - - org.keycloak - keycloak-dependencies-server-all - pom - - - org.keycloak - keycloak-admin-client - - - log4j - log4j - - - org.jboss.spec.javax.servlet - jboss-servlet-api_3.0_spec - - - org.jboss.spec.javax.ws.rs - jboss-jaxrs-api_2.1_spec - - - org.jboss.resteasy - resteasy-jaxrs - - - org.keycloak - keycloak-saml-tomcat7-adapter - - - org.apache.tomcat - tomcat-servlet-api - - - org.apache.tomcat - tomcat-catalina - - - org.apache.tomcat - catalina - - - - - org.jboss.resteasy - resteasy-client - - - org.jboss.resteasy - resteasy-multipart-provider - - - org.jboss.resteasy - resteasy-jackson2-provider - - - org.jboss.resteasy - resteasy-undertow - - - com.google.zxing - javase - - - org.bouncycastle - bcprov-jdk15on - - - org.apache.httpcomponents - httpclient - - - org.keycloak - keycloak-ldap-federation - - - org.keycloak - keycloak-kerberos-federation - - - org.keycloak - keycloak-undertow-adapter - - - org.keycloak - keycloak-tomcat7-adapter - - - org.jboss.logging - jboss-logging - - - io.undertow - undertow-servlet - - - io.undertow - undertow-core - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.core - jackson-databind - - - com.fasterxml.jackson.core - jackson-annotations - - - junit - junit - - - org.hamcrest - hamcrest-all - - - com.h2database - h2 - - - com.icegreen - greenmail - - - org.slf4j - slf4j-api - - - - - org.infinispan - infinispan-core - - - org.seleniumhq.selenium - selenium-java - - - xml-apis - xml-apis - - - org.seleniumhq.selenium - selenium-chrome-driver - - - org.keycloak - keycloak-testsuite-integration-deprecated - test - - - org.keycloak - keycloak-testsuite-integration-deprecated - test-jar - test - - - org.keycloak.testsuite - integration-arquillian-test-apps-servlets - ${project.version} - test - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - test-jar - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.codehaus.mojo - exec-maven-plugin - - ${project.basedir} - - - - - - - - keycloak-server - - - - org.codehaus.mojo - exec-maven-plugin - - org.keycloak.testsuite.KeycloakServer - - - - - - - mail-server - - - - org.codehaus.mojo - exec-maven-plugin - - org.keycloak.testsuite.MailServer - - - - - - - totp - - - - org.codehaus.mojo - exec-maven-plugin - - org.keycloak.testsuite.TotpGenerator - - - - - - - - jpa - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - jpa - jpa - jpa - - - - - - - - - - - - keycloak.connectionsJpa.driver - com.mysql.jdbc.Driver - - - mysql - - - mysql - mysql-connector-java - ${mysql.version} - - - - - - - - - keycloak.connectionsJpa.driver - org.postgresql.Driver - - - postgresql - - - org.postgresql - postgresql - ${postgresql.version} - - - - - - clean-jpa - - - - org.liquibase - liquibase-maven-plugin - - META-INF/jpa-changelog-master.xml - - ${keycloak.connectionsJpa.url} - ${keycloak.connectionsJpa.driver} - ${keycloak.connectionsJpa.user} - ${keycloak.connectionsJpa.password} - - false - - - - clean-jpa - clean - - dropAll - - - - - - - - - diff --git a/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/Tomcat7Test.java b/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/Tomcat7Test.java deleted file mode 100755 index d3eadab963..0000000000 --- a/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/Tomcat7Test.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite; - -import org.apache.catalina.startup.Tomcat; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmModel; -import org.keycloak.services.managers.RealmManager; -import org.keycloak.testsuite.helper.adapter.AdapterTestStrategy; -import org.keycloak.testsuite.rule.AbstractKeycloakRule; - -import java.io.File; -import java.net.URL; -import java.util.regex.Matcher; - -/** - * @author Stian Thorgersen - */ -public class Tomcat7Test { - @ClassRule - public static AbstractKeycloakRule keycloakRule = new AbstractKeycloakRule() { - @Override - protected void configure(KeycloakSession session, RealmManager manager, RealmModel adminRealm) { - AdapterTestStrategy.baseAdapterTestInitialization(session, manager, adminRealm, getClass()); - } - }; - - static Tomcat tomcat = null; - - @BeforeClass - public static void initTomcat() throws Exception { - tomcat = new Tomcat(); - String baseDir = getBaseDirectory(); - tomcat.setBaseDir(baseDir); - tomcat.setPort(8082); - - System.setProperty("app.server.base.url", "http://localhost:8082"); - System.setProperty("my.host.name", "localhost"); - URL dir = Tomcat7Test.class.getResource("/adapter-test/demorealm.json"); - File base = new File(dir.getFile()).getParentFile(); - tomcat.addWebapp("/customer-portal", new File(base, "customer-portal").toString()); - tomcat.addWebapp("/customer-db", new File(base, "customer-db").toString()); - tomcat.addWebapp("/customer-db-error-page", new File(base, "customer-db-error-page").toString()); - tomcat.addWebapp("/product-portal", new File(base, "product-portal").toString()); - tomcat.addWebapp("/secure-portal", new File(base, "secure-portal").toString()); - tomcat.addWebapp("/session-portal", new File(base, "session-portal").toString()); - tomcat.addWebapp("/input-portal", new File(base, "input-portal").toString()); - - tomcat.start(); - //tomcat.getServer().await(); - } - - @AfterClass - public static void shutdownTomcat() throws Exception { - tomcat.stop(); - tomcat.destroy(); - } - - @Rule - public AdapterTestStrategy testStrategy = new AdapterTestStrategy("http://localhost:8081/auth", "http://localhost:8082", keycloakRule); - - @Test - public void testLoginSSOAndLogout() throws Exception { - testStrategy.testLoginSSOAndLogout(); - } - - @Test - public void testLoginEncodedRedirectUri() throws Exception { - testStrategy.testLoginEncodedRedirectUri(); - } - - - @Test - public void testSavedPostRequest() throws Exception { - testStrategy.testSavedPostRequest(); - } - - - @Test - public void testServletRequestLogout() throws Exception { - testStrategy.testServletRequestLogout(); - } - - @Test - public void testLoginSSOIdle() throws Exception { - testStrategy.testLoginSSOIdle(); - - } - - @Test - public void testLoginSSOIdleRemoveExpiredUserSessions() throws Exception { - testStrategy.testLoginSSOIdleRemoveExpiredUserSessions(); - } - - @Test - public void testLoginSSOMax() throws Exception { - testStrategy.testLoginSSOMax(); - } - - /** - * KEYCLOAK-518 - * @throws Exception - */ - @Test - public void testNullBearerToken() throws Exception { - testStrategy.testNullBearerToken(); - } - - /** - * KEYCLOAK-1368 - * @throws Exception - */ - @Test - public void testNullBearerTokenCustomErrorPage() throws Exception { - testStrategy.testNullBearerTokenCustomErrorPage(); - } - - - /** - * KEYCLOAK-518 - * @throws Exception - */ - @Test - public void testBadUser() throws Exception { - testStrategy.testBadUser(); - } - - /** - * KEYCLOAK-732 - * - * @throws Throwable - */ - @Test - public void testSingleSessionInvalidated() throws Throwable { - testStrategy.testSingleSessionInvalidated(); - } - - /** - * KEYCLOAK-741 - */ - @Test - public void testSessionInvalidatedAfterFailedRefresh() throws Throwable { - testStrategy.testSessionInvalidatedAfterFailedRefresh(); - - } - - /** - * KEYCLOAK-942 - */ - @Test - public void testAdminApplicationLogout() throws Throwable { - testStrategy.testAdminApplicationLogout(); - } - - /** - * KEYCLOAK-1216 - */ - @Test - public void testAccountManagementSessionsLogout() throws Throwable { - testStrategy.testAccountManagementSessionsLogout(); - } - - - private static String getBaseDirectory() { - String dirPath = null; - String relativeDirPath = "testsuite" + File.separator + "tomcat7" + File.separator + "target"; - - if (System.getProperties().containsKey("maven.home")) { - dirPath = System.getProperty("user.dir").replaceFirst("testsuite.tomcat7.*", Matcher.quoteReplacement(relativeDirPath)); - } else { - for (String c : System.getProperty("java.class.path").split(File.pathSeparator)) { - if (c.contains(File.separator + "testsuite" + File.separator + "tomcat7")) { - dirPath = c.replaceFirst("testsuite.tomcat7.*", Matcher.quoteReplacement(relativeDirPath)); - break; - } - } - } - - String absolutePath = new File(dirPath).getAbsolutePath(); - return absolutePath; - } - - - - -} diff --git a/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java b/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java deleted file mode 100755 index 5b1066c6a9..0000000000 --- a/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite; - -import org.apache.catalina.startup.Tomcat; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmModel; -import org.keycloak.services.managers.RealmManager; -import org.keycloak.testsuite.helper.adapter.SamlAdapterTestStrategy; -import org.keycloak.testsuite.rule.AbstractKeycloakRule; -import org.openqa.selenium.WebDriver; - -import java.io.File; -import java.net.URL; -import java.util.regex.Matcher; - -/** - * @author Stian Thorgersen - */ -public class TomcatSamlTest { - @Rule - public SamlAdapterTestStrategy testStrategy = new SamlAdapterTestStrategy("http://localhost:8081/auth", "http://localhost:8082", keycloakRule); - @ClassRule - public static AbstractKeycloakRule keycloakRule = new AbstractKeycloakRule() { - @Override - protected void configure(KeycloakSession session, RealmManager manager, RealmModel adminRealm) { - SamlAdapterTestStrategy.baseAdapterTestInitialization(session, manager, adminRealm, getClass()); - } - }; - - static Tomcat tomcat = null; - - @BeforeClass - public static void initTomcat() throws Exception { - tomcat = new Tomcat(); - String baseDir = getBaseDirectory(); - tomcat.setBaseDir(baseDir); - tomcat.setPort(8082); - - System.setProperty("app.server.base.url", "http://localhost:8082"); - System.setProperty("my.host.name", "localhost"); - URL dir = TomcatSamlTest.class.getResource("/keycloak-saml/testsaml.json"); - File base = new File(dir.getFile()).getParentFile(); - tomcat.addWebapp("/sales-post", new File(base, "simple-post").toString()); - tomcat.addWebapp("/sales-post-sig", new File(base, "signed-post").toString()); - tomcat.addWebapp("/sales-post-sig-email", new File(base, "signed-post-email").toString()); - tomcat.addWebapp("/sales-post-sig-transient", new File(base, "signed-post-transient").toString()); - tomcat.addWebapp("/sales-post-sig-persistent", new File(base, "signed-post-persistent").toString()); - tomcat.addWebapp("/sales-metadata", new File(base, "signed-metadata").toString()); - tomcat.addWebapp("/employee-sig", new File(base, "signed-get").toString()); - tomcat.addWebapp("/employee2", new File(base, "mappers").toString()); - tomcat.addWebapp("/employee-sig-front", new File(base, "signed-front-get").toString()); - tomcat.addWebapp("/bad-client-sales-post-sig", new File(base, "bad-client-signed-post").toString()); - tomcat.addWebapp("/bad-realm-sales-post-sig", new File(base, "bad-realm-signed-post").toString()); - tomcat.addWebapp("/sales-post-enc", new File(base, "encrypted-post").toString()); - tomcat.addWebapp("/sales-post2", new File(base, "simple-post2").toString()); - tomcat.addWebapp("/input-portal", new File(base, "simple-input").toString()); - SamlAdapterTestStrategy.uploadSP("http://localhost:8081/auth"); - - - tomcat.start(); - //tomcat.getServer().await(); - } - - @AfterClass - public static void shutdownTomcat() throws Exception { - tomcat.stop(); - tomcat.destroy(); - } - @Test - public void testSavedPostRequest() throws Exception { - testStrategy.testSavedPostRequest(); - } - @Test - public void testPostSimpleLoginLogoutIdpInitiatedRedirectTo() { - testStrategy.testPostSimpleLoginLogoutIdpInitiatedRedirectTo(); - } - - - @Test - public void testErrorHandlingSigned() throws Exception { - testStrategy.testErrorHandlingSigned(); - } - @Test - public void testErrorHandlingUnsigned() throws Exception { - testStrategy.testErrorHandlingUnsigned(); - } - - @Test - public void testPostSimpleLoginLogout() { - testStrategy.testPostSimpleLoginLogout(); - } - - @Test - public void testPostSimpleLoginLogoutIdpInitiated() { - testStrategy.testPostSimpleLoginLogoutIdpInitiated(); - } - - @Test - public void testPostSignedLoginLogout() { - testStrategy.testPostSignedLoginLogout(); - } - - @Test - public void testPostSignedLoginLogoutTransientNameID() { - testStrategy.testPostSignedLoginLogoutTransientNameID(); - } - - @Test - public void testPostSignedLoginLogoutPersistentNameID() { - testStrategy.testPostSignedLoginLogoutPersistentNameID(); - } - - @Test - public void testPostSignedLoginLogoutEmailNameID() { - testStrategy.testPostSignedLoginLogoutEmailNameID(); - } - - @Test - public void testAttributes() throws Exception { - testStrategy.testAttributes(); - } - - @Test - public void testRedirectSignedLoginLogout() { - testStrategy.testRedirectSignedLoginLogout(); - } - - @Test - public void testRedirectSignedLoginLogoutFrontNoSSO() { - testStrategy.testRedirectSignedLoginLogoutFrontNoSSO(); - } - - @Test - public void testRedirectSignedLoginLogoutFront() { - testStrategy.testRedirectSignedLoginLogoutFront(); - } - - @Test - public void testPostEncryptedLoginLogout() { - testStrategy.testPostEncryptedLoginLogout(); - } - - @Test - public void testPostBadClientSignature() { - testStrategy.testPostBadClientSignature(); - } - - @Test - public void testPostBadRealmSignature() { - testStrategy.testPostBadRealmSignature(); - } - - @Test - public void testPostSimpleUnauthorized() { - testStrategy.testPostSimpleUnauthorized( new SamlAdapterTestStrategy.CheckAuthError() { - @Override - public void check(WebDriver driver) { - Assert.assertTrue(driver.getPageSource().contains("forbidden")); - } - }); - } - - @Test - public void testMetadataPostSignedLoginLogout() throws Exception { - testStrategy.testMetadataPostSignedLoginLogout(); - } - - private static String getBaseDirectory() { - String dirPath = null; - String relativeDirPath = "testsuite" + File.separator + "tomcat7" + File.separator + "target"; - - if (System.getProperties().containsKey("maven.home")) { - dirPath = System.getProperty("user.dir").replaceFirst("testsuite.tomcat7.*", Matcher.quoteReplacement(relativeDirPath)); - } else { - for (String c : System.getProperty("java.class.path").split(File.pathSeparator)) { - if (c.contains(File.separator + "testsuite" + File.separator + "tomcat7")) { - dirPath = c.replaceFirst("testsuite.tomcat7.*", Matcher.quoteReplacement(relativeDirPath)); - break; - } - } - } - - String absolutePath = new File(dirPath).getAbsolutePath(); - return absolutePath; - } -} diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/customer-db-error-page/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/adapter-test/customer-db-error-page/META-INF/context.xml deleted file mode 100755 index ea344d662c..0000000000 --- a/testsuite/tomcat7/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/tomcat7/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/keycloak.json b/testsuite/tomcat7/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/keycloak.json deleted file mode 100755 index 38d1179399..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "customer-db", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url": "http://localhost:8081/auth", - "ssl-required" : "external", - "bearer-only" : true, - "enable-cors" : true - -} diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/web.xml deleted file mode 100755 index 8ab0cc4319..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/web.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.CustomerDatabaseServlet - - - Error Servlet - org.keycloak.testsuite.rule.ErrorServlet - - - - Servlet - /* - - - - Error Servlet - /error.html - - - - 400 - /error.html - - - - 401 - /error.html - - - - 403 - /error.html - - - - 500 - /error.html - - - - - Users - /* - - - user - - - - - Errors - /error.html - - - - - BASIC - demo - - /error.html - /error.html - - - - - admin - - - user - - diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/customer-db/WEB-INF/keycloak.json b/testsuite/tomcat7/src/test/resources/adapter-test/customer-db/WEB-INF/keycloak.json deleted file mode 100755 index 38d1179399..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/customer-db/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "customer-db", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url": "http://localhost:8081/auth", - "ssl-required" : "external", - "bearer-only" : true, - "enable-cors" : true - -} diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/customer-db/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/adapter-test/customer-db/WEB-INF/web.xml deleted file mode 100755 index 276a536958..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/customer-db/WEB-INF/web.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.CustomerDatabaseServlet - - - - Servlet - /* - - - - - Users - /* - - - user - - - - - BASIC - demo - - - - admin - - - user - - diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/customer-portal/WEB-INF/keycloak.json b/testsuite/tomcat7/src/test/resources/adapter-test/customer-portal/WEB-INF/keycloak.json deleted file mode 100755 index e9ad98722c..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/customer-portal/WEB-INF/keycloak.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "realm": "demo", - "resource": "customer-portal", - "realm-public-key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url": "http://localhost:8081/auth", - "ssl-required" : "external", - "expose-token": true, - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/customer-portal/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/adapter-test/customer-portal/WEB-INF/web.xml deleted file mode 100755 index c8b96bd514..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/customer-portal/WEB-INF/web.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.CustomerServlet - - - Error Servlet - org.keycloak.testsuite.rule.ErrorServlet - - - - Servlet - /* - - - - Error Servlet - /error.html - - - - - Users - /* - - - user - - - - - Errors - /error.html - - - - - BASIC - demo - - /error.html - /error.html - - - - - admin - - - user - - diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/demorealm.json b/testsuite/tomcat7/src/test/resources/adapter-test/demorealm.json deleted file mode 100755 index b0a8888c0f..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/demorealm.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "id": "demo", - "realm": "demo", - "enabled": true, - "accessTokenLifespan": 3000, - "accessCodeLifespan": 10, - "accessCodeLifespanUserAction": 6000, - "sslRequired": "external", - "registrationAllowed": false, - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "users" : [ - { - "username" : "bburke@redhat.com", - "enabled": true, - "email" : "bburke@redhat.com", - "firstName": "Bill", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user" ], - "applicationRoles": { - "account": [ "manage-account" ] - } - }, - { - "username" : "mposolda", - "enabled": true, - "email" : "mposolda@redhat.com", - "firstName": "Marek", - "lastName": "Posolda", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user" ], - "applicationRoles": { - "account": [ "manage-account" ] - } - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "User privileges" - }, - { - "name": "admin", - "description": "Administrator privileges" - } - ] - }, - "scopeMappings": [ - { - "client": "third-party", - "roles": ["user"] - }, - { - "client": "customer-portal", - "roles": ["user"] - }, - { - "client": "product-portal", - "roles": ["user"] - } - - ], - "applications": [ - { - "name": "customer-portal", - "enabled": true, - "adminUrl": "http://localhost:8082/customer-portal", - "baseUrl": "http://localhost:8082/customer-portal", - "directAccessGrantsEnabled": true, - "redirectUris": [ - "http://localhost:8082/customer-portal/*" - ], - "secret": "password" - }, - { - "name": "customer-cookie-portal", - "enabled": true, - "baseUrl": "http://localhost:8082/customer-cookie-portal", - "redirectUris": [ - "http://localhost:8082/customer-cookie-portal/*" - ], - "secret": "password" - }, - { - "name": "customer-portal-js", - "enabled": true, - "publicClient": true, - "adminUrl": "http://localhost:8082/customer-portal-js", - "baseUrl": "http://localhost:8082/customer-portal-js", - "redirectUris": [ - "http://localhost:8080/customer-portal-js/*" - ] - }, - { - "name": "customer-portal-cli", - "enabled": true, - "publicClient": true, - "redirectUris": [ - "urn:ietf:wg:oauth:2.0:oob", - "http://localhost" - ] - }, - { - "name": "product-portal", - "enabled": true, - "adminUrl": "http://localhost:8082/product-portal", - "baseUrl": "http://localhost:8082/product-portal", - "redirectUris": [ - "http://localhost:8082/product-portal/*" - ], - "secret": "password" - }, - { - "name": "secure-portal", - "enabled": true, - "adminUrl": "http://localhost:8082/secure-portal", - "baseUrl": "http://localhost:8082/secure-portal", - "redirectUris": [ - "http://localhost:8082/secure-portal/*" - ], - "secret": "password" - }, - { - "name": "session-portal", - "enabled": true, - "adminUrl": "http://localhost:8082/session-portal", - "baseUrl": "http://localhost:8082/session-portal", - "redirectUris": [ - "http://localhost:8082/session-portal/*" - ], - "secret": "password" - }, - { - "name": "input-portal", - "enabled": true, - "adminUrl": "http://localhost:8082/input-portal", - "baseUrl": "http://localhost:8082/input-portal", - "redirectUris": [ - "http://localhost:8082/input-portal/*" - ], - "secret": "password" - } - ], - "oauthClients": [ - { - "name": "third-party", - "enabled": true, - "redirectUris": [ - "http://localhost:8082/oauth-client/*", - "http://localhost:8082/oauth-client-cdi/*" - ], - "secret": "password" - } - ] -} diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/input-portal/WEB-INF/keycloak.json b/testsuite/tomcat7/src/test/resources/adapter-test/input-portal/WEB-INF/keycloak.json deleted file mode 100755 index 0b4b165302..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/input-portal/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "input-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://${my.host.name}:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/input-portal/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/adapter-test/input-portal/WEB-INF/web.xml deleted file mode 100755 index 1e54cccf6c..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/input-portal/WEB-INF/web.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.InputServlet - - - - Servlet - /* - - - - - Users - /secured/* - - - user - - - - - BASIC - demo - - - - admin - - - user - - diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/product-portal/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/adapter-test/product-portal/META-INF/context.xml deleted file mode 100755 index b4ddcce386..0000000000 --- a/testsuite/tomcat7/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/tomcat7/src/test/resources/adapter-test/product-portal/WEB-INF/keycloak.json b/testsuite/tomcat7/src/test/resources/adapter-test/product-portal/WEB-INF/keycloak.json deleted file mode 100755 index 3cfd478157..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/product-portal/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "product-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://localhost:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/product-portal/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/adapter-test/product-portal/WEB-INF/web.xml deleted file mode 100755 index aa59767433..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/product-portal/WEB-INF/web.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.ProductServlet - - - - Servlet - /* - - - - - Users - /* - - - user - - - - - BASIC - demo - - - - admin - - - user - - diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/secure-portal/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/adapter-test/secure-portal/META-INF/context.xml deleted file mode 100755 index b4ddcce386..0000000000 --- a/testsuite/tomcat7/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/tomcat7/src/test/resources/adapter-test/secure-portal/WEB-INF/keycloak.json b/testsuite/tomcat7/src/test/resources/adapter-test/secure-portal/WEB-INF/keycloak.json deleted file mode 100755 index dd38f249c2..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/secure-portal/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "secure-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://localhost:8080/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/secure-portal/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/adapter-test/secure-portal/WEB-INF/web.xml deleted file mode 100755 index 204305d344..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/secure-portal/WEB-INF/web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.CallAuthenticatedServlet - - - - Servlet - /* - - - - BASIC - demo - - - - admin - - - user - - diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/session-portal/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/adapter-test/session-portal/META-INF/context.xml deleted file mode 100755 index b4ddcce386..0000000000 --- a/testsuite/tomcat7/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/tomcat7/src/test/resources/adapter-test/session-portal/WEB-INF/keycloak.json b/testsuite/tomcat7/src/test/resources/adapter-test/session-portal/WEB-INF/keycloak.json deleted file mode 100755 index 6a7f60b45c..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/session-portal/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "session-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://${my.host.name}:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/adapter-test/session-portal/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/adapter-test/session-portal/WEB-INF/web.xml deleted file mode 100755 index a48e7d9a92..0000000000 --- a/testsuite/tomcat7/src/test/resources/adapter-test/session-portal/WEB-INF/web.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.SessionServlet - - - - Servlet - /* - - - - - Users - /* - - - user - - - - - BASIC - demo - - - - admin - - - user - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keycloak-saml.xml deleted file mode 100755 index a933bcb046..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keystore.jks b/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keystore.jks deleted file mode 100755 index 6a3e3ba7d3be934b1f0c2c80f2a3e638a3fcc73a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1739 zcmezO_TO6u1_mZ5W@IqPC@Cqh($~+)PfpCq$S*FjvM{hP)K5xG(M`_DOwB9NEl$iy zE!HgnO6eA7rt32>Fna1s?!F2%WS2n`(>4P>HZE;8MixdbCP79CL^0fB!0^ZoBE#s?YdggIu}v$_tBM#l2+{{vO53RX6!-pw0Sl;e9s> z`?8xa*2OK95{`1ZUd8?O(w~nkC$fd}b#3?R?74ngc4e*YyE<0U*5tj$9lPfre^9xZ zb6)E+hOcfbPw;VQOrL#bY2@eG$IoR-ieG;C>O_0vwM4#*>Gw@O|B24!+V+QYb*)%U zB5ThimUQ1cP8)WWn3pNsijZZ!?sInC?GNgTB7v<3lDZ$|t=oS1?DQSUN6dZ(I5=Fm zZ#w_iOA(ohr1wEgMK69BCH8&)q5V(V_;Q-cwt_&D2@fmMe~VAxkP>uPJnsAS$LXcd z=ChP2_}?m5%;)L5`B!H$Q&ru)Gl4CeJ{|dx`|VQt9cGoi{f36YlSI&b%=w^oJ!cj_@xt+1jjC<``-d4FQqkrDmGLH`lDiJ1KXOx;{P5b(#y8u! zOx(3TIBe;$-YokvY+1y%=Cv;v+X@&=3b*!|*zvG2ypfr8dddrhydrtIx$hbEA3Lb+ z^Ij0!18A%lE(cZrx zbW_PT3!&0bpUC4|cG>odu426Lv%c`iM(#r@C#M|wRi`<e#P2LW-C)Qzf4SK(cRsw`4gD_85vk3^h^ybfvk51O^mOAIGBkI zl(>Um8t}4lYPET^edlFl9WnmU3Il~ypiSrto7#bKE7+RW`8d*k( z^BTdp<_4Bglo{SQAK9(I{Kwqb%V5yh$<)}$Fm3khuh%Xp__aNnZ05!F^~5c|(>)dU zYy-5r?tkB=|Ech7=oE%_g#^i>g8c=b8pZ33b~}9y|0a;>6L`tdCX%Du-se_HbgyT-mgh$DHl|Q3;niKFe(5hFxFP+jrmip6(R2bM@;sFa5>rhEi7@xZ}jPU(bHK z-6QMr%C%uk(~z&N@k$Daz#z6RvxQ7*jeni>Yyt3<{550H@}1-*vsZ>QJqnjdJ>}CEocHxj|Ll;HHRit2<$bN| zODo?w+HHzcZ;Dtny{Mo&E}?A0rGxX`e%76{p8C<_lj%AWSFYxoLn|v;xE*rtMx6o| zek>`ex%tq->>45|Oa&%`i3W|oAt{0F6Poi4_zigtxFIP4YyxWR0;3ZtcFjzHv5TPr zUyQ8|+px~>f_5I;%rkov_sJS=*_T$l%fxK))w!)t^nS=3QrOOBbnI}nn?M$4X2Cnp zC8^Weo;@#eY_lo9>zx04&i{aeJ0@#8MoYw*1})cLxL{RqRL-&1nos9B;#HWKmT%Jg zYjVnN{-Wic{SuX)^NN3!?K9qHW-Y`RE+)t<+A{a6KCT#RkrVrQIOToQ#>IkF5$k1* z`KLc!y3EGhN;8G6{&h+J)#oNj+|TvA*(Elv3ooxsklgd^z`~`W!hX*`U;ew|ug49Y z+DYFSlb@CZFt%C`f|GqqQ-q)M$^t^B>=3@d!IlR|QT|V`mmF!Ooo}XR-bD`K; diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-realm-signed-post/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-realm-signed-post/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-realm-signed-post/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 6c0548ec6c..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keystore.jks b/testsuite/tomcat7/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keystore.jks deleted file mode 100755 index 215384cdef8f651b392ec1ce469adffdb9e4a521..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1715 zcmezO_TO6u1_mZ5W@OOMC@Cqh($~+)PfpCq$S*FjvM{hP)K5xG(Je|%%*oX)PRvOy z)-3?a=oV+D>oYJgdg`0JY6hCI)1ZlIs{tPymo^(C3!@g3AR{9y14|Rr!ngU6+@;2yEnn$CTh&C>rHT&=lxf7P=#(#EPPciy^NpNpfm&fy6 zyHq@QWgN7Quua3{_deg{5xT!T;gZa`ORyevO_>{(A?_lqLBk?tVwv zcw05^>a_ok{2o4|X}ww9d&8OTI&1rWOV}o*G;4YIABj?U{IX!F^}2T#k9r-Lx43t4 zQ}MGEKFMrHSIIbi`NFw8qTYK#;l|L+6G_!~Ze99NeR6}~B({al`YhKLe)`LEQRrFT zI??kV7ys(_Gp;rdEi+?(kYl*_{)B`XhP%wqZ|jP#(p9}*eJ-*oDJ$~t`8iuYbpKr8 z6ERK5=7)pJsncv*Ui>=Sy+-oq%Zeq3{C<3p>{zWB-*@PMv~;_~ehIyzqM#1~lg%nO zR3z>d&q_N!SG9DT%34*A@h*@U6*qn zHy^6Hte@wl)-yqsiJ6gs5!rdbKw}2Ft9#bDh1-g6C9hApR-N{BU2-$a@;~dg7G7KQ zQJ(SQaf$cVkLJ}o)C&BrQ}J_}Sd^S!pj9u%vFqgL#g4H*SOanK#kCk$R#$8fp=e2%%0nLGWF^C(9e+@>P#BW zdNL$zHF&ktAn>}*$#cAlQ?j&eY5qOdbG-`=RZ1|_=kVfH7Wht?MK{y+;BacmesiaSi9C`rL(tv zt7e>A!hGn3)+w - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - Error Servlet - org.keycloak.testsuite.rule.ErrorServlet - - - SendUsernameServlet - /* - - - - Error Servlet - /error.html - - - - 400 - /error.html - - - - 401 - /error.html - - - - 403 - /error.html - - - - 500 - /error.html - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 780843f80f..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keystore.jks b/testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keystore.jks deleted file mode 100755 index 822162ceafcff816168fc3f807f89fd92b3a5b50..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1707 zcmezO_TO6u1_mZ5W@J#!C@Cqh($~+)PfpCq$S*FjvM{hP&@WERNiEhb0P=NH^OE%$ z7#KYz6Cck2>fCM6#I)UjkBv*4jgf^>i%F1?k(Gg^iD_}UrK(uopPZv*t2wL8A259| zI`aN?JiEB@-|zCT62!dE<>@TxeEi#`qr%MakaWne8HuU8&Rf+!eJZ~A)@+%b=gTI3 z}t}Kh9&n=xJALY&1%rE5Xtj}?DT3ccM zzLjyk;p>IxtN$4~rTF4^4ps*5w|#qJs2RvHVwb2&4HHT}G6mX>j_ zB+o}SspL-?$AXY9wxY~mM~*v+D~M|>%H*l2iZEQN!al!g#~+h?y&1C}=&v$5_+O5# zR%d3~n;*41-+Z&%&i3i$*)(=Ral;#RLfz^&PQ6<Qk@kn?I8f zjIOE4xjuWt#>U7;qK%6d3)%2m14Fs+o7Q&E9j))cZvD$~6VY z`K(_`wXXQUxM_Mhr?CS~BYT&SjNF;a8)T1v<|-EnYKW znfn*>D>c8X3LLs5P1|ff&b-t-VNq&;?Vioj(ITpk3UflLeQh3Y6*TpjZ^9VuFHMb&eJmqcO-J4oF zbGD7s$43iWZ3{J-+7!AQT!5*bk%2Wr&(y#Y$hu+B#CQdWZJF4BsXJ^AhXF4er&gOs z+jm|@Ms8LH0|P@n106QzP!?uk;oH(zciJ^g^nW2f1fr(j^IIj_mYh+{=MTUuu z^O0Qz%xcVyy$lA8olK3547cC;aN0S}4X#t{Je7LzSJmIl-oix>zqec}-c+>ys(RVH z%*jd*@*R%6abo$sQfPD2n-yw*WGopk6&-$JdYffp?5A2WsirksU*>P)Yuy^;GoQJ7 z@}8NwKluez+rJxDUkvYCeEasf4VtEsceWo(l%IaPF2wP{WQH&M1AlD0;(AL+lZly; zff3nxz(8XLy31$n$L6n$@yBQXo_hZr(=E$&mcrE~rH(K5#ERZ8I&Z#b+bUs;BU`Pz zr8c>A&r6AWl)yGM&1vQb4o#I_oh|BOuXM~qyRWUTO*ItA>|5^}DX-3=CvY~Copog} z|N5DNGK~)=UHQ|pwxdD&?wy#ue6r zd2BP!>`mM!Yq(`!TJbIuv&C2Ewm#AOA#+G!JDbt5!_jU6S)7>#?>v{JPHTJiyvVW5 zru?pR{_i>e0}k$(tnC;r5oa2-Tz}z$Rl!j?$69MXo#%*GVPaaoN$;=8DZBZLmV5R~ zRC>-U{#CZmc$=BE5M#KQAhT%8+^_n$VvLhZT`uC}-UE*l?{^AlWvh6deKg5YY<{so z^Q;Vw9PO7U<@L_LnB4EW+5EY0g8J|5$c6=1gidY{vHttw(t18eyGrhp*H{h&Mm|5) z%XjibrSU~}U-!N`MaQ7}%Tf>4p1ZBL@64UmmXiN}_-uXncfFnNCXPLmB^?rPC~tmt e?8L6K8&o7B!`iO)afL5ud@^C)tPg?}*4Y3Vufd)G diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/mappers/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/mappers/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/mappers/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/mappers/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/mappers/WEB-INF/keycloak-saml.xml deleted file mode 100755 index e658934ba9..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/mappers/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/mappers/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/mappers/WEB-INF/web.xml deleted file mode 100755 index 8ef9d30dcb..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/mappers/WEB-INF/web.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - el-jefe - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - - user - - - employee - - - pee-on - - - hardcoded-role - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 5f19f5bef3..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keystore.jks b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keystore.jks deleted file mode 100755 index 4daad218a3f78b798d1de8996c39014785c45c95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1701 zcmezO_TO6u1_mZ5W@J##C@Cqh($~+)PfpCq$S*FjvM{hP&`-@R$jPrvP1P;VOxI^% zVDyw<_*fUHZ?{1c({=+sHZE;8MixdbCP79uyORg)YY z9JblVoe37#<8yv++uHrwMt(`Nphxp#7ED_>S+vq3A$V?CM$x=F8~<1CpSc$wm(+Hu zz411`BD+=kz1b=gKRL;#`#Nn7@#d5Jgp zyU+bqJSg}`^iOo zwxaAnwr1v=(`8HSvI0&q#(LVmKj`48_o=|ZF~sUz-)ZfXQ}aKUYj?g;S+jPLZ2MC8 zEpA)iUwZXc@|w-v(2Mr_Po{d<9q;Y+%6pbo7@Xb3k?m22G3?fY_3W4Vb!TZxJxyW#iOp z^Jx3d%gD&h%3z>psAHhT#vIDREKE!$F_07IH8e3aFf=!`G&VN1h!W>Df^kiaEuu&^ zuW>%Ii-6gTxv`hQps|ywv5{flH`fH4sGK&FZJD+Uo@ZwH{aw0pZ*tSun_+&BMB=y^ z-c2e|JryhF@lboSqNJ$VMAPivsn=Wtr>-(y5UJYq_2(w@J=?sZzH4Uv+~XE=KG0oV z%k6FBuhuEy8?;t$$hlZO_hNdxV@r%s!{Sv3y`=Sau5!A_d*%0qkdsYQ+P9rwz|X|Y z$iRr~JYaw^1Kp*x$!6m!!+N$2U59F>+Ehlq%vy6f=7g$ll>JAT@7R&GCYog$eH$nhLh>b-VWDfl~L?*gnZUEWO_nVto$@tppcqEGenE`Oq>; z4-w&0fssAYpz$|2zEk#1MRUFZzag&yHzdBnCLl$q1u#O*5D{u&Y-(&4g{c8wjI9pa zu+Hy-b{^ZzGkX*F$r^6imsY&X#BA}^xvfw1e#jhB*v@8j>~OT3Ko)0a!8^|-sngn? zJuh->vnjvpod0{y|A2!#CTlxJOT?K5E!SVTU{!Eb&au{-Pv<$}RhXETZ_@i~a>{Q0 zqUE0b5|y6wihq^uGu~!qEyNfuCde$>GWV-Kt{Bt!8Ol`uIwkVrY6hQMG0Vc--|c@> z_11Di$61H3Yb+f~Hfi3Uxw>}!`N=XhR-HG~JPhu~3%XW))cNBg+UGy3J|?IC()^$P zzJ;ylddv2%TfF-1tBtIV-#1IRPC2=Ef||6-p*3ssE@!Cj<9MC20gXI3Dk|qo%RL%nc;dRUo diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 6e76a0e7b4..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/WEB-INF/keystore.jks b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/WEB-INF/keystore.jks deleted file mode 100755 index 4daad218a3f78b798d1de8996c39014785c45c95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1701 zcmezO_TO6u1_mZ5W@J##C@Cqh($~+)PfpCq$S*FjvM{hP&`-@R$jPrvP1P;VOxI^% zVDyw<_*fUHZ?{1c({=+sHZE;8MixdbCP79uyORg)YY z9JblVoe37#<8yv++uHrwMt(`Nphxp#7ED_>S+vq3A$V?CM$x=F8~<1CpSc$wm(+Hu zz411`BD+=kz1b=gKRL;#`#Nn7@#d5Jgp zyU+bqJSg}`^iOo zwxaAnwr1v=(`8HSvI0&q#(LVmKj`48_o=|ZF~sUz-)ZfXQ}aKUYj?g;S+jPLZ2MC8 zEpA)iUwZXc@|w-v(2Mr_Po{d<9q;Y+%6pbo7@Xb3k?m22G3?fY_3W4Vb!TZxJxyW#iOp z^Jx3d%gD&h%3z>psAHhT#vIDREKE!$F_07IH8e3aFf=!`G&VN1h!W>Df^kiaEuu&^ zuW>%Ii-6gTxv`hQps|ywv5{flH`fH4sGK&FZJD+Uo@ZwH{aw0pZ*tSun_+&BMB=y^ z-c2e|JryhF@lboSqNJ$VMAPivsn=Wtr>-(y5UJYq_2(w@J=?sZzH4Uv+~XE=KG0oV z%k6FBuhuEy8?;t$$hlZO_hNdxV@r%s!{Sv3y`=Sau5!A_d*%0qkdsYQ+P9rwz|X|Y z$iRr~JYaw^1Kp*x$!6m!!+N$2U59F>+Ehlq%vy6f=7g$ll>JAT@7R&GCYog$eH$nhLh>b-VWDfl~L?*gnZUEWO_nVto$@tppcqEGenE`Oq>; z4-w&0fssAYpz$|2zEk#1MRUFZzag&yHzdBnCLl$q1u#O*5D{u&Y-(&4g{c8wjI9pa zu+Hy-b{^ZzGkX*F$r^6imsY&X#BA}^xvfw1e#jhB*v@8j>~OT3Ko)0a!8^|-sngn? zJuh->vnjvpod0{y|A2!#CTlxJOT?K5E!SVTU{!Eb&au{-Pv<$}RhXETZ_@i~a>{Q0 zqUE0b5|y6wihq^uGu~!qEyNfuCde$>GWV-Kt{Bt!8Ol`uIwkVrY6hQMG0Vc--|c@> z_11Di$61H3Yb+f~Hfi3Uxw>}!`N=XhR-HG~JPhu~3%XW))cNBg+UGy3J|?IC()^$P zzJ;ylddv2%TfF-1tBtIV-#1IRPC2=Ef||6-p*3ssE@!Cj<9MC20gXI3Dk|qo%RL%nc;dRUo diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/WEB-INF/web.xml deleted file mode 100755 index 40dd0070e8..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-get/WEB-INF/web.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - Error Servlet - org.keycloak.testsuite.rule.ErrorServlet - - - SendUsernameServlet - /* - - - - Error Servlet - /error.html - - - - 400 - /error.html - - - - 401 - /error.html - - - - 403 - /error.html - - - - 500 - /error.html - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 1f52f1cb42..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keystore.jks b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77683d1d0a3d29f8793471d4f395bdb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1705 zcmezO_TO6u1_mZ5W@J#!C@Cqh($~+)PfpCq$S*FjvM{hP&@WERNiEhb0P=N1M z7#KYz`B=UJb?!81V%loJ$Ht}2#>m2`#U#kc$jZRd#I(>@`_HHQr3*BE{x`hDyEHld z+K~ja7y5T|r=%}Fu;`1zi=v(re>&z=o_dkol)j+zYO>t=Qy1S}v3en%vP3563G;>m zf%$6H#y=LWo_E+v&g1u@xzTso16CaPbkO_D8o@;(`MobV^Igq3BNxZ5w|jA2W>>?O zsK)o5D^C2naN_4wlZOiFZx$ZYW2t4}JhWx=_GhgLGruICtx3+%d3V!9>Dt7nXAhlc z$;{X;mJr8NzU5%3ud}q*;Tc<&7_HRg&F#_Q?wWFKHOG|)@xdBe`K>+ek+V}K-){E) zl)cDAKzFrg_KD*rPhJ#0xY%188oeS%DBgct!6JRDwVn#urq)k%GX7O$-%BXGHp?M$ zPK(%~JsS=itGtnGNeXRIJS=enoqTH}>U?=&w0Rv-!V zt0IaI7=L{C`R*=P35_m^|6)DbnI1Rom?{^itz&v>PMs${YwWF4+mV{{ zB3p#_4CDJAHQ!e4#HZJ%dA%($R{WrMXd~~o9sJ4l4<@p_UZ&<;=%+j9w)>u?FXr2x z;Qi$;R(a*~n?JwFjfqj;bam5w#iu)2cStlBuRNH-DYCa*SFTj`Ruc2O%^{1v zS^p3Un$kT>@>nGEyG?KA#5`*A-Q)TDd5mCQN4nqL|I4L=R^IMCEM*}Xua~%r;rLwD z(rqehS=sAVMB2P;SIyh9w+fi%85vk3^h^ybfvg(_O^jE7*p`Wn(Np4IY>ELd8>d#A zN85K^Mn-N{1_J{_Jp&y!=1>-9Vd650ft)z6p^2e^p_!qPiHVVMlsK;ujB93K97TqS zjq{OR1z|$TGQU@sN$9wB)LN$MwU<2= zd)SlRE7$3UyG=O%*+B2uv-3&H4597J6WaBsZpb_&f7j)l$IXYTF6-xcsr5`yWnyMz zU_^EvFwmHR?&_X(ZsE4#TgmHFu2rXfU6s0)lCKe^<7iiUsaqK$zd9h>c57vO3iO-78%EoLL<8ZmZxNJeq&U-KBw5j(T{eI-t zj}(o0{2w&pRSxr|MK;+T;phADf{DX@d*|wohzX72{tZ3*&sbbC2N!KDDXF>n@KOsN z=~ICbKGC4@Hz>{}*<-lToNvHy$ZNn2iF2?C$Wdx)Vu&22rlzLAD8`N=&Wn#AY>fF{RdOu_iDQssmI(9hPO(2Uiv*4ZQlGJH!&z=`K zw%L^5bkqb1@@gO=+rT(BxQD(6^h&8PDm@hVJA%Qxx$H92KBf6;Q! zeu+xYdBwlV_8D(8vle0u7ZYR_ZJGO3A6Ja^r!9<;Jf^6B_V*`!pI4_%{2#46Qrcoa z{d4O3!wr>pceY+y88$ipliuM2X9G4KozS*BUZS)4a=%Gc^OV}R*}*rh8m{{;m0Oa) z^Ysn?xlP?KeF94gT3Fr`zuJ}MUVH6cw8xR2&A~UG*V~pyDQR4_ymoT_iPrx=pDW$^ gV7obl)$b?cUQd>i8HM*{tk@@=IXfvlri|w}0JG8182|tP diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keycloak-saml.xml deleted file mode 100755 index a53b44dc2f..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keystore.jks b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77683d1d0a3d29f8793471d4f395bdb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1705 zcmezO_TO6u1_mZ5W@J#!C@Cqh($~+)PfpCq$S*FjvM{hP&@WERNiEhb0P=N1M z7#KYz`B=UJb?!81V%loJ$Ht}2#>m2`#U#kc$jZRd#I(>@`_HHQr3*BE{x`hDyEHld z+K~ja7y5T|r=%}Fu;`1zi=v(re>&z=o_dkol)j+zYO>t=Qy1S}v3en%vP3563G;>m zf%$6H#y=LWo_E+v&g1u@xzTso16CaPbkO_D8o@;(`MobV^Igq3BNxZ5w|jA2W>>?O zsK)o5D^C2naN_4wlZOiFZx$ZYW2t4}JhWx=_GhgLGruICtx3+%d3V!9>Dt7nXAhlc z$;{X;mJr8NzU5%3ud}q*;Tc<&7_HRg&F#_Q?wWFKHOG|)@xdBe`K>+ek+V}K-){E) zl)cDAKzFrg_KD*rPhJ#0xY%188oeS%DBgct!6JRDwVn#urq)k%GX7O$-%BXGHp?M$ zPK(%~JsS=itGtnGNeXRIJS=enoqTH}>U?=&w0Rv-!V zt0IaI7=L{C`R*=P35_m^|6)DbnI1Rom?{^itz&v>PMs${YwWF4+mV{{ zB3p#_4CDJAHQ!e4#HZJ%dA%($R{WrMXd~~o9sJ4l4<@p_UZ&<;=%+j9w)>u?FXr2x z;Qi$;R(a*~n?JwFjfqj;bam5w#iu)2cStlBuRNH-DYCa*SFTj`Ruc2O%^{1v zS^p3Un$kT>@>nGEyG?KA#5`*A-Q)TDd5mCQN4nqL|I4L=R^IMCEM*}Xua~%r;rLwD z(rqehS=sAVMB2P;SIyh9w+fi%85vk3^h^ybfvg(_O^jE7*p`Wn(Np4IY>ELd8>d#A zN85K^Mn-N{1_J{_Jp&y!=1>-9Vd650ft)z6p^2e^p_!qPiHVVMlsK;ujB93K97TqS zjq{OR1z|$TGQU@sN$9wB)LN$MwU<2= zd)SlRE7$3UyG=O%*+B2uv-3&H4597J6WaBsZpb_&f7j)l$IXYTF6-xcsr5`yWnyMz zU_^EvFwmHR?&_X(ZsE4#TgmHFu2rXfU6s0)lCKe^<7iiUsaqK$zd9h>c57vO3iO-78%EoLL<8ZmZxNJeq&U-KBw5j(T{eI-t zj}(o0{2w&pRSxr|MK;+T;phADf{DX@d*|wohzX72{tZ3*&sbbC2N!KDDXF>n@KOsN z=~ICbKGC4@Hz>{}*<-lToNvHy$ZNn2iF2?C$Wdx)Vu&22rlzLAD8`N=&Wn#AY>fF{RdOu_iDQssmI(9hPO(2Uiv*4ZQlGJH!&z=`K zw%L^5bkqb1@@gO=+rT(BxQD(6^h&8PDm@hVJA%Qxx$H92KBf6;Q! zeu+xYdBwlV_8D(8vle0u7ZYR_ZJGO3A6Ja^r!9<;Jf^6B_V*`!pI4_%{2#46Qrcoa z{d4O3!wr>pceY+y88$ipliuM2X9G4KozS*BUZS)4a=%Gc^OV}R*}*rh8m{{;m0Oa) z^Ysn?xlP?KeF94gT3Fr`zuJ}MUVH6cw8xR2&A~UG*V~pyDQR4_ymoT_iPrx=pDW$^ gV7obl)$b?cUQd>i8HM*{tk@@=IXfvlri|w}0JG8182|tP diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keycloak-saml.xml deleted file mode 100755 index a4bf71bc2d..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keystore.jks b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77683d1d0a3d29f8793471d4f395bdb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1705 zcmezO_TO6u1_mZ5W@J#!C@Cqh($~+)PfpCq$S*FjvM{hP&@WERNiEhb0P=N1M z7#KYz`B=UJb?!81V%loJ$Ht}2#>m2`#U#kc$jZRd#I(>@`_HHQr3*BE{x`hDyEHld z+K~ja7y5T|r=%}Fu;`1zi=v(re>&z=o_dkol)j+zYO>t=Qy1S}v3en%vP3563G;>m zf%$6H#y=LWo_E+v&g1u@xzTso16CaPbkO_D8o@;(`MobV^Igq3BNxZ5w|jA2W>>?O zsK)o5D^C2naN_4wlZOiFZx$ZYW2t4}JhWx=_GhgLGruICtx3+%d3V!9>Dt7nXAhlc z$;{X;mJr8NzU5%3ud}q*;Tc<&7_HRg&F#_Q?wWFKHOG|)@xdBe`K>+ek+V}K-){E) zl)cDAKzFrg_KD*rPhJ#0xY%188oeS%DBgct!6JRDwVn#urq)k%GX7O$-%BXGHp?M$ zPK(%~JsS=itGtnGNeXRIJS=enoqTH}>U?=&w0Rv-!V zt0IaI7=L{C`R*=P35_m^|6)DbnI1Rom?{^itz&v>PMs${YwWF4+mV{{ zB3p#_4CDJAHQ!e4#HZJ%dA%($R{WrMXd~~o9sJ4l4<@p_UZ&<;=%+j9w)>u?FXr2x z;Qi$;R(a*~n?JwFjfqj;bam5w#iu)2cStlBuRNH-DYCa*SFTj`Ruc2O%^{1v zS^p3Un$kT>@>nGEyG?KA#5`*A-Q)TDd5mCQN4nqL|I4L=R^IMCEM*}Xua~%r;rLwD z(rqehS=sAVMB2P;SIyh9w+fi%85vk3^h^ybfvg(_O^jE7*p`Wn(Np4IY>ELd8>d#A zN85K^Mn-N{1_J{_Jp&y!=1>-9Vd650ft)z6p^2e^p_!qPiHVVMlsK;ujB93K97TqS zjq{OR1z|$TGQU@sN$9wB)LN$MwU<2= zd)SlRE7$3UyG=O%*+B2uv-3&H4597J6WaBsZpb_&f7j)l$IXYTF6-xcsr5`yWnyMz zU_^EvFwmHR?&_X(ZsE4#TgmHFu2rXfU6s0)lCKe^<7iiUsaqK$zd9h>c57vO3iO-78%EoLL<8ZmZxNJeq&U-KBw5j(T{eI-t zj}(o0{2w&pRSxr|MK;+T;phADf{DX@d*|wohzX72{tZ3*&sbbC2N!KDDXF>n@KOsN z=~ICbKGC4@Hz>{}*<-lToNvHy$ZNn2iF2?C$Wdx)Vu&22rlzLAD8`N=&Wn#AY>fF{RdOu_iDQssmI(9hPO(2Uiv*4ZQlGJH!&z=`K zw%L^5bkqb1@@gO=+rT(BxQD(6^h&8PDm@hVJA%Qxx$H92KBf6;Q! zeu+xYdBwlV_8D(8vle0u7ZYR_ZJGO3A6Ja^r!9<;Jf^6B_V*`!pI4_%{2#46Qrcoa z{d4O3!wr>pceY+y88$ipliuM2X9G4KozS*BUZS)4a=%Gc^OV}R*}*rh8m{{;m0Oa) z^Ysn?xlP?KeF94gT3Fr`zuJ}MUVH6cw8xR2&A~UG*V~pyDQR4_ymoT_iPrx=pDW$^ gV7obl)$b?cUQd>i8HM*{tk@@=IXfvlri|w}0JG8182|tP diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 8bf32fa61f..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keystore.jks b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77683d1d0a3d29f8793471d4f395bdb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1705 zcmezO_TO6u1_mZ5W@J#!C@Cqh($~+)PfpCq$S*FjvM{hP&@WERNiEhb0P=N1M z7#KYz`B=UJb?!81V%loJ$Ht}2#>m2`#U#kc$jZRd#I(>@`_HHQr3*BE{x`hDyEHld z+K~ja7y5T|r=%}Fu;`1zi=v(re>&z=o_dkol)j+zYO>t=Qy1S}v3en%vP3563G;>m zf%$6H#y=LWo_E+v&g1u@xzTso16CaPbkO_D8o@;(`MobV^Igq3BNxZ5w|jA2W>>?O zsK)o5D^C2naN_4wlZOiFZx$ZYW2t4}JhWx=_GhgLGruICtx3+%d3V!9>Dt7nXAhlc z$;{X;mJr8NzU5%3ud}q*;Tc<&7_HRg&F#_Q?wWFKHOG|)@xdBe`K>+ek+V}K-){E) zl)cDAKzFrg_KD*rPhJ#0xY%188oeS%DBgct!6JRDwVn#urq)k%GX7O$-%BXGHp?M$ zPK(%~JsS=itGtnGNeXRIJS=enoqTH}>U?=&w0Rv-!V zt0IaI7=L{C`R*=P35_m^|6)DbnI1Rom?{^itz&v>PMs${YwWF4+mV{{ zB3p#_4CDJAHQ!e4#HZJ%dA%($R{WrMXd~~o9sJ4l4<@p_UZ&<;=%+j9w)>u?FXr2x z;Qi$;R(a*~n?JwFjfqj;bam5w#iu)2cStlBuRNH-DYCa*SFTj`Ruc2O%^{1v zS^p3Un$kT>@>nGEyG?KA#5`*A-Q)TDd5mCQN4nqL|I4L=R^IMCEM*}Xua~%r;rLwD z(rqehS=sAVMB2P;SIyh9w+fi%85vk3^h^ybfvg(_O^jE7*p`Wn(Np4IY>ELd8>d#A zN85K^Mn-N{1_J{_Jp&y!=1>-9Vd650ft)z6p^2e^p_!qPiHVVMlsK;ujB93K97TqS zjq{OR1z|$TGQU@sN$9wB)LN$MwU<2= zd)SlRE7$3UyG=O%*+B2uv-3&H4597J6WaBsZpb_&f7j)l$IXYTF6-xcsr5`yWnyMz zU_^EvFwmHR?&_X(ZsE4#TgmHFu2rXfU6s0)lCKe^<7iiUsaqK$zd9h>c57vO3iO-78%EoLL<8ZmZxNJeq&U-KBw5j(T{eI-t zj}(o0{2w&pRSxr|MK;+T;phADf{DX@d*|wohzX72{tZ3*&sbbC2N!KDDXF>n@KOsN z=~ICbKGC4@Hz>{}*<-lToNvHy$ZNn2iF2?C$Wdx)Vu&22rlzLAD8`N=&Wn#AY>fF{RdOu_iDQssmI(9hPO(2Uiv*4ZQlGJH!&z=`K zw%L^5bkqb1@@gO=+rT(BxQD(6^h&8PDm@hVJA%Qxx$H92KBf6;Q! zeu+xYdBwlV_8D(8vle0u7ZYR_ZJGO3A6Ja^r!9<;Jf^6B_V*`!pI4_%{2#46Qrcoa z{d4O3!wr>pceY+y88$ipliuM2X9G4KozS*BUZS)4a=%Gc^OV}R*}*rh8m{{;m0Oa) z^Ysn?xlP?KeF94gT3Fr`zuJ}MUVH6cw8xR2&A~UG*V~pyDQR4_ymoT_iPrx=pDW$^ gV7obl)$b?cUQd>i8HM*{tk@@=IXfvlri|w}0JG8182|tP diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 0cae188229..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/WEB-INF/keystore.jks b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77683d1d0a3d29f8793471d4f395bdb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1705 zcmezO_TO6u1_mZ5W@J#!C@Cqh($~+)PfpCq$S*FjvM{hP&@WERNiEhb0P=N1M z7#KYz`B=UJb?!81V%loJ$Ht}2#>m2`#U#kc$jZRd#I(>@`_HHQr3*BE{x`hDyEHld z+K~ja7y5T|r=%}Fu;`1zi=v(re>&z=o_dkol)j+zYO>t=Qy1S}v3en%vP3563G;>m zf%$6H#y=LWo_E+v&g1u@xzTso16CaPbkO_D8o@;(`MobV^Igq3BNxZ5w|jA2W>>?O zsK)o5D^C2naN_4wlZOiFZx$ZYW2t4}JhWx=_GhgLGruICtx3+%d3V!9>Dt7nXAhlc z$;{X;mJr8NzU5%3ud}q*;Tc<&7_HRg&F#_Q?wWFKHOG|)@xdBe`K>+ek+V}K-){E) zl)cDAKzFrg_KD*rPhJ#0xY%188oeS%DBgct!6JRDwVn#urq)k%GX7O$-%BXGHp?M$ zPK(%~JsS=itGtnGNeXRIJS=enoqTH}>U?=&w0Rv-!V zt0IaI7=L{C`R*=P35_m^|6)DbnI1Rom?{^itz&v>PMs${YwWF4+mV{{ zB3p#_4CDJAHQ!e4#HZJ%dA%($R{WrMXd~~o9sJ4l4<@p_UZ&<;=%+j9w)>u?FXr2x z;Qi$;R(a*~n?JwFjfqj;bam5w#iu)2cStlBuRNH-DYCa*SFTj`Ruc2O%^{1v zS^p3Un$kT>@>nGEyG?KA#5`*A-Q)TDd5mCQN4nqL|I4L=R^IMCEM*}Xua~%r;rLwD z(rqehS=sAVMB2P;SIyh9w+fi%85vk3^h^ybfvg(_O^jE7*p`Wn(Np4IY>ELd8>d#A zN85K^Mn-N{1_J{_Jp&y!=1>-9Vd650ft)z6p^2e^p_!qPiHVVMlsK;ujB93K97TqS zjq{OR1z|$TGQU@sN$9wB)LN$MwU<2= zd)SlRE7$3UyG=O%*+B2uv-3&H4597J6WaBsZpb_&f7j)l$IXYTF6-xcsr5`yWnyMz zU_^EvFwmHR?&_X(ZsE4#TgmHFu2rXfU6s0)lCKe^<7iiUsaqK$zd9h>c57vO3iO-78%EoLL<8ZmZxNJeq&U-KBw5j(T{eI-t zj}(o0{2w&pRSxr|MK;+T;phADf{DX@d*|wohzX72{tZ3*&sbbC2N!KDDXF>n@KOsN z=~ICbKGC4@Hz>{}*<-lToNvHy$ZNn2iF2?C$Wdx)Vu&22rlzLAD8`N=&Wn#AY>fF{RdOu_iDQssmI(9hPO(2Uiv*4ZQlGJH!&z=`K zw%L^5bkqb1@@gO=+rT(BxQD(6^h&8PDm@hVJA%Qxx$H92KBf6;Q! zeu+xYdBwlV_8D(8vle0u7ZYR_ZJGO3A6Ja^r!9<;Jf^6B_V*`!pI4_%{2#46Qrcoa z{d4O3!wr>pceY+y88$ipliuM2X9G4KozS*BUZS)4a=%Gc^OV}R*}*rh8m{{;m0Oa) z^Ysn?xlP?KeF94gT3Fr`zuJ}MUVH6cw8xR2&A~UG*V~pyDQR4_ymoT_iPrx=pDW$^ gV7obl)$b?cUQd>i8HM*{tk@@=IXfvlri|w}0JG8182|tP diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/signed-post/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-input/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-input/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-input/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-input/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-input/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 8cf6d987e0..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-input/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-input/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-input/WEB-INF/web.xml deleted file mode 100755 index 86b6e6e696..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-input/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.adapter.servlet.InputServlet - - - SendUsernameServlet - /* - - - - - Users - /secured/* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 716be6779d..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post2/META-INF/context.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post2/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post2/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post2/WEB-INF/keycloak-saml.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post2/WEB-INF/keycloak-saml.xml deleted file mode 100755 index a09f312986..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post2/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post2/WEB-INF/web.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post2/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/simple-post2/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/sp-metadata.xml b/testsuite/tomcat7/src/test/resources/keycloak-saml/sp-metadata.xml deleted file mode 100755 index 853a6b2d41..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/sp-metadata.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - - - - - - - - MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw== - - - - - - - JBoss - JBoss by Red Hat - http://localhost:8080/sales-metadata/ - - - The - Admin - admin@mycompany.com - - - \ No newline at end of file diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/testsaml.json b/testsuite/tomcat7/src/test/resources/keycloak-saml/testsaml.json deleted file mode 100755 index 71cde711a7..0000000000 --- a/testsuite/tomcat7/src/test/resources/keycloak-saml/testsaml.json +++ /dev/null @@ -1,452 +0,0 @@ -{ - "id": "demo", - "realm": "demo", - "enabled": true, - "sslRequired": "external", - "registrationAllowed": true, - "resetPasswordAllowed": true, - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "defaultRoles": [ "user" ], - "smtpServer": { - "from": "auto@keycloak.org", - "host": "localhost", - "port":"3025" - }, - "users" : [ - { - "username" : "bburke", - "enabled": true, - "email" : "bburke@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "attributes" : { - "phone": "617" - }, - "realmRoles": ["manager", "user"], - "applicationRoles": { - "http://localhost:8082/employee/": [ "employee" ], - "http://localhost:8082/employee2/": [ "employee" ] - } - } , - { - "username" : "unauthorized", - "enabled": true, - "email" : "unauthorized@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ] - }, - { - "username" : "topGroupUser", - "enabled": true, - "email" : "top@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "groups": [ - "/top" - ] - }, - { - "username" : "level2GroupUser", - "enabled": true, - "email" : "level2@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "groups": [ - "/top/level2" - ] - } - ], - "applications": [ - { - "name": "http://localhost:8082/sales-post/", - "enabled": true, - "fullScopeAllowed": true, - "protocol": "saml", - "baseUrl": "http://localhost:8082/sales-post", - "redirectUris": [ - "http://localhost:8082/sales-post/*" - ], - "attributes": { - "saml.authnstatement": "true", - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/sales-post/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/sales-post/saml", - "saml_idp_initiated_sso_url_name": "sales-post" - } - }, - { - "name": "http://localhost:8082/sales-post2/", - "enabled": true, - "fullScopeAllowed": true, - "protocol": "saml", - "baseUrl": "http://localhost:8082/sales-post2", - "redirectUris": [ - "http://localhost:8082/sales-post2/*" - ], - "attributes": { - "saml.authnstatement": "true", - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post2/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post2/saml", - "saml_idp_initiated_sso_url_name": "sales-post2", - "saml_idp_initiated_sso_relay_state": "redirectTo=/foo" - } - }, - { - "name": "http://localhost:8082/input-portal/", - "enabled": true, - "fullScopeAllowed": true, - "protocol": "saml", - "baseUrl": "http://localhost:8082/input-portal/", - "redirectUris": [ - "http://localhost:8082/input-portal/*" - ], - "attributes": { - "saml.authnstatement": "true", - "saml_assertion_consumer_url_post": "http://localhost:8082/input-portal/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/input-portal/saml" - } - }, - { - "name": "http://localhost:8082/sales-post-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/sales-post-sig", - "redirectUris": [ - "http://localhost:8082/sales-post-sig/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post-sig/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/sales-post-sig/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post-sig/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/sales-post-sig/saml", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8082/sales-post-sig-transient/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/sales-post-sig-transient", - "adminUrl": "http://localhost:8082/sales-post-sig-transient/saml", - "redirectUris": [ - "http://localhost:8082/sales-post-sig-transient/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post-sig-transient/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/sales-post-sig-transient/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post-sig-transient/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/sales-post-sig-transient/saml", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8082/sales-post-sig-persistent/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/sales-post-sig-persistent", - "redirectUris": [ - "http://localhost:8082/sales-post-sig-persistent/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post-sig-persistent/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/sales-post-sig-persistent/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post-sig-persistent/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/sales-post-sig-persistent/saml", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8082/sales-post-sig-email/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/sales-post-sig-email", - "adminUrl": "http://localhost:8082/sales-post-sig-email/saml", - "redirectUris": [ - "http://localhost:8082/sales-post-sig-email/*" - ], - "attributes": { - "saml_force_name_id_format": "true", - "saml_name_id_format": "email", - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post-sig-email/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/sales-post-sig-email/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post-sig-email/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/sales-post-sig-email/saml", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8082/bad-realm-sales-post-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/bad-realm-sales-post-sig/", - "adminUrl": "http://localhost:8082/bad-realm-sales-post-sig/saml", - "redirectUris": [ - "http://localhost:8082/bad-realm-sales-post-sig/*" - ], - "attributes": { - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8082/bad-client-sales-post-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/bad-client-sales-post-sig/", - "adminUrl": "http://localhost:8082/bad-client-sales-post-sig/saml", - "redirectUris": [ - "http://localhost:8082/bad-client-sales-post-sig/*" - ], - "attributes": { - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGVacCDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1lbmMvMB4XDTE0MTAxNjE0MjA0NloXDTI0MTAxNjE0MjIyNlowMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3QtZW5jLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2+5MCT5BnVN+IYnKZcH6ev1pjXGi4feE0nOycq/VJ3aeaZMi4G9AxOxCBPupErOC7Kgm/Bw5AdJyw+Q12wSRXfJ9FhqCrLXpb7YOhbVSTJ8De5O8mW35DxAlh/cxe9FXjqPb286wKTUZ3LfGYR+X235UQeCTAPS/Ufi21EXaEikCAwEAATANBgkqhkiG9w0BAQsFAAOBgQBMrfGD9QFfx5v7ld/OAto5rjkTe3R1Qei8XRXfcs83vLaqEzjEtTuLGrJEi55kXuJgBpVmQpnwCCkkjSy0JxbqLDdVi9arfWUxEGmOr01ZHycELhDNaQcFqVMPr5kRHIHgktT8hK2IgCvd3Fy9/JCgUgCPxKfhwecyEOKxUc857g==" - } - }, - { - "name": "http://localhost:8082/sales-post-enc/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/sales-post-enc", - "redirectUris": [ - "http://localhost:8082/sales-post-enc/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post-enc/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/sales-post-enc/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post-enc/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/sales-post-enc/saml", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA512", - "saml.client.signature": "true", - "saml.encrypt": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGVacCDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1lbmMvMB4XDTE0MTAxNjE0MjA0NloXDTI0MTAxNjE0MjIyNlowMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3QtZW5jLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2+5MCT5BnVN+IYnKZcH6ev1pjXGi4feE0nOycq/VJ3aeaZMi4G9AxOxCBPupErOC7Kgm/Bw5AdJyw+Q12wSRXfJ9FhqCrLXpb7YOhbVSTJ8De5O8mW35DxAlh/cxe9FXjqPb286wKTUZ3LfGYR+X235UQeCTAPS/Ufi21EXaEikCAwEAATANBgkqhkiG9w0BAQsFAAOBgQBMrfGD9QFfx5v7ld/OAto5rjkTe3R1Qei8XRXfcs83vLaqEzjEtTuLGrJEi55kXuJgBpVmQpnwCCkkjSy0JxbqLDdVi9arfWUxEGmOr01ZHycELhDNaQcFqVMPr5kRHIHgktT8hK2IgCvd3Fy9/JCgUgCPxKfhwecyEOKxUc857g==", - "saml.encryption.certificate": "MIIB1DCCAT0CBgFJGVacCDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1lbmMvMB4XDTE0MTAxNjE0MjA0NloXDTI0MTAxNjE0MjIyNlowMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3QtZW5jLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2+5MCT5BnVN+IYnKZcH6ev1pjXGi4feE0nOycq/VJ3aeaZMi4G9AxOxCBPupErOC7Kgm/Bw5AdJyw+Q12wSRXfJ9FhqCrLXpb7YOhbVSTJ8De5O8mW35DxAlh/cxe9FXjqPb286wKTUZ3LfGYR+X235UQeCTAPS/Ufi21EXaEikCAwEAATANBgkqhkiG9w0BAQsFAAOBgQBMrfGD9QFfx5v7ld/OAto5rjkTe3R1Qei8XRXfcs83vLaqEzjEtTuLGrJEi55kXuJgBpVmQpnwCCkkjSy0JxbqLDdVi9arfWUxEGmOr01ZHycELhDNaQcFqVMPr5kRHIHgktT8hK2IgCvd3Fy9/JCgUgCPxKfhwecyEOKxUc857g==" - } - }, - { - "name": "http://localhost:8082/employee-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/employee-sig", - "redirectUris": [ - "http://localhost:8082/employee-sig/*" - ], - "adminUrl": "http://localhost:8082/employee-sig/saml", - "attributes": { - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB0DCCATkCBgFJH5u0EDANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNodHRwOi8vbG9jYWxob3N0OjgwODAvZW1wbG95ZWUtc2lnLzAeFw0xNDEwMTcxOTMzNThaFw0yNDEwMTcxOTM1MzhaMC4xLDAqBgNVBAMTI2h0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9lbXBsb3llZS1zaWcvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+9kVgPFpshjS2aT2g52lqTv2lqb1jgvXZVk7iFF4LAO6SdCXKXRZI4SuzIRkVNpE1a42V1kQRlaozoFklgvX5sje8tkpa9ylq+bxGXM9RRycqRu2B+oWUV7Aqq7Bs0Xud0WeHQYRcEoCjqsFKGy65qkLRDdT70FTJgpSHts+gDwIDAQABMA0GCSqGSIb3DQEBCwUAA4GBACKyPLGqMX8GsIrCfJU8eVnpaqzTXMglLVo/nTcfAnWe9UAdVe8N3a2PXpDBvuqNA/DEAhVcQgxdlOTWnB6s8/yLTRuH0bZgb3qGdySif+lU+E7zZ/SiDzavAvn+ABqemnzHcHyhYO+hNRGHvUbW5OAii9Vdjhm8BI32YF1NwhKp" - } - }, - { - "name": "http://localhost:8082/employee/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/employee/", - "redirectUris": [ - "http://localhost:8082/employee/*" - ], - "adminUrl": "http://localhost:8082/employee/saml", - "attributes": { - "saml.authnstatement": "true" - }, - "protocolMappers": [ - { - "name": "email", - "protocol": "saml", - "protocolMapper": "saml-user-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "email", - "friendly.name": "email", - "attribute.name": "urn:oid:1.2.840.113549.1.9.1", - "attribute.nameformat": "URI Reference" - } - }, - { - "name": "phone", - "protocol": "saml", - "protocolMapper": "saml-user-attribute-mapper", - "consentRequired": false, - "config": { - "user.attribute": "phone", - "attribute.name": "phone", - "attribute.nameformat": "Basic" - } - }, - { - "name": "role-list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "consentRequired": false, - "config": { - "attribute.name": "Role", - "attribute.nameformat": "Basic", - "single": "false" - } - } - ] - }, - { - "name": "http://localhost:8082/employee2/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/employee2/", - "redirectUris": [ - "http://localhost:8082/employee2/*" - ], - "adminUrl": "http://localhost:8082/employee2/saml", - "attributes": { - "saml.authnstatement": "true" - }, - "protocolMappers": [ - { - "name": "email", - "protocol": "saml", - "protocolMapper": "saml-user-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "email", - "friendly.name": "email", - "attribute.name": "urn:oid:1.2.840.113549.1.9.1", - "attribute.nameformat": "URI Reference" - } - }, - { - "name": "phone", - "protocol": "saml", - "protocolMapper": "saml-user-attribute-mapper", - "consentRequired": false, - "config": { - "user.attribute": "phone", - "attribute.name": "phone", - "attribute.nameformat": "Basic" - } - }, - { - "name": "role-list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "consentRequired": false, - "config": { - "attribute.name": "Role", - "attribute.nameformat": "Basic", - "single": "false" - } - } - ] - }, - { - "name": "http://localhost:8082/employee-sig-front/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "frontchannelLogout": true, - "baseUrl": "http://localhost:8082/employee-sig-front/", - "redirectUris": [ - "http://localhost:8082/employee-sig-front/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8082/employee-sig-front/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/employee-sig-front/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/employee-sig-front/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/employee-sig-front/saml", - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.signature.algorithm": "RSA_SHA1", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB0DCCATkCBgFJH5u0EDANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNodHRwOi8vbG9jYWxob3N0OjgwODAvZW1wbG95ZWUtc2lnLzAeFw0xNDEwMTcxOTMzNThaFw0yNDEwMTcxOTM1MzhaMC4xLDAqBgNVBAMTI2h0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9lbXBsb3llZS1zaWcvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+9kVgPFpshjS2aT2g52lqTv2lqb1jgvXZVk7iFF4LAO6SdCXKXRZI4SuzIRkVNpE1a42V1kQRlaozoFklgvX5sje8tkpa9ylq+bxGXM9RRycqRu2B+oWUV7Aqq7Bs0Xud0WeHQYRcEoCjqsFKGy65qkLRDdT70FTJgpSHts+gDwIDAQABMA0GCSqGSIb3DQEBCwUAA4GBACKyPLGqMX8GsIrCfJU8eVnpaqzTXMglLVo/nTcfAnWe9UAdVe8N3a2PXpDBvuqNA/DEAhVcQgxdlOTWnB6s8/yLTRuH0bZgb3qGdySif+lU+E7zZ/SiDzavAvn+ABqemnzHcHyhYO+hNRGHvUbW5OAii9Vdjhm8BI32YF1NwhKp" - } - } - ], - "groups" : [ - { - "name": "top", - "attributes": { - "topAttribute": ["true"] - - }, - "realmRoles": ["manager"], - "subGroups": [ - { - "name": "level2", - "realmRoles": ["user"], - "attributes": { - "level2Attribute": ["true"] - - } - } - ] - } - ], - "roles" : { - "realm" : [ - { - "name": "manager", - "description": "Have Manager privileges" - }, - { - "name": "user", - "description": "Have User privileges" - } - ], - "application" : { - "http://localhost:8082/employee/" : [ - { - "name": "employee", - "description": "Have Employee privileges" - } - ], - "http://localhost:8082/employee2/" : [ - { - "name": "employee", - "description": "Have Employee privileges" - } - ] - } - } -} diff --git a/testsuite/tomcat8/pom.xml b/testsuite/tomcat8/pom.xml deleted file mode 100755 index c3ccb3a932..0000000000 --- a/testsuite/tomcat8/pom.xml +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - keycloak-testsuite-pom - org.keycloak - 5.0.0-SNAPSHOT - ../pom.xml - - 4.0.0 - - keycloak-testsuite-tomcat8 - Keycloak Tomcat 8 Integration TestSuite - - 1.7 - 1.7 - - 8.0.14 - - - - - - org.keycloak - keycloak-dependencies-server-all - pom - - - org.keycloak - keycloak-admin-client - - - log4j - log4j - - - org.jboss.spec.javax.servlet - jboss-servlet-api_3.0_spec - - - org.jboss.spec.javax.ws.rs - jboss-jaxrs-api_2.1_spec - - - org.jboss.resteasy - resteasy-jaxrs - - - log4j - log4j - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-simple - - - - - org.keycloak - keycloak-saml-tomcat8-adapter - - - org.apache.tomcat - tomcat-servlet-api - - - org.apache.tomcat - tomcat-catalina - - - org.apache.tomcat - catalina - - - - - org.jboss.resteasy - resteasy-client - - - org.jboss.resteasy - resteasy-multipart-provider - - - org.jboss.resteasy - resteasy-jackson2-provider - - - org.jboss.resteasy - resteasy-undertow - - - com.google.zxing - javase - - - org.bouncycastle - bcprov-jdk15on - - - org.apache.httpcomponents - httpclient - - - org.keycloak - keycloak-ldap-federation - - - org.keycloak - keycloak-kerberos-federation - - - org.keycloak - keycloak-undertow-adapter - - - org.keycloak - keycloak-tomcat8-adapter - - - org.jboss.logging - jboss-logging - - - io.undertow - undertow-servlet - - - io.undertow - undertow-core - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.core - jackson-databind - - - com.fasterxml.jackson.core - jackson-annotations - - - junit - junit - - - org.hamcrest - hamcrest-all - - - com.h2database - h2 - - - com.icegreen - greenmail - - - org.slf4j - slf4j-api - - - - - org.infinispan - infinispan-core - - - org.seleniumhq.selenium - selenium-java - - - xml-apis - xml-apis - - - org.seleniumhq.selenium - selenium-chrome-driver - - - org.keycloak - keycloak-testsuite-integration-deprecated - test - - - org.keycloak - keycloak-testsuite-integration-deprecated - test-jar - test - - - org.keycloak.testsuite - integration-arquillian-test-apps-servlets - ${project.version} - test - - - - org.apache.tomcat - tomcat-catalina - ${tomcat.version} - - - org.apache.tomcat - tomcat-util - ${tomcat.version} - - - org.apache.tomcat.embed - tomcat-embed-core - ${tomcat.version} - - - - - io.undertow.jastow - jastow - 2.0.0.Final - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - test-jar - - - - - - org.codehaus.mojo - exec-maven-plugin - - ${project.basedir} - - - - - - - - community - - - !product - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - - - keycloak-server - - - - org.codehaus.mojo - exec-maven-plugin - - org.keycloak.testsuite.KeycloakServer - - - - - - - mail-server - - - - org.codehaus.mojo - exec-maven-plugin - - org.keycloak.testsuite.MailServer - - - - - - - totp - - - - org.codehaus.mojo - exec-maven-plugin - - org.keycloak.testsuite.TotpGenerator - - - - - - - - jpa - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - jpa - jpa - jpa - - - - - - - - - - - - keycloak.connectionsJpa.driver - com.mysql.jdbc.Driver - - - mysql - - - mysql - mysql-connector-java - ${mysql.version} - - - - - - - - - keycloak.connectionsJpa.driver - org.postgresql.Driver - - - postgresql - - - org.postgresql - postgresql - ${postgresql.version} - - - - - - clean-jpa - - - - org.liquibase - liquibase-maven-plugin - - META-INF/jpa-changelog-master.xml - - ${keycloak.connectionsJpa.url} - ${keycloak.connectionsJpa.driver} - ${keycloak.connectionsJpa.user} - ${keycloak.connectionsJpa.password} - - false - - - - clean-jpa - clean - - dropAll - - - - - - - - - diff --git a/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java b/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java deleted file mode 100755 index 1324c14cf5..0000000000 --- a/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite; - -import org.apache.catalina.startup.Tomcat; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmModel; -import org.keycloak.services.managers.RealmManager; -import org.keycloak.testsuite.helper.adapter.SamlAdapterTestStrategy; -import org.keycloak.testsuite.rule.AbstractKeycloakRule; -import org.openqa.selenium.WebDriver; - -import java.io.File; -import java.net.URL; - -/** - * @author Stian Thorgersen - */ -public class TomcatSamlTest { - @ClassRule - public static AbstractKeycloakRule keycloakRule = new AbstractKeycloakRule() { - @Override - protected void configure(KeycloakSession session, RealmManager manager, RealmModel adminRealm) { - SamlAdapterTestStrategy.baseAdapterTestInitialization(session, manager, adminRealm, getClass()); - } - }; - - static Tomcat tomcat = null; - - @BeforeClass - public static void initTomcat() throws Exception { - tomcat = new Tomcat(); - String baseDir = TomcatTest.getBaseDirectory(); - tomcat.setBaseDir(baseDir); - tomcat.setPort(8082); - - System.setProperty("app.server.base.url", "http://localhost:8082"); - System.setProperty("my.host.name", "localhost"); - URL dir = TomcatSamlTest.class.getResource("/keycloak-saml/testsaml.json"); - File base = new File(dir.getFile()).getParentFile(); - tomcat.addWebapp("/sales-post", new File(base, "simple-post").toString()); - tomcat.addWebapp("/sales-post2", new File(base, "simple-post2").toString()); - tomcat.addWebapp("/input-portal", new File(base, "simple-input").toString()); - tomcat.addWebapp("/sales-post-sig", new File(base, "signed-post").toString()); - tomcat.addWebapp("/sales-post-sig-email", new File(base, "signed-post-email").toString()); - tomcat.addWebapp("/sales-post-sig-transient", new File(base, "signed-post-transient").toString()); - tomcat.addWebapp("/sales-post-sig-persistent", new File(base, "signed-post-persistent").toString()); - tomcat.addWebapp("/sales-metadata", new File(base, "signed-metadata").toString()); - tomcat.addWebapp("/employee-sig", new File(base, "signed-get").toString()); - tomcat.addWebapp("/employee2", new File(base, "mappers").toString()); - tomcat.addWebapp("/employee-sig-front", new File(base, "signed-front-get").toString()); - tomcat.addWebapp("/bad-client-sales-post-sig", new File(base, "bad-client-signed-post").toString()); - tomcat.addWebapp("/bad-realm-sales-post-sig", new File(base, "bad-realm-signed-post").toString()); - tomcat.addWebapp("/sales-post-enc", new File(base, "encrypted-post").toString()); - SamlAdapterTestStrategy.uploadSP("http://localhost:8081/auth"); - - - tomcat.start(); - //tomcat.getServer().await(); - } - - @AfterClass - public static void shutdownTomcat() throws Exception { - tomcat.stop(); - tomcat.destroy(); - } - - @Rule - public SamlAdapterTestStrategy testStrategy = new SamlAdapterTestStrategy("http://localhost:8081/auth", "http://localhost:8082", keycloakRule); - - @Test - public void testSavedPostRequest() throws Exception { - testStrategy.testSavedPostRequest(); - } - @Test - public void testPostSimpleLoginLogoutIdpInitiatedRedirectTo() { - testStrategy.testPostSimpleLoginLogoutIdpInitiatedRedirectTo(); - } - - - @Test - public void testErrorHandlingSigned() throws Exception { - testStrategy.testErrorHandlingSigned(); - } - @Test - public void testErrorHandlingUnsigned() throws Exception { - testStrategy.testErrorHandlingUnsigned(); - } - - @Test - public void testPostSimpleLoginLogout() { - testStrategy.testPostSimpleLoginLogout(); - } - - @Test - public void testPostSimpleLoginLogoutIdpInitiated() { - testStrategy.testPostSimpleLoginLogoutIdpInitiated(); - } - - @Test - public void testPostSignedLoginLogout() { - testStrategy.testPostSignedLoginLogout(); - } - - @Test - public void testPostSignedLoginLogoutTransientNameID() { - testStrategy.testPostSignedLoginLogoutTransientNameID(); - } - - @Test - public void testPostSignedLoginLogoutPersistentNameID() { - testStrategy.testPostSignedLoginLogoutPersistentNameID(); - } - - @Test - public void testPostSignedLoginLogoutEmailNameID() { - testStrategy.testPostSignedLoginLogoutEmailNameID(); - } - - @Test - public void testAttributes() throws Exception { - testStrategy.testAttributes(); - } - - @Test - public void testRedirectSignedLoginLogout() { - testStrategy.testRedirectSignedLoginLogout(); - } - - @Test - public void testRedirectSignedLoginLogoutFrontNoSSO() { - testStrategy.testRedirectSignedLoginLogoutFrontNoSSO(); - } - - @Test - public void testRedirectSignedLoginLogoutFront() { - testStrategy.testRedirectSignedLoginLogoutFront(); - } - - @Test - public void testPostEncryptedLoginLogout() { - testStrategy.testPostEncryptedLoginLogout(); - } - - @Test - public void testPostBadClientSignature() { - testStrategy.testPostBadClientSignature(); - } - - @Test - public void testPostBadRealmSignature() { - testStrategy.testPostBadRealmSignature(); - } - - @Test - public void testPostSimpleUnauthorized() { - testStrategy.testPostSimpleUnauthorized( new SamlAdapterTestStrategy.CheckAuthError() { - @Override - public void check(WebDriver driver) { - Assert.assertTrue(driver.getPageSource().contains("forbidden")); - } - }); - } - - @Test - public void testMetadataPostSignedLoginLogout() throws Exception { - testStrategy.testMetadataPostSignedLoginLogout(); - } - -} diff --git a/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatTest.java b/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatTest.java deleted file mode 100755 index f684fc2954..0000000000 --- a/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatTest.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite; - -import org.apache.catalina.startup.Tomcat; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmModel; -import org.keycloak.services.managers.RealmManager; -import org.keycloak.testsuite.helper.adapter.AdapterTestStrategy; -import org.keycloak.testsuite.rule.AbstractKeycloakRule; - -import java.io.File; -import java.net.URL; -import java.util.regex.Matcher; - -/** - * @author Stian Thorgersen - */ -public class TomcatTest { - @ClassRule - public static AbstractKeycloakRule keycloakRule = new AbstractKeycloakRule() { - @Override - protected void configure(KeycloakSession session, RealmManager manager, RealmModel adminRealm) { - AdapterTestStrategy.baseAdapterTestInitialization(session, manager, adminRealm, getClass()); - } - }; - - static Tomcat tomcat = null; - - @BeforeClass - public static void initTomcat() throws Exception { - tomcat = new Tomcat(); - String baseDir = getBaseDirectory(); - tomcat.setBaseDir(baseDir); - tomcat.setPort(8082); - - System.setProperty("app.server.base.url", "http://localhost:8082"); - System.setProperty("my.host.name", "localhost"); - URL dir = TomcatTest.class.getResource("/adapter-test/demorealm.json"); - File base = new File(dir.getFile()).getParentFile(); - tomcat.addWebapp("/customer-portal", new File(base, "customer-portal").toString()); - tomcat.addWebapp("/customer-db", new File(base, "customer-db").toString()); - tomcat.addWebapp("/customer-db-error-page", new File(base, "customer-db-error-page").toString()); - tomcat.addWebapp("/product-portal", new File(base, "product-portal").toString()); - tomcat.addWebapp("/secure-portal", new File(base, "secure-portal").toString()); - tomcat.addWebapp("/session-portal", new File(base, "session-portal").toString()); - tomcat.addWebapp("/input-portal", new File(base, "input-portal").toString()); - - tomcat.start(); - //tomcat.getServer().await(); - } - - @AfterClass - public static void shutdownTomcat() throws Exception { - tomcat.stop(); - tomcat.destroy(); - } - - @Rule - public AdapterTestStrategy testStrategy = new AdapterTestStrategy("http://localhost:8081/auth", "http://localhost:8082", keycloakRule); - - @Test - public void testLoginSSOAndLogout() throws Exception { - testStrategy.testLoginSSOAndLogout(); - } - - @Test - public void testLoginEncodedRedirectUri() throws Exception { - testStrategy.testLoginEncodedRedirectUri(); - } - - - @Test - public void testSavedPostRequest() throws Exception { - testStrategy.testSavedPostRequest(); - } - - - - @Test - public void testServletRequestLogout() throws Exception { - testStrategy.testServletRequestLogout(); - } - - @Test - public void testLoginSSOIdle() throws Exception { - testStrategy.testLoginSSOIdle(); - - } - - @Test - public void testLoginSSOIdleRemoveExpiredUserSessions() throws Exception { - testStrategy.testLoginSSOIdleRemoveExpiredUserSessions(); - } - - @Test - public void testLoginSSOMax() throws Exception { - testStrategy.testLoginSSOMax(); - } - - /** - * KEYCLOAK-518 - * @throws Exception - */ - @Test - public void testNullBearerToken() throws Exception { - testStrategy.testNullBearerToken(); - } - - /** - * KEYCLOAK-1368 - * @throws Exception - */ - @Test - public void testNullBearerTokenCustomErrorPage() throws Exception { - testStrategy.testNullBearerTokenCustomErrorPage(); - } - - /** - * KEYCLOAK-518 - * @throws Exception - */ - @Test - public void testBadUser() throws Exception { - testStrategy.testBadUser(); - } - - /** - * KEYCLOAK-732 - * - * @throws Throwable - */ - @Test - public void testSingleSessionInvalidated() throws Throwable { - testStrategy.testSingleSessionInvalidated(); - } - - /** - * KEYCLOAK-741 - */ - @Test - public void testSessionInvalidatedAfterFailedRefresh() throws Throwable { - testStrategy.testSessionInvalidatedAfterFailedRefresh(); - - } - - /** - * KEYCLOAK-942 - */ - @Test - public void testAdminApplicationLogout() throws Throwable { - testStrategy.testAdminApplicationLogout(); - } - - /** - * KEYCLOAK-1216 - */ - @Test - public void testAccountManagementSessionsLogout() throws Throwable { - testStrategy.testAccountManagementSessionsLogout(); - } - - public static String getBaseDirectory() { - String dirPath = null; - String relativeDirPath = "testsuite" + File.separator + "tomcat8" + File.separator + "target"; - - if (System.getProperties().containsKey("maven.home")) { - dirPath = System.getProperty("user.dir").replaceFirst("testsuite.tomcat8.*", Matcher.quoteReplacement(relativeDirPath)); - } else { - for (String c : System.getProperty("java.class.path").split(File.pathSeparator)) { - if (c.contains(File.separator + "testsuite" + File.separator + "tomcat8")) { - dirPath = c.replaceFirst("testsuite.tomcat8.*", Matcher.quoteReplacement(relativeDirPath)); - break; - } - } - } - - String absolutePath = new File(dirPath).getAbsolutePath(); - return absolutePath; - } - - - - -} diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/customer-db-error-page/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/adapter-test/customer-db-error-page/META-INF/context.xml deleted file mode 100755 index ea344d662c..0000000000 --- a/testsuite/tomcat8/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/tomcat8/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/keycloak.json b/testsuite/tomcat8/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/keycloak.json deleted file mode 100755 index 38d1179399..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "customer-db", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url": "http://localhost:8081/auth", - "ssl-required" : "external", - "bearer-only" : true, - "enable-cors" : true - -} diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/web.xml deleted file mode 100755 index 8ab0cc4319..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/customer-db-error-page/WEB-INF/web.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.CustomerDatabaseServlet - - - Error Servlet - org.keycloak.testsuite.rule.ErrorServlet - - - - Servlet - /* - - - - Error Servlet - /error.html - - - - 400 - /error.html - - - - 401 - /error.html - - - - 403 - /error.html - - - - 500 - /error.html - - - - - Users - /* - - - user - - - - - Errors - /error.html - - - - - BASIC - demo - - /error.html - /error.html - - - - - admin - - - user - - diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/customer-db/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/adapter-test/customer-db/META-INF/context.xml deleted file mode 100755 index b4ddcce386..0000000000 --- a/testsuite/tomcat8/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/tomcat8/src/test/resources/adapter-test/customer-db/WEB-INF/keycloak.json b/testsuite/tomcat8/src/test/resources/adapter-test/customer-db/WEB-INF/keycloak.json deleted file mode 100755 index 912fef2845..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/customer-db/WEB-INF/keycloak.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm" : "demo", - "resource" : "customer-db", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url": "http://localhost:8081/auth", - "ssl-required" : "external", - "bearer-only" : true, - "enable-cors" : true -} \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/customer-db/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/adapter-test/customer-db/WEB-INF/web.xml deleted file mode 100755 index 276a536958..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/customer-db/WEB-INF/web.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.CustomerDatabaseServlet - - - - Servlet - /* - - - - - Users - /* - - - user - - - - - BASIC - demo - - - - admin - - - user - - diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/customer-portal/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/adapter-test/customer-portal/META-INF/context.xml deleted file mode 100755 index b4ddcce386..0000000000 --- a/testsuite/tomcat8/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/tomcat8/src/test/resources/adapter-test/customer-portal/WEB-INF/keycloak.json b/testsuite/tomcat8/src/test/resources/adapter-test/customer-portal/WEB-INF/keycloak.json deleted file mode 100755 index e9ad98722c..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/customer-portal/WEB-INF/keycloak.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "realm": "demo", - "resource": "customer-portal", - "realm-public-key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url": "http://localhost:8081/auth", - "ssl-required" : "external", - "expose-token": true, - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/customer-portal/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/adapter-test/customer-portal/WEB-INF/web.xml deleted file mode 100755 index c8b96bd514..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/customer-portal/WEB-INF/web.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.CustomerServlet - - - Error Servlet - org.keycloak.testsuite.rule.ErrorServlet - - - - Servlet - /* - - - - Error Servlet - /error.html - - - - - Users - /* - - - user - - - - - Errors - /error.html - - - - - BASIC - demo - - /error.html - /error.html - - - - - admin - - - user - - diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/demorealm.json b/testsuite/tomcat8/src/test/resources/adapter-test/demorealm.json deleted file mode 100755 index b0a8888c0f..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/demorealm.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "id": "demo", - "realm": "demo", - "enabled": true, - "accessTokenLifespan": 3000, - "accessCodeLifespan": 10, - "accessCodeLifespanUserAction": 6000, - "sslRequired": "external", - "registrationAllowed": false, - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "users" : [ - { - "username" : "bburke@redhat.com", - "enabled": true, - "email" : "bburke@redhat.com", - "firstName": "Bill", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user" ], - "applicationRoles": { - "account": [ "manage-account" ] - } - }, - { - "username" : "mposolda", - "enabled": true, - "email" : "mposolda@redhat.com", - "firstName": "Marek", - "lastName": "Posolda", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user" ], - "applicationRoles": { - "account": [ "manage-account" ] - } - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "User privileges" - }, - { - "name": "admin", - "description": "Administrator privileges" - } - ] - }, - "scopeMappings": [ - { - "client": "third-party", - "roles": ["user"] - }, - { - "client": "customer-portal", - "roles": ["user"] - }, - { - "client": "product-portal", - "roles": ["user"] - } - - ], - "applications": [ - { - "name": "customer-portal", - "enabled": true, - "adminUrl": "http://localhost:8082/customer-portal", - "baseUrl": "http://localhost:8082/customer-portal", - "directAccessGrantsEnabled": true, - "redirectUris": [ - "http://localhost:8082/customer-portal/*" - ], - "secret": "password" - }, - { - "name": "customer-cookie-portal", - "enabled": true, - "baseUrl": "http://localhost:8082/customer-cookie-portal", - "redirectUris": [ - "http://localhost:8082/customer-cookie-portal/*" - ], - "secret": "password" - }, - { - "name": "customer-portal-js", - "enabled": true, - "publicClient": true, - "adminUrl": "http://localhost:8082/customer-portal-js", - "baseUrl": "http://localhost:8082/customer-portal-js", - "redirectUris": [ - "http://localhost:8080/customer-portal-js/*" - ] - }, - { - "name": "customer-portal-cli", - "enabled": true, - "publicClient": true, - "redirectUris": [ - "urn:ietf:wg:oauth:2.0:oob", - "http://localhost" - ] - }, - { - "name": "product-portal", - "enabled": true, - "adminUrl": "http://localhost:8082/product-portal", - "baseUrl": "http://localhost:8082/product-portal", - "redirectUris": [ - "http://localhost:8082/product-portal/*" - ], - "secret": "password" - }, - { - "name": "secure-portal", - "enabled": true, - "adminUrl": "http://localhost:8082/secure-portal", - "baseUrl": "http://localhost:8082/secure-portal", - "redirectUris": [ - "http://localhost:8082/secure-portal/*" - ], - "secret": "password" - }, - { - "name": "session-portal", - "enabled": true, - "adminUrl": "http://localhost:8082/session-portal", - "baseUrl": "http://localhost:8082/session-portal", - "redirectUris": [ - "http://localhost:8082/session-portal/*" - ], - "secret": "password" - }, - { - "name": "input-portal", - "enabled": true, - "adminUrl": "http://localhost:8082/input-portal", - "baseUrl": "http://localhost:8082/input-portal", - "redirectUris": [ - "http://localhost:8082/input-portal/*" - ], - "secret": "password" - } - ], - "oauthClients": [ - { - "name": "third-party", - "enabled": true, - "redirectUris": [ - "http://localhost:8082/oauth-client/*", - "http://localhost:8082/oauth-client-cdi/*" - ], - "secret": "password" - } - ] -} diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/input-portal/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/adapter-test/input-portal/META-INF/context.xml deleted file mode 100755 index b4ddcce386..0000000000 --- a/testsuite/tomcat8/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/tomcat8/src/test/resources/adapter-test/input-portal/WEB-INF/keycloak.json b/testsuite/tomcat8/src/test/resources/adapter-test/input-portal/WEB-INF/keycloak.json deleted file mode 100755 index 0b4b165302..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/input-portal/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "input-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://${my.host.name}:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/input-portal/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/adapter-test/input-portal/WEB-INF/web.xml deleted file mode 100755 index 1e54cccf6c..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/input-portal/WEB-INF/web.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.InputServlet - - - - Servlet - /* - - - - - Users - /secured/* - - - user - - - - - BASIC - demo - - - - admin - - - user - - diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/product-portal/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/adapter-test/product-portal/META-INF/context.xml deleted file mode 100755 index b4ddcce386..0000000000 --- a/testsuite/tomcat8/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/tomcat8/src/test/resources/adapter-test/product-portal/WEB-INF/keycloak.json b/testsuite/tomcat8/src/test/resources/adapter-test/product-portal/WEB-INF/keycloak.json deleted file mode 100755 index 3cfd478157..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/product-portal/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "product-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://localhost:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/product-portal/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/adapter-test/product-portal/WEB-INF/web.xml deleted file mode 100755 index aa59767433..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/product-portal/WEB-INF/web.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.ProductServlet - - - - Servlet - /* - - - - - Users - /* - - - user - - - - - BASIC - demo - - - - admin - - - user - - diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/secure-portal/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/adapter-test/secure-portal/META-INF/context.xml deleted file mode 100755 index b4ddcce386..0000000000 --- a/testsuite/tomcat8/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/tomcat8/src/test/resources/adapter-test/secure-portal/WEB-INF/keycloak.json b/testsuite/tomcat8/src/test/resources/adapter-test/secure-portal/WEB-INF/keycloak.json deleted file mode 100755 index dd38f249c2..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/secure-portal/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "secure-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://localhost:8080/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/secure-portal/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/adapter-test/secure-portal/WEB-INF/web.xml deleted file mode 100755 index 204305d344..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/secure-portal/WEB-INF/web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.CallAuthenticatedServlet - - - - Servlet - /* - - - - BASIC - demo - - - - admin - - - user - - diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/session-portal/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/adapter-test/session-portal/META-INF/context.xml deleted file mode 100755 index b4ddcce386..0000000000 --- a/testsuite/tomcat8/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/tomcat8/src/test/resources/adapter-test/session-portal/WEB-INF/keycloak.json b/testsuite/tomcat8/src/test/resources/adapter-test/session-portal/WEB-INF/keycloak.json deleted file mode 100755 index 6a7f60b45c..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/session-portal/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm" : "demo", - "resource" : "session-portal", - "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url" : "http://${my.host.name}:8081/auth", - "ssl-required" : "external", - "credentials" : { - "secret": "password" - } -} \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/adapter-test/session-portal/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/adapter-test/session-portal/WEB-INF/web.xml deleted file mode 100755 index a48e7d9a92..0000000000 --- a/testsuite/tomcat8/src/test/resources/adapter-test/session-portal/WEB-INF/web.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - adapter-test - - - Servlet - org.keycloak.testsuite.adapter.servlet.SessionServlet - - - - Servlet - /* - - - - - Users - /* - - - user - - - - - BASIC - demo - - - - admin - - - user - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keycloak-saml.xml deleted file mode 100755 index a933bcb046..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keystore.jks b/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/keystore.jks deleted file mode 100755 index 6a3e3ba7d3be934b1f0c2c80f2a3e638a3fcc73a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1739 zcmezO_TO6u1_mZ5W@IqPC@Cqh($~+)PfpCq$S*FjvM{hP)K5xG(M`_DOwB9NEl$iy zE!HgnO6eA7rt32>Fna1s?!F2%WS2n`(>4P>HZE;8MixdbCP79CL^0fB!0^ZoBE#s?YdggIu}v$_tBM#l2+{{vO53RX6!-pw0Sl;e9s> z`?8xa*2OK95{`1ZUd8?O(w~nkC$fd}b#3?R?74ngc4e*YyE<0U*5tj$9lPfre^9xZ zb6)E+hOcfbPw;VQOrL#bY2@eG$IoR-ieG;C>O_0vwM4#*>Gw@O|B24!+V+QYb*)%U zB5ThimUQ1cP8)WWn3pNsijZZ!?sInC?GNgTB7v<3lDZ$|t=oS1?DQSUN6dZ(I5=Fm zZ#w_iOA(ohr1wEgMK69BCH8&)q5V(V_;Q-cwt_&D2@fmMe~VAxkP>uPJnsAS$LXcd z=ChP2_}?m5%;)L5`B!H$Q&ru)Gl4CeJ{|dx`|VQt9cGoi{f36YlSI&b%=w^oJ!cj_@xt+1jjC<``-d4FQqkrDmGLH`lDiJ1KXOx;{P5b(#y8u! zOx(3TIBe;$-YokvY+1y%=Cv;v+X@&=3b*!|*zvG2ypfr8dddrhydrtIx$hbEA3Lb+ z^Ij0!18A%lE(cZrx zbW_PT3!&0bpUC4|cG>odu426Lv%c`iM(#r@C#M|wRi`<e#P2LW-C)Qzf4SK(cRsw`4gD_85vk3^h^ybfvk51O^mOAIGBkI zl(>Um8t}4lYPET^edlFl9WnmU3Il~ypiSrto7#bKE7+RW`8d*k( z^BTdp<_4Bglo{SQAK9(I{Kwqb%V5yh$<)}$Fm3khuh%Xp__aNnZ05!F^~5c|(>)dU zYy-5r?tkB=|Ech7=oE%_g#^i>g8c=b8pZ33b~}9y|0a;>6L`tdCX%Du-se_HbgyT-mgh$DHl|Q3;niKFe(5hFxFP+jrmip6(R2bM@;sFa5>rhEi7@xZ}jPU(bHK z-6QMr%C%uk(~z&N@k$Daz#z6RvxQ7*jeni>Yyt3<{550H@}1-*vsZ>QJqnjdJ>}CEocHxj|Ll;HHRit2<$bN| zODo?w+HHzcZ;Dtny{Mo&E}?A0rGxX`e%76{p8C<_lj%AWSFYxoLn|v;xE*rtMx6o| zek>`ex%tq->>45|Oa&%`i3W|oAt{0F6Poi4_zigtxFIP4YyxWR0;3ZtcFjzHv5TPr zUyQ8|+px~>f_5I;%rkov_sJS=*_T$l%fxK))w!)t^nS=3QrOOBbnI}nn?M$4X2Cnp zC8^Weo;@#eY_lo9>zx04&i{aeJ0@#8MoYw*1})cLxL{RqRL-&1nos9B;#HWKmT%Jg zYjVnN{-Wic{SuX)^NN3!?K9qHW-Y`RE+)t<+A{a6KCT#RkrVrQIOToQ#>IkF5$k1* z`KLc!y3EGhN;8G6{&h+J)#oNj+|TvA*(Elv3ooxsklgd^z`~`W!hX*`U;ew|ug49Y z+DYFSlb@CZFt%C`f|GqqQ-q)M$^t^B>=3@d!IlR|QT|V`mmF!Ooo}XR-bD`K; diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-client-signed-post/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-realm-signed-post/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-realm-signed-post/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-realm-signed-post/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 6c0548ec6c..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keystore.jks b/testsuite/tomcat8/src/test/resources/keycloak-saml/bad-realm-signed-post/WEB-INF/keystore.jks deleted file mode 100755 index 215384cdef8f651b392ec1ce469adffdb9e4a521..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1715 zcmezO_TO6u1_mZ5W@OOMC@Cqh($~+)PfpCq$S*FjvM{hP)K5xG(Je|%%*oX)PRvOy z)-3?a=oV+D>oYJgdg`0JY6hCI)1ZlIs{tPymo^(C3!@g3AR{9y14|Rr!ngU6+@;2yEnn$CTh&C>rHT&=lxf7P=#(#EPPciy^NpNpfm&fy6 zyHq@QWgN7Quua3{_deg{5xT!T;gZa`ORyevO_>{(A?_lqLBk?tVwv zcw05^>a_ok{2o4|X}ww9d&8OTI&1rWOV}o*G;4YIABj?U{IX!F^}2T#k9r-Lx43t4 zQ}MGEKFMrHSIIbi`NFw8qTYK#;l|L+6G_!~Ze99NeR6}~B({al`YhKLe)`LEQRrFT zI??kV7ys(_Gp;rdEi+?(kYl*_{)B`XhP%wqZ|jP#(p9}*eJ-*oDJ$~t`8iuYbpKr8 z6ERK5=7)pJsncv*Ui>=Sy+-oq%Zeq3{C<3p>{zWB-*@PMv~;_~ehIyzqM#1~lg%nO zR3z>d&q_N!SG9DT%34*A@h*@U6*qn zHy^6Hte@wl)-yqsiJ6gs5!rdbKw}2Ft9#bDh1-g6C9hApR-N{BU2-$a@;~dg7G7KQ zQJ(SQaf$cVkLJ}o)C&BrQ}J_}Sd^S!pj9u%vFqgL#g4H*SOanK#kCk$R#$8fp=e2%%0nLGWF^C(9e+@>P#BW zdNL$zHF&ktAn>}*$#cAlQ?j&eY5qOdbG-`=RZ1|_=kVfH7Wht?MK{y+;BacmesiaSi9C`rL(tv zt7e>A!hGn3)+w - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - Error Servlet - org.keycloak.testsuite.rule.ErrorServlet - - - SendUsernameServlet - /* - - - - Error Servlet - /error.html - - - - 400 - /error.html - - - - 401 - /error.html - - - - 403 - /error.html - - - - 500 - /error.html - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 780843f80f..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keystore.jks b/testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/keystore.jks deleted file mode 100755 index 822162ceafcff816168fc3f807f89fd92b3a5b50..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1707 zcmezO_TO6u1_mZ5W@J#!C@Cqh($~+)PfpCq$S*FjvM{hP&@WERNiEhb0P=NH^OE%$ z7#KYz6Cck2>fCM6#I)UjkBv*4jgf^>i%F1?k(Gg^iD_}UrK(uopPZv*t2wL8A259| zI`aN?JiEB@-|zCT62!dE<>@TxeEi#`qr%MakaWne8HuU8&Rf+!eJZ~A)@+%b=gTI3 z}t}Kh9&n=xJALY&1%rE5Xtj}?DT3ccM zzLjyk;p>IxtN$4~rTF4^4ps*5w|#qJs2RvHVwb2&4HHT}G6mX>j_ zB+o}SspL-?$AXY9wxY~mM~*v+D~M|>%H*l2iZEQN!al!g#~+h?y&1C}=&v$5_+O5# zR%d3~n;*41-+Z&%&i3i$*)(=Ral;#RLfz^&PQ6<Qk@kn?I8f zjIOE4xjuWt#>U7;qK%6d3)%2m14Fs+o7Q&E9j))cZvD$~6VY z`K(_`wXXQUxM_Mhr?CS~BYT&SjNF;a8)T1v<|-EnYKW znfn*>D>c8X3LLs5P1|ff&b-t-VNq&;?Vioj(ITpk3UflLeQh3Y6*TpjZ^9VuFHMb&eJmqcO-J4oF zbGD7s$43iWZ3{J-+7!AQT!5*bk%2Wr&(y#Y$hu+B#CQdWZJF4BsXJ^AhXF4er&gOs z+jm|@Ms8LH0|P@n106QzP!?uk;oH(zciJ^g^nW2f1fr(j^IIj_mYh+{=MTUuu z^O0Qz%xcVyy$lA8olK3547cC;aN0S}4X#t{Je7LzSJmIl-oix>zqec}-c+>ys(RVH z%*jd*@*R%6abo$sQfPD2n-yw*WGopk6&-$JdYffp?5A2WsirksU*>P)Yuy^;GoQJ7 z@}8NwKluez+rJxDUkvYCeEasf4VtEsceWo(l%IaPF2wP{WQH&M1AlD0;(AL+lZly; zff3nxz(8XLy31$n$L6n$@yBQXo_hZr(=E$&mcrE~rH(K5#ERZ8I&Z#b+bUs;BU`Pz zr8c>A&r6AWl)yGM&1vQb4o#I_oh|BOuXM~qyRWUTO*ItA>|5^}DX-3=CvY~Copog} z|N5DNGK~)=UHQ|pwxdD&?wy#ue6r zd2BP!>`mM!Yq(`!TJbIuv&C2Ewm#AOA#+G!JDbt5!_jU6S)7>#?>v{JPHTJiyvVW5 zru?pR{_i>e0}k$(tnC;r5oa2-Tz}z$Rl!j?$69MXo#%*GVPaaoN$;=8DZBZLmV5R~ zRC>-U{#CZmc$=BE5M#KQAhT%8+^_n$VvLhZT`uC}-UE*l?{^AlWvh6deKg5YY<{so z^Q;Vw9PO7U<@L_LnB4EW+5EY0g8J|5$c6=1gidY{vHttw(t18eyGrhp*H{h&Mm|5) z%XjibrSU~}U-!N`MaQ7}%Tf>4p1ZBL@64UmmXiN}_-uXncfFnNCXPLmB^?rPC~tmt e?8L6K8&o7B!`iO)afL5ud@^C)tPg?}*4Y3Vufd)G diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/encrypted-post/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/mappers/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/mappers/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/mappers/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/mappers/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/mappers/WEB-INF/keycloak-saml.xml deleted file mode 100755 index e658934ba9..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/mappers/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/mappers/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/mappers/WEB-INF/web.xml deleted file mode 100755 index 8ef9d30dcb..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/mappers/WEB-INF/web.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - el-jefe - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - - user - - - employee - - - pee-on - - - hardcoded-role - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 5f19f5bef3..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keystore.jks b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/keystore.jks deleted file mode 100755 index 4daad218a3f78b798d1de8996c39014785c45c95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1701 zcmezO_TO6u1_mZ5W@J##C@Cqh($~+)PfpCq$S*FjvM{hP&`-@R$jPrvP1P;VOxI^% zVDyw<_*fUHZ?{1c({=+sHZE;8MixdbCP79uyORg)YY z9JblVoe37#<8yv++uHrwMt(`Nphxp#7ED_>S+vq3A$V?CM$x=F8~<1CpSc$wm(+Hu zz411`BD+=kz1b=gKRL;#`#Nn7@#d5Jgp zyU+bqJSg}`^iOo zwxaAnwr1v=(`8HSvI0&q#(LVmKj`48_o=|ZF~sUz-)ZfXQ}aKUYj?g;S+jPLZ2MC8 zEpA)iUwZXc@|w-v(2Mr_Po{d<9q;Y+%6pbo7@Xb3k?m22G3?fY_3W4Vb!TZxJxyW#iOp z^Jx3d%gD&h%3z>psAHhT#vIDREKE!$F_07IH8e3aFf=!`G&VN1h!W>Df^kiaEuu&^ zuW>%Ii-6gTxv`hQps|ywv5{flH`fH4sGK&FZJD+Uo@ZwH{aw0pZ*tSun_+&BMB=y^ z-c2e|JryhF@lboSqNJ$VMAPivsn=Wtr>-(y5UJYq_2(w@J=?sZzH4Uv+~XE=KG0oV z%k6FBuhuEy8?;t$$hlZO_hNdxV@r%s!{Sv3y`=Sau5!A_d*%0qkdsYQ+P9rwz|X|Y z$iRr~JYaw^1Kp*x$!6m!!+N$2U59F>+Ehlq%vy6f=7g$ll>JAT@7R&GCYog$eH$nhLh>b-VWDfl~L?*gnZUEWO_nVto$@tppcqEGenE`Oq>; z4-w&0fssAYpz$|2zEk#1MRUFZzag&yHzdBnCLl$q1u#O*5D{u&Y-(&4g{c8wjI9pa zu+Hy-b{^ZzGkX*F$r^6imsY&X#BA}^xvfw1e#jhB*v@8j>~OT3Ko)0a!8^|-sngn? zJuh->vnjvpod0{y|A2!#CTlxJOT?K5E!SVTU{!Eb&au{-Pv<$}RhXETZ_@i~a>{Q0 zqUE0b5|y6wihq^uGu~!qEyNfuCde$>GWV-Kt{Bt!8Ol`uIwkVrY6hQMG0Vc--|c@> z_11Di$61H3Yb+f~Hfi3Uxw>}!`N=XhR-HG~JPhu~3%XW))cNBg+UGy3J|?IC()^$P zzJ;ylddv2%TfF-1tBtIV-#1IRPC2=Ef||6-p*3ssE@!Cj<9MC20gXI3Dk|qo%RL%nc;dRUo diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-front-get/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 6e76a0e7b4..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/WEB-INF/keystore.jks b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/WEB-INF/keystore.jks deleted file mode 100755 index 4daad218a3f78b798d1de8996c39014785c45c95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1701 zcmezO_TO6u1_mZ5W@J##C@Cqh($~+)PfpCq$S*FjvM{hP&`-@R$jPrvP1P;VOxI^% zVDyw<_*fUHZ?{1c({=+sHZE;8MixdbCP79uyORg)YY z9JblVoe37#<8yv++uHrwMt(`Nphxp#7ED_>S+vq3A$V?CM$x=F8~<1CpSc$wm(+Hu zz411`BD+=kz1b=gKRL;#`#Nn7@#d5Jgp zyU+bqJSg}`^iOo zwxaAnwr1v=(`8HSvI0&q#(LVmKj`48_o=|ZF~sUz-)ZfXQ}aKUYj?g;S+jPLZ2MC8 zEpA)iUwZXc@|w-v(2Mr_Po{d<9q;Y+%6pbo7@Xb3k?m22G3?fY_3W4Vb!TZxJxyW#iOp z^Jx3d%gD&h%3z>psAHhT#vIDREKE!$F_07IH8e3aFf=!`G&VN1h!W>Df^kiaEuu&^ zuW>%Ii-6gTxv`hQps|ywv5{flH`fH4sGK&FZJD+Uo@ZwH{aw0pZ*tSun_+&BMB=y^ z-c2e|JryhF@lboSqNJ$VMAPivsn=Wtr>-(y5UJYq_2(w@J=?sZzH4Uv+~XE=KG0oV z%k6FBuhuEy8?;t$$hlZO_hNdxV@r%s!{Sv3y`=Sau5!A_d*%0qkdsYQ+P9rwz|X|Y z$iRr~JYaw^1Kp*x$!6m!!+N$2U59F>+Ehlq%vy6f=7g$ll>JAT@7R&GCYog$eH$nhLh>b-VWDfl~L?*gnZUEWO_nVto$@tppcqEGenE`Oq>; z4-w&0fssAYpz$|2zEk#1MRUFZzag&yHzdBnCLl$q1u#O*5D{u&Y-(&4g{c8wjI9pa zu+Hy-b{^ZzGkX*F$r^6imsY&X#BA}^xvfw1e#jhB*v@8j>~OT3Ko)0a!8^|-sngn? zJuh->vnjvpod0{y|A2!#CTlxJOT?K5E!SVTU{!Eb&au{-Pv<$}RhXETZ_@i~a>{Q0 zqUE0b5|y6wihq^uGu~!qEyNfuCde$>GWV-Kt{Bt!8Ol`uIwkVrY6hQMG0Vc--|c@> z_11Di$61H3Yb+f~Hfi3Uxw>}!`N=XhR-HG~JPhu~3%XW))cNBg+UGy3J|?IC()^$P zzJ;ylddv2%TfF-1tBtIV-#1IRPC2=Ef||6-p*3ssE@!Cj<9MC20gXI3Dk|qo%RL%nc;dRUo diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/WEB-INF/web.xml deleted file mode 100755 index 40dd0070e8..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-get/WEB-INF/web.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - Error Servlet - org.keycloak.testsuite.rule.ErrorServlet - - - SendUsernameServlet - /* - - - - Error Servlet - /error.html - - - - 400 - /error.html - - - - 401 - /error.html - - - - 403 - /error.html - - - - 500 - /error.html - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 1f52f1cb42..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keystore.jks b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77683d1d0a3d29f8793471d4f395bdb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1705 zcmezO_TO6u1_mZ5W@J#!C@Cqh($~+)PfpCq$S*FjvM{hP&@WERNiEhb0P=N1M z7#KYz`B=UJb?!81V%loJ$Ht}2#>m2`#U#kc$jZRd#I(>@`_HHQr3*BE{x`hDyEHld z+K~ja7y5T|r=%}Fu;`1zi=v(re>&z=o_dkol)j+zYO>t=Qy1S}v3en%vP3563G;>m zf%$6H#y=LWo_E+v&g1u@xzTso16CaPbkO_D8o@;(`MobV^Igq3BNxZ5w|jA2W>>?O zsK)o5D^C2naN_4wlZOiFZx$ZYW2t4}JhWx=_GhgLGruICtx3+%d3V!9>Dt7nXAhlc z$;{X;mJr8NzU5%3ud}q*;Tc<&7_HRg&F#_Q?wWFKHOG|)@xdBe`K>+ek+V}K-){E) zl)cDAKzFrg_KD*rPhJ#0xY%188oeS%DBgct!6JRDwVn#urq)k%GX7O$-%BXGHp?M$ zPK(%~JsS=itGtnGNeXRIJS=enoqTH}>U?=&w0Rv-!V zt0IaI7=L{C`R*=P35_m^|6)DbnI1Rom?{^itz&v>PMs${YwWF4+mV{{ zB3p#_4CDJAHQ!e4#HZJ%dA%($R{WrMXd~~o9sJ4l4<@p_UZ&<;=%+j9w)>u?FXr2x z;Qi$;R(a*~n?JwFjfqj;bam5w#iu)2cStlBuRNH-DYCa*SFTj`Ruc2O%^{1v zS^p3Un$kT>@>nGEyG?KA#5`*A-Q)TDd5mCQN4nqL|I4L=R^IMCEM*}Xua~%r;rLwD z(rqehS=sAVMB2P;SIyh9w+fi%85vk3^h^ybfvg(_O^jE7*p`Wn(Np4IY>ELd8>d#A zN85K^Mn-N{1_J{_Jp&y!=1>-9Vd650ft)z6p^2e^p_!qPiHVVMlsK;ujB93K97TqS zjq{OR1z|$TGQU@sN$9wB)LN$MwU<2= zd)SlRE7$3UyG=O%*+B2uv-3&H4597J6WaBsZpb_&f7j)l$IXYTF6-xcsr5`yWnyMz zU_^EvFwmHR?&_X(ZsE4#TgmHFu2rXfU6s0)lCKe^<7iiUsaqK$zd9h>c57vO3iO-78%EoLL<8ZmZxNJeq&U-KBw5j(T{eI-t zj}(o0{2w&pRSxr|MK;+T;phADf{DX@d*|wohzX72{tZ3*&sbbC2N!KDDXF>n@KOsN z=~ICbKGC4@Hz>{}*<-lToNvHy$ZNn2iF2?C$Wdx)Vu&22rlzLAD8`N=&Wn#AY>fF{RdOu_iDQssmI(9hPO(2Uiv*4ZQlGJH!&z=`K zw%L^5bkqb1@@gO=+rT(BxQD(6^h&8PDm@hVJA%Qxx$H92KBf6;Q! zeu+xYdBwlV_8D(8vle0u7ZYR_ZJGO3A6Ja^r!9<;Jf^6B_V*`!pI4_%{2#46Qrcoa z{d4O3!wr>pceY+y88$ipliuM2X9G4KozS*BUZS)4a=%Gc^OV}R*}*rh8m{{;m0Oa) z^Ysn?xlP?KeF94gT3Fr`zuJ}MUVH6cw8xR2&A~UG*V~pyDQR4_ymoT_iPrx=pDW$^ gV7obl)$b?cUQd>i8HM*{tk@@=IXfvlri|w}0JG8182|tP diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-metadata/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keycloak-saml.xml deleted file mode 100755 index a53b44dc2f..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keystore.jks b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77683d1d0a3d29f8793471d4f395bdb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1705 zcmezO_TO6u1_mZ5W@J#!C@Cqh($~+)PfpCq$S*FjvM{hP&@WERNiEhb0P=N1M z7#KYz`B=UJb?!81V%loJ$Ht}2#>m2`#U#kc$jZRd#I(>@`_HHQr3*BE{x`hDyEHld z+K~ja7y5T|r=%}Fu;`1zi=v(re>&z=o_dkol)j+zYO>t=Qy1S}v3en%vP3563G;>m zf%$6H#y=LWo_E+v&g1u@xzTso16CaPbkO_D8o@;(`MobV^Igq3BNxZ5w|jA2W>>?O zsK)o5D^C2naN_4wlZOiFZx$ZYW2t4}JhWx=_GhgLGruICtx3+%d3V!9>Dt7nXAhlc z$;{X;mJr8NzU5%3ud}q*;Tc<&7_HRg&F#_Q?wWFKHOG|)@xdBe`K>+ek+V}K-){E) zl)cDAKzFrg_KD*rPhJ#0xY%188oeS%DBgct!6JRDwVn#urq)k%GX7O$-%BXGHp?M$ zPK(%~JsS=itGtnGNeXRIJS=enoqTH}>U?=&w0Rv-!V zt0IaI7=L{C`R*=P35_m^|6)DbnI1Rom?{^itz&v>PMs${YwWF4+mV{{ zB3p#_4CDJAHQ!e4#HZJ%dA%($R{WrMXd~~o9sJ4l4<@p_UZ&<;=%+j9w)>u?FXr2x z;Qi$;R(a*~n?JwFjfqj;bam5w#iu)2cStlBuRNH-DYCa*SFTj`Ruc2O%^{1v zS^p3Un$kT>@>nGEyG?KA#5`*A-Q)TDd5mCQN4nqL|I4L=R^IMCEM*}Xua~%r;rLwD z(rqehS=sAVMB2P;SIyh9w+fi%85vk3^h^ybfvg(_O^jE7*p`Wn(Np4IY>ELd8>d#A zN85K^Mn-N{1_J{_Jp&y!=1>-9Vd650ft)z6p^2e^p_!qPiHVVMlsK;ujB93K97TqS zjq{OR1z|$TGQU@sN$9wB)LN$MwU<2= zd)SlRE7$3UyG=O%*+B2uv-3&H4597J6WaBsZpb_&f7j)l$IXYTF6-xcsr5`yWnyMz zU_^EvFwmHR?&_X(ZsE4#TgmHFu2rXfU6s0)lCKe^<7iiUsaqK$zd9h>c57vO3iO-78%EoLL<8ZmZxNJeq&U-KBw5j(T{eI-t zj}(o0{2w&pRSxr|MK;+T;phADf{DX@d*|wohzX72{tZ3*&sbbC2N!KDDXF>n@KOsN z=~ICbKGC4@Hz>{}*<-lToNvHy$ZNn2iF2?C$Wdx)Vu&22rlzLAD8`N=&Wn#AY>fF{RdOu_iDQssmI(9hPO(2Uiv*4ZQlGJH!&z=`K zw%L^5bkqb1@@gO=+rT(BxQD(6^h&8PDm@hVJA%Qxx$H92KBf6;Q! zeu+xYdBwlV_8D(8vle0u7ZYR_ZJGO3A6Ja^r!9<;Jf^6B_V*`!pI4_%{2#46Qrcoa z{d4O3!wr>pceY+y88$ipliuM2X9G4KozS*BUZS)4a=%Gc^OV}R*}*rh8m{{;m0Oa) z^Ysn?xlP?KeF94gT3Fr`zuJ}MUVH6cw8xR2&A~UG*V~pyDQR4_ymoT_iPrx=pDW$^ gV7obl)$b?cUQd>i8HM*{tk@@=IXfvlri|w}0JG8182|tP diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-email/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keycloak-saml.xml deleted file mode 100755 index a4bf71bc2d..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keystore.jks b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77683d1d0a3d29f8793471d4f395bdb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1705 zcmezO_TO6u1_mZ5W@J#!C@Cqh($~+)PfpCq$S*FjvM{hP&@WERNiEhb0P=N1M z7#KYz`B=UJb?!81V%loJ$Ht}2#>m2`#U#kc$jZRd#I(>@`_HHQr3*BE{x`hDyEHld z+K~ja7y5T|r=%}Fu;`1zi=v(re>&z=o_dkol)j+zYO>t=Qy1S}v3en%vP3563G;>m zf%$6H#y=LWo_E+v&g1u@xzTso16CaPbkO_D8o@;(`MobV^Igq3BNxZ5w|jA2W>>?O zsK)o5D^C2naN_4wlZOiFZx$ZYW2t4}JhWx=_GhgLGruICtx3+%d3V!9>Dt7nXAhlc z$;{X;mJr8NzU5%3ud}q*;Tc<&7_HRg&F#_Q?wWFKHOG|)@xdBe`K>+ek+V}K-){E) zl)cDAKzFrg_KD*rPhJ#0xY%188oeS%DBgct!6JRDwVn#urq)k%GX7O$-%BXGHp?M$ zPK(%~JsS=itGtnGNeXRIJS=enoqTH}>U?=&w0Rv-!V zt0IaI7=L{C`R*=P35_m^|6)DbnI1Rom?{^itz&v>PMs${YwWF4+mV{{ zB3p#_4CDJAHQ!e4#HZJ%dA%($R{WrMXd~~o9sJ4l4<@p_UZ&<;=%+j9w)>u?FXr2x z;Qi$;R(a*~n?JwFjfqj;bam5w#iu)2cStlBuRNH-DYCa*SFTj`Ruc2O%^{1v zS^p3Un$kT>@>nGEyG?KA#5`*A-Q)TDd5mCQN4nqL|I4L=R^IMCEM*}Xua~%r;rLwD z(rqehS=sAVMB2P;SIyh9w+fi%85vk3^h^ybfvg(_O^jE7*p`Wn(Np4IY>ELd8>d#A zN85K^Mn-N{1_J{_Jp&y!=1>-9Vd650ft)z6p^2e^p_!qPiHVVMlsK;ujB93K97TqS zjq{OR1z|$TGQU@sN$9wB)LN$MwU<2= zd)SlRE7$3UyG=O%*+B2uv-3&H4597J6WaBsZpb_&f7j)l$IXYTF6-xcsr5`yWnyMz zU_^EvFwmHR?&_X(ZsE4#TgmHFu2rXfU6s0)lCKe^<7iiUsaqK$zd9h>c57vO3iO-78%EoLL<8ZmZxNJeq&U-KBw5j(T{eI-t zj}(o0{2w&pRSxr|MK;+T;phADf{DX@d*|wohzX72{tZ3*&sbbC2N!KDDXF>n@KOsN z=~ICbKGC4@Hz>{}*<-lToNvHy$ZNn2iF2?C$Wdx)Vu&22rlzLAD8`N=&Wn#AY>fF{RdOu_iDQssmI(9hPO(2Uiv*4ZQlGJH!&z=`K zw%L^5bkqb1@@gO=+rT(BxQD(6^h&8PDm@hVJA%Qxx$H92KBf6;Q! zeu+xYdBwlV_8D(8vle0u7ZYR_ZJGO3A6Ja^r!9<;Jf^6B_V*`!pI4_%{2#46Qrcoa z{d4O3!wr>pceY+y88$ipliuM2X9G4KozS*BUZS)4a=%Gc^OV}R*}*rh8m{{;m0Oa) z^Ysn?xlP?KeF94gT3Fr`zuJ}MUVH6cw8xR2&A~UG*V~pyDQR4_ymoT_iPrx=pDW$^ gV7obl)$b?cUQd>i8HM*{tk@@=IXfvlri|w}0JG8182|tP diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-persistent/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 8bf32fa61f..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keystore.jks b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77683d1d0a3d29f8793471d4f395bdb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1705 zcmezO_TO6u1_mZ5W@J#!C@Cqh($~+)PfpCq$S*FjvM{hP&@WERNiEhb0P=N1M z7#KYz`B=UJb?!81V%loJ$Ht}2#>m2`#U#kc$jZRd#I(>@`_HHQr3*BE{x`hDyEHld z+K~ja7y5T|r=%}Fu;`1zi=v(re>&z=o_dkol)j+zYO>t=Qy1S}v3en%vP3563G;>m zf%$6H#y=LWo_E+v&g1u@xzTso16CaPbkO_D8o@;(`MobV^Igq3BNxZ5w|jA2W>>?O zsK)o5D^C2naN_4wlZOiFZx$ZYW2t4}JhWx=_GhgLGruICtx3+%d3V!9>Dt7nXAhlc z$;{X;mJr8NzU5%3ud}q*;Tc<&7_HRg&F#_Q?wWFKHOG|)@xdBe`K>+ek+V}K-){E) zl)cDAKzFrg_KD*rPhJ#0xY%188oeS%DBgct!6JRDwVn#urq)k%GX7O$-%BXGHp?M$ zPK(%~JsS=itGtnGNeXRIJS=enoqTH}>U?=&w0Rv-!V zt0IaI7=L{C`R*=P35_m^|6)DbnI1Rom?{^itz&v>PMs${YwWF4+mV{{ zB3p#_4CDJAHQ!e4#HZJ%dA%($R{WrMXd~~o9sJ4l4<@p_UZ&<;=%+j9w)>u?FXr2x z;Qi$;R(a*~n?JwFjfqj;bam5w#iu)2cStlBuRNH-DYCa*SFTj`Ruc2O%^{1v zS^p3Un$kT>@>nGEyG?KA#5`*A-Q)TDd5mCQN4nqL|I4L=R^IMCEM*}Xua~%r;rLwD z(rqehS=sAVMB2P;SIyh9w+fi%85vk3^h^ybfvg(_O^jE7*p`Wn(Np4IY>ELd8>d#A zN85K^Mn-N{1_J{_Jp&y!=1>-9Vd650ft)z6p^2e^p_!qPiHVVMlsK;ujB93K97TqS zjq{OR1z|$TGQU@sN$9wB)LN$MwU<2= zd)SlRE7$3UyG=O%*+B2uv-3&H4597J6WaBsZpb_&f7j)l$IXYTF6-xcsr5`yWnyMz zU_^EvFwmHR?&_X(ZsE4#TgmHFu2rXfU6s0)lCKe^<7iiUsaqK$zd9h>c57vO3iO-78%EoLL<8ZmZxNJeq&U-KBw5j(T{eI-t zj}(o0{2w&pRSxr|MK;+T;phADf{DX@d*|wohzX72{tZ3*&sbbC2N!KDDXF>n@KOsN z=~ICbKGC4@Hz>{}*<-lToNvHy$ZNn2iF2?C$Wdx)Vu&22rlzLAD8`N=&Wn#AY>fF{RdOu_iDQssmI(9hPO(2Uiv*4ZQlGJH!&z=`K zw%L^5bkqb1@@gO=+rT(BxQD(6^h&8PDm@hVJA%Qxx$H92KBf6;Q! zeu+xYdBwlV_8D(8vle0u7ZYR_ZJGO3A6Ja^r!9<;Jf^6B_V*`!pI4_%{2#46Qrcoa z{d4O3!wr>pceY+y88$ipliuM2X9G4KozS*BUZS)4a=%Gc^OV}R*}*rh8m{{;m0Oa) z^Ysn?xlP?KeF94gT3Fr`zuJ}MUVH6cw8xR2&A~UG*V~pyDQR4_ymoT_iPrx=pDW$^ gV7obl)$b?cUQd>i8HM*{tk@@=IXfvlri|w}0JG8182|tP diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post-transient/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 0cae188229..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/WEB-INF/keystore.jks b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/WEB-INF/keystore.jks deleted file mode 100755 index 144830bc77683d1d0a3d29f8793471d4f395bdb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1705 zcmezO_TO6u1_mZ5W@J#!C@Cqh($~+)PfpCq$S*FjvM{hP&@WERNiEhb0P=N1M z7#KYz`B=UJb?!81V%loJ$Ht}2#>m2`#U#kc$jZRd#I(>@`_HHQr3*BE{x`hDyEHld z+K~ja7y5T|r=%}Fu;`1zi=v(re>&z=o_dkol)j+zYO>t=Qy1S}v3en%vP3563G;>m zf%$6H#y=LWo_E+v&g1u@xzTso16CaPbkO_D8o@;(`MobV^Igq3BNxZ5w|jA2W>>?O zsK)o5D^C2naN_4wlZOiFZx$ZYW2t4}JhWx=_GhgLGruICtx3+%d3V!9>Dt7nXAhlc z$;{X;mJr8NzU5%3ud}q*;Tc<&7_HRg&F#_Q?wWFKHOG|)@xdBe`K>+ek+V}K-){E) zl)cDAKzFrg_KD*rPhJ#0xY%188oeS%DBgct!6JRDwVn#urq)k%GX7O$-%BXGHp?M$ zPK(%~JsS=itGtnGNeXRIJS=enoqTH}>U?=&w0Rv-!V zt0IaI7=L{C`R*=P35_m^|6)DbnI1Rom?{^itz&v>PMs${YwWF4+mV{{ zB3p#_4CDJAHQ!e4#HZJ%dA%($R{WrMXd~~o9sJ4l4<@p_UZ&<;=%+j9w)>u?FXr2x z;Qi$;R(a*~n?JwFjfqj;bam5w#iu)2cStlBuRNH-DYCa*SFTj`Ruc2O%^{1v zS^p3Un$kT>@>nGEyG?KA#5`*A-Q)TDd5mCQN4nqL|I4L=R^IMCEM*}Xua~%r;rLwD z(rqehS=sAVMB2P;SIyh9w+fi%85vk3^h^ybfvg(_O^jE7*p`Wn(Np4IY>ELd8>d#A zN85K^Mn-N{1_J{_Jp&y!=1>-9Vd650ft)z6p^2e^p_!qPiHVVMlsK;ujB93K97TqS zjq{OR1z|$TGQU@sN$9wB)LN$MwU<2= zd)SlRE7$3UyG=O%*+B2uv-3&H4597J6WaBsZpb_&f7j)l$IXYTF6-xcsr5`yWnyMz zU_^EvFwmHR?&_X(ZsE4#TgmHFu2rXfU6s0)lCKe^<7iiUsaqK$zd9h>c57vO3iO-78%EoLL<8ZmZxNJeq&U-KBw5j(T{eI-t zj}(o0{2w&pRSxr|MK;+T;phADf{DX@d*|wohzX72{tZ3*&sbbC2N!KDDXF>n@KOsN z=~ICbKGC4@Hz>{}*<-lToNvHy$ZNn2iF2?C$Wdx)Vu&22rlzLAD8`N=&Wn#AY>fF{RdOu_iDQssmI(9hPO(2Uiv*4ZQlGJH!&z=`K zw%L^5bkqb1@@gO=+rT(BxQD(6^h&8PDm@hVJA%Qxx$H92KBf6;Q! zeu+xYdBwlV_8D(8vle0u7ZYR_ZJGO3A6Ja^r!9<;Jf^6B_V*`!pI4_%{2#46Qrcoa z{d4O3!wr>pceY+y88$ipliuM2X9G4KozS*BUZS)4a=%Gc^OV}R*}*rh8m{{;m0Oa) z^Ysn?xlP?KeF94gT3Fr`zuJ}MUVH6cw8xR2&A~UG*V~pyDQR4_ymoT_iPrx=pDW$^ gV7obl)$b?cUQd>i8HM*{tk@@=IXfvlri|w}0JG8182|tP diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/signed-post/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-input/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-input/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-input/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-input/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-input/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 8cf6d987e0..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-input/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-input/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-input/WEB-INF/web.xml deleted file mode 100755 index 86b6e6e696..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-input/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.adapter.servlet.InputServlet - - - SendUsernameServlet - /* - - - - - Users - /secured/* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post/WEB-INF/keycloak-saml.xml deleted file mode 100755 index 716be6779d..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post2/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post2/META-INF/context.xml deleted file mode 100755 index c3591664ab..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post2/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post2/WEB-INF/keycloak-saml.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post2/WEB-INF/keycloak-saml.xml deleted file mode 100755 index a09f312986..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post2/WEB-INF/keycloak-saml.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post2/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post2/WEB-INF/web.xml deleted file mode 100755 index fcb90a9be1..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/simple-post2/WEB-INF/web.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - adapter-test - - - SendUsernameServlet - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - SendUsernameServlet - /* - - - - - Users - /* - - - manager - - - - - BASIC - demo - - /error.html - /error.html - - - - - manager - - - el-jefe - - diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/sp-metadata.xml b/testsuite/tomcat8/src/test/resources/keycloak-saml/sp-metadata.xml deleted file mode 100755 index 853a6b2d41..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/sp-metadata.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - urn:oasis:names:tc:SAML:2.0:nameid-format:transient - - - - - - - - MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw== - - - - - - - JBoss - JBoss by Red Hat - http://localhost:8080/sales-metadata/ - - - The - Admin - admin@mycompany.com - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/testsaml.json b/testsuite/tomcat8/src/test/resources/keycloak-saml/testsaml.json deleted file mode 100755 index 71cde711a7..0000000000 --- a/testsuite/tomcat8/src/test/resources/keycloak-saml/testsaml.json +++ /dev/null @@ -1,452 +0,0 @@ -{ - "id": "demo", - "realm": "demo", - "enabled": true, - "sslRequired": "external", - "registrationAllowed": true, - "resetPasswordAllowed": true, - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "defaultRoles": [ "user" ], - "smtpServer": { - "from": "auto@keycloak.org", - "host": "localhost", - "port":"3025" - }, - "users" : [ - { - "username" : "bburke", - "enabled": true, - "email" : "bburke@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "attributes" : { - "phone": "617" - }, - "realmRoles": ["manager", "user"], - "applicationRoles": { - "http://localhost:8082/employee/": [ "employee" ], - "http://localhost:8082/employee2/": [ "employee" ] - } - } , - { - "username" : "unauthorized", - "enabled": true, - "email" : "unauthorized@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ] - }, - { - "username" : "topGroupUser", - "enabled": true, - "email" : "top@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "groups": [ - "/top" - ] - }, - { - "username" : "level2GroupUser", - "enabled": true, - "email" : "level2@redhat.com", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "groups": [ - "/top/level2" - ] - } - ], - "applications": [ - { - "name": "http://localhost:8082/sales-post/", - "enabled": true, - "fullScopeAllowed": true, - "protocol": "saml", - "baseUrl": "http://localhost:8082/sales-post", - "redirectUris": [ - "http://localhost:8082/sales-post/*" - ], - "attributes": { - "saml.authnstatement": "true", - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/sales-post/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/sales-post/saml", - "saml_idp_initiated_sso_url_name": "sales-post" - } - }, - { - "name": "http://localhost:8082/sales-post2/", - "enabled": true, - "fullScopeAllowed": true, - "protocol": "saml", - "baseUrl": "http://localhost:8082/sales-post2", - "redirectUris": [ - "http://localhost:8082/sales-post2/*" - ], - "attributes": { - "saml.authnstatement": "true", - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post2/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post2/saml", - "saml_idp_initiated_sso_url_name": "sales-post2", - "saml_idp_initiated_sso_relay_state": "redirectTo=/foo" - } - }, - { - "name": "http://localhost:8082/input-portal/", - "enabled": true, - "fullScopeAllowed": true, - "protocol": "saml", - "baseUrl": "http://localhost:8082/input-portal/", - "redirectUris": [ - "http://localhost:8082/input-portal/*" - ], - "attributes": { - "saml.authnstatement": "true", - "saml_assertion_consumer_url_post": "http://localhost:8082/input-portal/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/input-portal/saml" - } - }, - { - "name": "http://localhost:8082/sales-post-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/sales-post-sig", - "redirectUris": [ - "http://localhost:8082/sales-post-sig/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post-sig/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/sales-post-sig/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post-sig/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/sales-post-sig/saml", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8082/sales-post-sig-transient/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/sales-post-sig-transient", - "adminUrl": "http://localhost:8082/sales-post-sig-transient/saml", - "redirectUris": [ - "http://localhost:8082/sales-post-sig-transient/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post-sig-transient/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/sales-post-sig-transient/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post-sig-transient/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/sales-post-sig-transient/saml", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8082/sales-post-sig-persistent/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/sales-post-sig-persistent", - "redirectUris": [ - "http://localhost:8082/sales-post-sig-persistent/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post-sig-persistent/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/sales-post-sig-persistent/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post-sig-persistent/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/sales-post-sig-persistent/saml", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8082/sales-post-sig-email/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/sales-post-sig-email", - "adminUrl": "http://localhost:8082/sales-post-sig-email/saml", - "redirectUris": [ - "http://localhost:8082/sales-post-sig-email/*" - ], - "attributes": { - "saml_force_name_id_format": "true", - "saml_name_id_format": "email", - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post-sig-email/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/sales-post-sig-email/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post-sig-email/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/sales-post-sig-email/saml", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8082/bad-realm-sales-post-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/bad-realm-sales-post-sig/", - "adminUrl": "http://localhost:8082/bad-realm-sales-post-sig/saml", - "redirectUris": [ - "http://localhost:8082/bad-realm-sales-post-sig/*" - ], - "attributes": { - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGP5dZDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1zaWcvMB4XDTE0MTAxNjEyNDQyM1oXDTI0MTAxNjEyNDYwM1owMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3Qtc2lnLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1RvGu8RjemSJA23nnMksoHA37MqY1DDTxOECY4rPAd9egr7GUNIXE0y1MokaR5R2crNpN8RIRwR8phQtQDjXL82c6W+NLQISxztarQJ7rdNJIYwHY0d5ri1XRpDP8zAuxubPYiMAVYcDkIcvlbBpwh/dRM5I2eElRK+eSiaMkCUCAwEAATANBgkqhkiG9w0BAQsFAAOBgQCLms6htnPaY69k1ntm9a5jgwSn/K61cdai8R8B0ccY7zvinn9AfRD7fiROQpFyY29wKn8WCLrJ86NBXfgFUGyR5nLNHVy3FghE36N2oHy53uichieMxffE6vhkKJ4P8ChfJMMOZlmCPsQPDvjoAghHt4mriFiQgRdPgIy/zDjSNw==" - } - }, - { - "name": "http://localhost:8082/bad-client-sales-post-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/bad-client-sales-post-sig/", - "adminUrl": "http://localhost:8082/bad-client-sales-post-sig/saml", - "redirectUris": [ - "http://localhost:8082/bad-client-sales-post-sig/*" - ], - "attributes": { - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGVacCDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1lbmMvMB4XDTE0MTAxNjE0MjA0NloXDTI0MTAxNjE0MjIyNlowMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3QtZW5jLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2+5MCT5BnVN+IYnKZcH6ev1pjXGi4feE0nOycq/VJ3aeaZMi4G9AxOxCBPupErOC7Kgm/Bw5AdJyw+Q12wSRXfJ9FhqCrLXpb7YOhbVSTJ8De5O8mW35DxAlh/cxe9FXjqPb286wKTUZ3LfGYR+X235UQeCTAPS/Ufi21EXaEikCAwEAATANBgkqhkiG9w0BAQsFAAOBgQBMrfGD9QFfx5v7ld/OAto5rjkTe3R1Qei8XRXfcs83vLaqEzjEtTuLGrJEi55kXuJgBpVmQpnwCCkkjSy0JxbqLDdVi9arfWUxEGmOr01ZHycELhDNaQcFqVMPr5kRHIHgktT8hK2IgCvd3Fy9/JCgUgCPxKfhwecyEOKxUc857g==" - } - }, - { - "name": "http://localhost:8082/sales-post-enc/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/sales-post-enc", - "redirectUris": [ - "http://localhost:8082/sales-post-enc/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8082/sales-post-enc/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/sales-post-enc/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/sales-post-enc/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/sales-post-enc/saml", - "saml.server.signature": "true", - "saml.signature.algorithm": "RSA_SHA512", - "saml.client.signature": "true", - "saml.encrypt": "true", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB1DCCAT0CBgFJGVacCDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1lbmMvMB4XDTE0MTAxNjE0MjA0NloXDTI0MTAxNjE0MjIyNlowMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3QtZW5jLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2+5MCT5BnVN+IYnKZcH6ev1pjXGi4feE0nOycq/VJ3aeaZMi4G9AxOxCBPupErOC7Kgm/Bw5AdJyw+Q12wSRXfJ9FhqCrLXpb7YOhbVSTJ8De5O8mW35DxAlh/cxe9FXjqPb286wKTUZ3LfGYR+X235UQeCTAPS/Ufi21EXaEikCAwEAATANBgkqhkiG9w0BAQsFAAOBgQBMrfGD9QFfx5v7ld/OAto5rjkTe3R1Qei8XRXfcs83vLaqEzjEtTuLGrJEi55kXuJgBpVmQpnwCCkkjSy0JxbqLDdVi9arfWUxEGmOr01ZHycELhDNaQcFqVMPr5kRHIHgktT8hK2IgCvd3Fy9/JCgUgCPxKfhwecyEOKxUc857g==", - "saml.encryption.certificate": "MIIB1DCCAT0CBgFJGVacCDANBgkqhkiG9w0BAQsFADAwMS4wLAYDVQQDEyVodHRwOi8vbG9jYWxob3N0OjgwODAvc2FsZXMtcG9zdC1lbmMvMB4XDTE0MTAxNjE0MjA0NloXDTI0MTAxNjE0MjIyNlowMDEuMCwGA1UEAxMlaHR0cDovL2xvY2FsaG9zdDo4MDgwL3NhbGVzLXBvc3QtZW5jLzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA2+5MCT5BnVN+IYnKZcH6ev1pjXGi4feE0nOycq/VJ3aeaZMi4G9AxOxCBPupErOC7Kgm/Bw5AdJyw+Q12wSRXfJ9FhqCrLXpb7YOhbVSTJ8De5O8mW35DxAlh/cxe9FXjqPb286wKTUZ3LfGYR+X235UQeCTAPS/Ufi21EXaEikCAwEAATANBgkqhkiG9w0BAQsFAAOBgQBMrfGD9QFfx5v7ld/OAto5rjkTe3R1Qei8XRXfcs83vLaqEzjEtTuLGrJEi55kXuJgBpVmQpnwCCkkjSy0JxbqLDdVi9arfWUxEGmOr01ZHycELhDNaQcFqVMPr5kRHIHgktT8hK2IgCvd3Fy9/JCgUgCPxKfhwecyEOKxUc857g==" - } - }, - { - "name": "http://localhost:8082/employee-sig/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/employee-sig", - "redirectUris": [ - "http://localhost:8082/employee-sig/*" - ], - "adminUrl": "http://localhost:8082/employee-sig/saml", - "attributes": { - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.signature.algorithm": "RSA_SHA256", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB0DCCATkCBgFJH5u0EDANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNodHRwOi8vbG9jYWxob3N0OjgwODAvZW1wbG95ZWUtc2lnLzAeFw0xNDEwMTcxOTMzNThaFw0yNDEwMTcxOTM1MzhaMC4xLDAqBgNVBAMTI2h0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9lbXBsb3llZS1zaWcvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+9kVgPFpshjS2aT2g52lqTv2lqb1jgvXZVk7iFF4LAO6SdCXKXRZI4SuzIRkVNpE1a42V1kQRlaozoFklgvX5sje8tkpa9ylq+bxGXM9RRycqRu2B+oWUV7Aqq7Bs0Xud0WeHQYRcEoCjqsFKGy65qkLRDdT70FTJgpSHts+gDwIDAQABMA0GCSqGSIb3DQEBCwUAA4GBACKyPLGqMX8GsIrCfJU8eVnpaqzTXMglLVo/nTcfAnWe9UAdVe8N3a2PXpDBvuqNA/DEAhVcQgxdlOTWnB6s8/yLTRuH0bZgb3qGdySif+lU+E7zZ/SiDzavAvn+ABqemnzHcHyhYO+hNRGHvUbW5OAii9Vdjhm8BI32YF1NwhKp" - } - }, - { - "name": "http://localhost:8082/employee/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/employee/", - "redirectUris": [ - "http://localhost:8082/employee/*" - ], - "adminUrl": "http://localhost:8082/employee/saml", - "attributes": { - "saml.authnstatement": "true" - }, - "protocolMappers": [ - { - "name": "email", - "protocol": "saml", - "protocolMapper": "saml-user-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "email", - "friendly.name": "email", - "attribute.name": "urn:oid:1.2.840.113549.1.9.1", - "attribute.nameformat": "URI Reference" - } - }, - { - "name": "phone", - "protocol": "saml", - "protocolMapper": "saml-user-attribute-mapper", - "consentRequired": false, - "config": { - "user.attribute": "phone", - "attribute.name": "phone", - "attribute.nameformat": "Basic" - } - }, - { - "name": "role-list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "consentRequired": false, - "config": { - "attribute.name": "Role", - "attribute.nameformat": "Basic", - "single": "false" - } - } - ] - }, - { - "name": "http://localhost:8082/employee2/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "baseUrl": "http://localhost:8082/employee2/", - "redirectUris": [ - "http://localhost:8082/employee2/*" - ], - "adminUrl": "http://localhost:8082/employee2/saml", - "attributes": { - "saml.authnstatement": "true" - }, - "protocolMappers": [ - { - "name": "email", - "protocol": "saml", - "protocolMapper": "saml-user-property-mapper", - "consentRequired": false, - "config": { - "user.attribute": "email", - "friendly.name": "email", - "attribute.name": "urn:oid:1.2.840.113549.1.9.1", - "attribute.nameformat": "URI Reference" - } - }, - { - "name": "phone", - "protocol": "saml", - "protocolMapper": "saml-user-attribute-mapper", - "consentRequired": false, - "config": { - "user.attribute": "phone", - "attribute.name": "phone", - "attribute.nameformat": "Basic" - } - }, - { - "name": "role-list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "consentRequired": false, - "config": { - "attribute.name": "Role", - "attribute.nameformat": "Basic", - "single": "false" - } - } - ] - }, - { - "name": "http://localhost:8082/employee-sig-front/", - "enabled": true, - "protocol": "saml", - "fullScopeAllowed": true, - "frontchannelLogout": true, - "baseUrl": "http://localhost:8082/employee-sig-front/", - "redirectUris": [ - "http://localhost:8082/employee-sig-front/*" - ], - "attributes": { - "saml_assertion_consumer_url_post": "http://localhost:8082/employee-sig-front/saml", - "saml_assertion_consumer_url_redirect": "http://localhost:8082/employee-sig-front/saml", - "saml_single_logout_service_url_post": "http://localhost:8082/employee-sig-front/saml", - "saml_single_logout_service_url_redirect": "http://localhost:8082/employee-sig-front/saml", - "saml.server.signature": "true", - "saml.client.signature": "true", - "saml.signature.algorithm": "RSA_SHA1", - "saml.authnstatement": "true", - "saml.signing.certificate": "MIIB0DCCATkCBgFJH5u0EDANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNodHRwOi8vbG9jYWxob3N0OjgwODAvZW1wbG95ZWUtc2lnLzAeFw0xNDEwMTcxOTMzNThaFw0yNDEwMTcxOTM1MzhaMC4xLDAqBgNVBAMTI2h0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9lbXBsb3llZS1zaWcvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+9kVgPFpshjS2aT2g52lqTv2lqb1jgvXZVk7iFF4LAO6SdCXKXRZI4SuzIRkVNpE1a42V1kQRlaozoFklgvX5sje8tkpa9ylq+bxGXM9RRycqRu2B+oWUV7Aqq7Bs0Xud0WeHQYRcEoCjqsFKGy65qkLRDdT70FTJgpSHts+gDwIDAQABMA0GCSqGSIb3DQEBCwUAA4GBACKyPLGqMX8GsIrCfJU8eVnpaqzTXMglLVo/nTcfAnWe9UAdVe8N3a2PXpDBvuqNA/DEAhVcQgxdlOTWnB6s8/yLTRuH0bZgb3qGdySif+lU+E7zZ/SiDzavAvn+ABqemnzHcHyhYO+hNRGHvUbW5OAii9Vdjhm8BI32YF1NwhKp" - } - } - ], - "groups" : [ - { - "name": "top", - "attributes": { - "topAttribute": ["true"] - - }, - "realmRoles": ["manager"], - "subGroups": [ - { - "name": "level2", - "realmRoles": ["user"], - "attributes": { - "level2Attribute": ["true"] - - } - } - ] - } - ], - "roles" : { - "realm" : [ - { - "name": "manager", - "description": "Have Manager privileges" - }, - { - "name": "user", - "description": "Have User privileges" - } - ], - "application" : { - "http://localhost:8082/employee/" : [ - { - "name": "employee", - "description": "Have Employee privileges" - } - ], - "http://localhost:8082/employee2/" : [ - { - "name": "employee", - "description": "Have Employee privileges" - } - ] - } - } -} diff --git a/testsuite/tomcat8/src/test/resources/tomcat-test/demorealm.json b/testsuite/tomcat8/src/test/resources/tomcat-test/demorealm.json deleted file mode 100755 index 86e830f984..0000000000 --- a/testsuite/tomcat8/src/test/resources/tomcat-test/demorealm.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "id": "demo", - "realm": "demo", - "enabled": true, - "accessTokenLifespan": 3000, - "accessCodeLifespan": 10, - "accessCodeLifespanUserAction": 6000, - "sslRequired": "external", - "registrationAllowed": false, - "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", - "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "requiredCredentials": [ "password" ], - "users" : [ - { - "username" : "bburke@redhat.com", - "enabled": true, - "email" : "bburke@redhat.com", - "firstName": "Bill", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user", "admin" ], - "applicationRoles": { - "account": [ "manage-account" ] - } - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "User privileges" - }, - { - "name": "admin", - "description": "Administrator privileges" - } - ] - }, - "applications": [ - { - "name": "customer-portal", - "enabled": true, - "fullScopeAllowed": true, - "adminUrl": "http://localhost:8080/customer-portal", - "baseUrl": "http://localhost:8080/customer-portal", - "directAccessGrantsEnabled": true, - "redirectUris": [ - "http://localhost:8080/customer-portal/*" - ], - "secret": "password" - } - ] -} diff --git a/testsuite/tomcat8/src/test/resources/tomcat-test/webapp/META-INF/context.xml b/testsuite/tomcat8/src/test/resources/tomcat-test/webapp/META-INF/context.xml deleted file mode 100755 index b4ddcce386..0000000000 --- a/testsuite/tomcat8/src/test/resources/tomcat-test/webapp/META-INF/context.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/testsuite/tomcat8/src/test/resources/tomcat-test/webapp/WEB-INF/keycloak.json b/testsuite/tomcat8/src/test/resources/tomcat-test/webapp/WEB-INF/keycloak.json deleted file mode 100755 index d9caa3f178..0000000000 --- a/testsuite/tomcat8/src/test/resources/tomcat-test/webapp/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm": "demo", - "resource": "customer-portal", - "realm-public-key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", - "auth-server-url": "http://localhost:8081/auth", - "ssl-required" : "external", - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/tomcat8/src/test/resources/tomcat-test/webapp/WEB-INF/web.xml b/testsuite/tomcat8/src/test/resources/tomcat-test/webapp/WEB-INF/web.xml deleted file mode 100755 index a4b725473b..0000000000 --- a/testsuite/tomcat8/src/test/resources/tomcat-test/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - adapter-test - - - SendUsername - org.keycloak.testsuite.helper.adapter.SendUsernameServlet - - - - SendUsername - /* - - - - - Admins - /* - - - admin - - - - - BASIC - demo - - - - admin - - - user - - diff --git a/travis-run-tests.sh b/travis-run-tests.sh index 7d76fb4796..b5af69180c 100755 --- a/travis-run-tests.sh +++ b/travis-run-tests.sh @@ -52,8 +52,6 @@ mvn install -B -nsu -Pdistribution -DskipTests -Dorg.slf4j.simpleLogger.log.org. if [ $1 == "old" ]; then cd testsuite mvn test -B -nsu -f integration-deprecated - mvn test -B -nsu -f tomcat7 - mvn test -B -nsu -f tomcat8 fi if [ $1 == "unit" ]; then