From 52ca546cfaa8ffc655a92f54fc35a46eaa23507e Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Mon, 2 May 2022 09:55:52 +0200 Subject: [PATCH] Remove Fuse adapters (#11740) Closes #11677 --- adapters/oidc/fuse7/camel-undertow/pom.xml | 138 ----- .../undertow/UndertowKeycloakComponent.java | 48 -- .../undertow/UndertowKeycloakConsumer.java | 219 ------- .../undertow/UndertowKeycloakEndpoint.java | 152 ----- .../apache/camel/component/undertow-keycloak | 1 - adapters/oidc/fuse7/jetty94/pom.xml | 122 ---- .../jetty94/KeycloakAuthenticatorService.java | 41 -- .../jetty94/PaxWebIntegrationService.java | 280 --------- ...ops4j.pax.web.service.AuthenticatorService | 1 - adapters/oidc/fuse7/pom.xml | 57 -- adapters/oidc/fuse7/tomcat8/pom.xml | 107 ---- .../tomcat/KeycloakAuthenticatorService.java | 41 -- ...ops4j.pax.web.service.AuthenticatorService | 1 - adapters/oidc/fuse7/undertow/pom.xml | 147 ----- .../osgi/undertow/CxfKeycloakAuthHandler.java | 174 ------ .../KeycloakAuthenticatorService.java | 41 -- .../undertow/PaxWebIntegrationService.java | 142 ----- ...ops4j.pax.web.service.AuthenticatorService | 1 - adapters/oidc/osgi-adapter/pom.xml | 149 ----- .../BundleBasedKeycloakConfigResolver.java | 83 --- ...chicalPathBasedKeycloakConfigResolver.java | 89 --- .../osgi/PathBasedKeycloakConfigResolver.java | 184 ------ .../osgi/PaxWebIntegrationService.java | 276 --------- .../osgi/PaxWebSecurityConstraintMapping.java | 73 --- .../osgi/ServletReregistrationService.java | 254 -------- ...alPathBasedKeycloakConfigResolverTest.java | 162 ----- .../PathBasedKeycloakConfigResolverTest.java | 149 ----- adapters/oidc/pom.xml | 2 - .../adapters/fuse-adapter-zip/assembly.xml | 48 -- .../adapters/fuse-adapter-zip/pom.xml | 330 ----------- ...ons,2.12.1,Apache Software License 2.0.txt | 202 ------- ...ore,2.12.1,Apache Software License 2.0.txt | 202 ------- ...ind,2.12.1,Apache Software License 2.0.txt | 202 ------- ...ase,2.12.1,Apache Software License 2.0.txt | 8 - ...der,2.12.1,Apache Software License 2.0.txt | 8 - ...ons,2.12.1,Apache Software License 2.0.txt | 8 - .../resources/licenses/keycloak/licenses.xml | 126 ---- ...ient,4.5.2,Apache Software License 2.0.txt | 558 ------------------ ...core,4.4.4,Apache Software License 2.0.txt | 241 -------- ...castle,bcpkix-jdk15on,1.68,MIT License.txt | 22 - ...castle,bcprov-jdk15on,1.68,MIT License.txt | 22 - ....4.1.Final,Apache Software License 2.0.txt | 202 ------- ...dhat-00001,Apache Software License 2.0.txt | 202 ------- ...dhat-00001,Apache Software License 2.0.txt | 202 ------- ...dhat-00001,Apache Software License 2.0.txt | 1 - ...dhat-00002,Apache Software License 2.0.txt | 8 - ...dhat-00001,Apache Software License 2.0.txt | 8 - ...dhat-00001,Apache Software License 2.0.txt | 8 - .../resources/licenses/rh-sso/licenses.xml | 126 ---- ...2.redhat-2,Apache Software License 2.0.txt | 558 ------------------ ...4.redhat-2,Apache Software License 2.0.txt | 241 -------- ...dk15on,1.68.0.redhat-00005,MIT License.txt | 22 - ...dk15on,1.68.0.redhat-00005,MIT License.txt | 22 - ...dhat-00001,Apache Software License 2.0.txt | 202 ------- distribution/adapters/osgi/features/pom.xml | 79 --- .../features/src/main/resources/features.xml | 116 ---- distribution/adapters/osgi/jaas/pom.xml | 87 --- .../OSGI-INF/blueprint/blueprint.xml | 55 -- distribution/adapters/osgi/pom.xml | 39 -- distribution/adapters/pom.xml | 2 - .../downloads/src/main/resources/files | 1 - examples/README.md | 5 - pom.xml | 5 - .../integration-arquillian/HOW-TO-RUN.md | 116 ---- testsuite/integration-arquillian/README.md | 6 +- testsuite/integration-arquillian/pom.xml | 17 - .../servers/app-server/karaf/assembly.xml | 47 -- .../servers/app-server/karaf/fuse63/pom.xml | 85 --- .../Fuse63AppServerArquillianExtension.java | 36 -- .../container/Fuse63AppServerProvider.java | 92 --- ...boss.arquillian.core.spi.LoadableExtension | 1 - ...llian.container.AppServerContainerProvider | 1 - .../resources/keycloak-direct-access.json | 9 - .../resources/keycloak-hawtio-client.json | 7 - .../src/main/resources/keycloak-hawtio.json | 9 - .../src/main/resources/users.properties | 1 - .../fuse63/src/saml-adapter-not-supported | 1 - .../servers/app-server/karaf/fuse7x/pom.xml | 85 --- .../Fuse7xAppServerArquillianExtension.java | 36 -- .../container/Fuse7xAppServerProvider.java | 92 --- ...boss.arquillian.core.spi.LoadableExtension | 1 - ...llian.container.AppServerContainerProvider | 1 - .../cxf-customerservice-keycloak.json | 10 - .../src/main/resources/keycloak-bearer.json | 9 - .../resources/keycloak-direct-access.json | 9 - .../resources/keycloak-hawtio-client.json | 7 - .../src/main/resources/keycloak-hawtio.json | 9 - .../src/main/resources/users.properties | 1 - .../fuse7x/src/saml-adapter-not-supported | 1 - .../servers/app-server/karaf/pom.xml | 177 ------ .../servers/app-server/pom.xml | 1 - .../test-apps/fuse/README.md | 76 --- .../fuse/camel-fuse7-undertow/pom.xml | 106 ---- .../keycloak/example/CamelHelloProcessor.java | 48 -- .../OSGI-INF/blueprint/blueprint.xml | 69 --- .../src/main/resources/WEB-INF/keycloak.json | 10 - .../test-apps/fuse/camel/pom.xml | 99 ---- .../keycloak/example/CamelHelloProcessor.java | 42 -- .../OSGI-INF/blueprint/blueprint.xml | 125 ---- .../test-apps/fuse/customer-app-fuse/pom.xml | 130 ---- .../org/keycloak/example/CamelClient.java | 115 ---- .../org/keycloak/example/CxfRsClient.java | 91 --- .../src/main/webapp/WEB-INF/jetty-web.xml | 27 - .../src/main/webapp/WEB-INF/keycloak.json | 9 - .../src/main/webapp/WEB-INF/web.xml | 51 -- .../src/main/webapp/customers/camel.jsp | 13 - .../src/main/webapp/customers/cxf-rs.jsp | 54 -- .../src/main/webapp/index.html | 32 - .../fuse/cxf-jaxrs-fuse7-undertow/pom.xml | 89 --- .../example/rs/CxfCustomerService.java | 46 -- .../resources/META-INF/cxf/bus-extensions.txt | 0 .../OSGI-INF/blueprint/blueprint.xml | 39 -- .../src/main/resources/WEB-INF/keycloak.json | 9 - .../test-apps/fuse/cxf-jaxrs/pom.xml | 92 --- .../example/rs/CxfCustomerService.java | 46 -- .../resources/META-INF/cxf/bus-extensions.txt | 0 .../OSGI-INF/blueprint/blueprint.xml | 77 --- .../src/main/resources/WEB-INF/jetty-web.xml | 27 - .../src/main/resources/WEB-INF/keycloak.json | 9 - .../fuse/cxf-jaxws-fuse7-undertow/pom.xml | 102 ---- .../java/org/keycloak/example/ws/Product.java | 42 -- .../org/keycloak/example/ws/ProductImpl.java | 44 -- .../example/ws/UnknownProductFault.java | 52 -- .../keycloak/example/ws/types/GetProduct.java | 81 --- .../example/ws/types/GetProductResponse.java | 109 ---- .../example/ws/types/ObjectFactory.java | 73 --- .../example/ws/types/UnknownProductFault.java | 81 --- .../example/ws/types/package-info.java | 18 - .../OSGI-INF/blueprint/blueprint.xml | 47 -- .../src/main/resources/WEB-INF/keycloak.json | 7 - .../test-apps/fuse/cxf-jaxws/pom.xml | 108 ---- .../java/org/keycloak/example/ws/Product.java | 42 -- .../org/keycloak/example/ws/ProductImpl.java | 44 -- .../example/ws/UnknownProductFault.java | 52 -- .../keycloak/example/ws/types/GetProduct.java | 81 --- .../example/ws/types/GetProductResponse.java | 109 ---- .../example/ws/types/ObjectFactory.java | 73 --- .../example/ws/types/UnknownProductFault.java | 81 --- .../example/ws/types/package-info.java | 18 - .../main/resources/META-INF/spring/beans.xml | 85 --- .../test-apps/fuse/demorealm.json | 294 --------- .../external-config-keycloak.json | 9 - .../test-apps/fuse/external-config/pom.xml | 132 ----- .../keycloak/examples/ProtectedServlet.java | 58 -- .../src/main/webapp/WEB-INF/jetty-web.xml | 27 - .../src/main/webapp/WEB-INF/web.xml | 55 -- .../src/main/webapp/index.html | 30 - .../test-apps/fuse/features/pom.xml | 79 --- .../features/src/main/resources/features.xml | 59 -- .../test-apps/fuse/fuse-admin/README.md | 51 -- .../fuse-admin/keycloak-direct-access.json | 9 - .../fuse-admin/keycloak-hawtio-client.json | 7 - .../fuse/fuse-admin/keycloak-hawtio.json | 9 - .../test-apps/fuse/pom.xml | 50 -- .../test-apps/fuse/product-app-fuse/pom.xml | 90 --- .../example/ProductPortalServlet.java | 121 ---- .../OSGI-INF/blueprint/blueprint.xml | 62 -- .../src/main/resources/WEB-INF/jetty-web.xml | 27 - .../src/main/resources/WEB-INF/keycloak.json | 9 - .../fuse/product-app-fuse7-undertow/pom.xml | 94 --- .../example/ProductPortalServlet.java | 119 ---- .../OSGI-INF/blueprint/blueprint.xml | 53 -- .../src/main/resources/WEB-INF/keycloak.json | 9 - .../integration-arquillian/test-apps/pom.xml | 1 - .../test-apps/test-apps-dist/build.xml | 8 - .../integration-arquillian/tests/base/pom.xml | 150 ----- .../testsuite/adapter/page/Hawtio2Page.java | 45 -- .../testsuite/adapter/page/HawtioPage.java | 71 --- .../page/fuse/AbstractFuseExample.java | 63 -- .../adapter/page/fuse/AdminInterface.java | 31 - .../adapter/page/fuse/CustomerListing.java | 53 -- .../page/fuse/CustomerPortalFuseExample.java | 51 -- .../page/fuse/ProductPortalFuseExample.java | 67 --- .../arquillian/AppServerTestEnricher.java | 8 - .../KeycloakArquillianExtension.java | 3 - .../fuse/EAP6Fuse6HawtioAdapterTest.java | 131 ---- .../adapter/example/fuse/FuseAdapterTest.java | 402 ------------- .../adapters/karaf/common/xslt/arquillian.xsl | 59 -- .../tests/other/adapters/karaf/fuse61/pom.xml | 41 -- .../example/Fuse61ExampleAdapterTest.java | 12 - .../tests/other/adapters/karaf/fuse62/pom.xml | 41 -- .../example/Fuse62ExampleAdapterTest.java | 28 - .../tests/other/adapters/karaf/karaf3/pom.xml | 41 -- .../example/Karaf3ExampleAdapterTest.java | 12 - .../tests/other/adapters/karaf/pom.xml | 70 --- .../tests/other/adapters/pom.xml | 4 +- .../integration-arquillian/tests/pom.xml | 6 - testsuite/integration-arquillian/util/pom.xml | 19 - .../utils/arquillian/ContainerConstants.java | 3 - .../arquillian/fuse/CustomFuseContainer.java | 246 -------- ...ycloakOSGiApplicationArchiveProcessor.java | 56 -- .../testsuite/utils/fuse/FuseUtils.java | 277 --------- 192 files changed, 3 insertions(+), 14498 deletions(-) delete mode 100644 adapters/oidc/fuse7/camel-undertow/pom.xml delete mode 100644 adapters/oidc/fuse7/camel-undertow/src/main/java/org/keycloak/adapters/camel/undertow/UndertowKeycloakComponent.java delete mode 100644 adapters/oidc/fuse7/camel-undertow/src/main/java/org/keycloak/adapters/camel/undertow/UndertowKeycloakConsumer.java delete mode 100644 adapters/oidc/fuse7/camel-undertow/src/main/java/org/keycloak/adapters/camel/undertow/UndertowKeycloakEndpoint.java delete mode 100644 adapters/oidc/fuse7/camel-undertow/src/main/resources/META-INF/services/org/apache/camel/component/undertow-keycloak delete mode 100644 adapters/oidc/fuse7/jetty94/pom.xml delete mode 100644 adapters/oidc/fuse7/jetty94/src/main/java/org/keycloak/adapters/osgi/jetty94/KeycloakAuthenticatorService.java delete mode 100644 adapters/oidc/fuse7/jetty94/src/main/java/org/keycloak/adapters/osgi/jetty94/PaxWebIntegrationService.java delete mode 100644 adapters/oidc/fuse7/jetty94/src/main/resources/META-INF/services/org.ops4j.pax.web.service.AuthenticatorService delete mode 100644 adapters/oidc/fuse7/pom.xml delete mode 100644 adapters/oidc/fuse7/tomcat8/pom.xml delete mode 100644 adapters/oidc/fuse7/tomcat8/src/main/java/org/keycloak/adapters/osgi/tomcat/KeycloakAuthenticatorService.java delete mode 100644 adapters/oidc/fuse7/tomcat8/src/main/resources/META-INF/services/org.ops4j.pax.web.service.AuthenticatorService delete mode 100644 adapters/oidc/fuse7/undertow/pom.xml delete mode 100644 adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/CxfKeycloakAuthHandler.java delete mode 100644 adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/KeycloakAuthenticatorService.java delete mode 100644 adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/PaxWebIntegrationService.java delete mode 100644 adapters/oidc/fuse7/undertow/src/main/resources/META-INF/services/org.ops4j.pax.web.service.AuthenticatorService delete mode 100755 adapters/oidc/osgi-adapter/pom.xml delete mode 100644 adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/BundleBasedKeycloakConfigResolver.java delete mode 100644 adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/HierarchicalPathBasedKeycloakConfigResolver.java delete mode 100644 adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/PathBasedKeycloakConfigResolver.java delete mode 100644 adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/PaxWebIntegrationService.java delete mode 100644 adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/PaxWebSecurityConstraintMapping.java delete mode 100644 adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/ServletReregistrationService.java delete mode 100644 adapters/oidc/osgi-adapter/src/test/java/org/keycloak/adapters/osgi/HierarchicalPathBasedKeycloakConfigResolverTest.java delete mode 100644 adapters/oidc/osgi-adapter/src/test/java/org/keycloak/adapters/osgi/PathBasedKeycloakConfigResolverTest.java delete mode 100644 distribution/adapters/fuse-adapter-zip/assembly.xml delete mode 100644 distribution/adapters/fuse-adapter-zip/pom.xml delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-annotations,2.12.1,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-core,2.12.1,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-databind,2.12.1,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.12.1,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.12.1,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.12.1,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/licenses.xml delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.apache.httpcomponents,httpclient,4.5.2,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.apache.httpcomponents,httpcore,4.4.4,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.68,MIT License.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.68,MIT License.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.jboss.logging,jboss-logging,3.4.1.Final,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-annotations,2.12.1.redhat-00001,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-core,2.12.1.redhat-00001,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-databind,2.12.1.redhat-00001,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.12.1.redhat-00002,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.12.1.redhat-00001,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.12.1.redhat-00001,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/licenses.xml delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.apache.httpcomponents,httpclient,4.5.2.redhat-2,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.apache.httpcomponents,httpcore,4.4.4.redhat-2,Apache Software License 2.0.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.68.0.redhat-00005,MIT License.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.68.0.redhat-00005,MIT License.txt delete mode 100644 distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.jboss.logging,jboss-logging,3.4.1.Final-redhat-00001,Apache Software License 2.0.txt delete mode 100755 distribution/adapters/osgi/features/pom.xml delete mode 100755 distribution/adapters/osgi/features/src/main/resources/features.xml delete mode 100755 distribution/adapters/osgi/jaas/pom.xml delete mode 100644 distribution/adapters/osgi/jaas/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100755 distribution/adapters/osgi/pom.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/assembly.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse63/pom.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/java/org/keycloak/testsuite/arquillian/fuse/Fuse63AppServerArquillianExtension.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/java/org/keycloak/testsuite/arquillian/fuse/container/Fuse63AppServerProvider.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/keycloak-direct-access.json delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/keycloak-hawtio-client.json delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/keycloak-hawtio.json delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/users.properties delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/saml-adapter-not-supported delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/pom.xml delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/java/org/keycloak/testsuite/arquillian/fuse/Fuse7xAppServerArquillianExtension.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/java/org/keycloak/testsuite/arquillian/fuse/container/Fuse7xAppServerProvider.java delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/cxf-customerservice-keycloak.json delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-bearer.json delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-direct-access.json delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-hawtio-client.json delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-hawtio.json delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/users.properties delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/saml-adapter-not-supported delete mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/pom.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/README.md delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/pom.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/src/main/java/org/keycloak/example/CamelHelloProcessor.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/camel/pom.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/camel/src/main/java/org/keycloak/example/CamelHelloProcessor.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/camel/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/pom.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/java/org/keycloak/example/CamelClient.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/java/org/keycloak/example/CxfRsClient.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/WEB-INF/jetty-web.xml delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/WEB-INF/keycloak.json delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/WEB-INF/web.xml delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/customers/camel.jsp delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/customers/cxf-rs.jsp delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/index.html delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/pom.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/java/org/keycloak/example/rs/CxfCustomerService.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/resources/META-INF/cxf/bus-extensions.txt delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/pom.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/java/org/keycloak/example/rs/CxfCustomerService.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/META-INF/cxf/bus-extensions.txt delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/WEB-INF/keycloak.json delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/pom.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/Product.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/ProductImpl.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/UnknownProductFault.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/GetProduct.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/GetProductResponse.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/ObjectFactory.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/UnknownProductFault.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/package-info.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/pom.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/Product.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/ProductImpl.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/UnknownProductFault.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/GetProduct.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/GetProductResponse.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/ObjectFactory.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/UnknownProductFault.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/package-info.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/resources/META-INF/spring/beans.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/demorealm.json delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/external-config/external-config-keycloak.json delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/external-config/pom.xml delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/java/org/keycloak/examples/ProtectedServlet.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/webapp/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/webapp/WEB-INF/web.xml delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/webapp/index.html delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/features/pom.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/features/src/main/resources/features.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/fuse-admin/README.md delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/fuse-admin/keycloak-direct-access.json delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/fuse-admin/keycloak-hawtio-client.json delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/fuse-admin/keycloak-hawtio.json delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/pom.xml delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/pom.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/java/org/keycloak/example/ProductPortalServlet.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/resources/WEB-INF/jetty-web.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/resources/WEB-INF/keycloak.json delete mode 100755 testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/pom.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/src/main/java/org/keycloak/example/ProductPortalServlet.java delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/Hawtio2Page.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/HawtioPage.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/AbstractFuseExample.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/AdminInterface.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/CustomerListing.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/CustomerPortalFuseExample.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/ProductPortalFuseExample.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/EAP6Fuse6HawtioAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/FuseAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/common/xslt/arquillian.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/src/test/java/org/keycloak/testsuite/adapter/example/Fuse61ExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/src/test/java/org/keycloak/testsuite/adapter/example/Fuse62ExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/src/test/java/org/keycloak/testsuite/adapter/example/Karaf3ExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/pom.xml delete mode 100644 testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/fuse/CustomFuseContainer.java delete mode 100644 testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/fuse/KeycloakOSGiApplicationArchiveProcessor.java delete mode 100644 testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/fuse/FuseUtils.java diff --git a/adapters/oidc/fuse7/camel-undertow/pom.xml b/adapters/oidc/fuse7/camel-undertow/pom.xml deleted file mode 100644 index 92e356cef5c..00000000000 --- a/adapters/oidc/fuse7/camel-undertow/pom.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - keycloak-fuse7-integration-pom - org.keycloak - 999-SNAPSHOT - ../pom.xml - - 4.0.0 - - keycloak-camel-undertow - Keycloak Fuse 7.0 Adapter - Camel + Undertow - bundle - - - 1.8 - 1.8 - - - org.keycloak.adapters.camel.undertow;version="${project.version}" - - - org.keycloak.*;version="${project.version}", - org.apache.camel.*, - org.apache.camel.component.undertow, - io.undertow.*;version="[1.4,3)", - *;resolution:=optional - - - - - - org.jboss.logging - jboss-logging - provided - - - org.osgi - org.osgi.core - provided - - - org.osgi - org.osgi.enterprise - provided - - - org.ops4j.pax.web - pax-web-runtime - provided - - - org.ops4j.pax.web - pax-web-spi - provided - - - org.ops4j.pax.web - pax-web-api - provided - - - io.undertow - undertow-servlet - provided - - - org.keycloak - keycloak-undertow-adapter - provided - - - org.apache.camel - camel-undertow - 2.21.2 - - - org.apache.camel - camel-core - 2.21.2 - - - - - - - - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.felix - maven-bundle-plugin - true - - - bundle-manifest - process-classes - - manifest - - - - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.export} - org.apache.camel.spi.ComponentResolver;component=undertow-keycloak - - - - - - diff --git a/adapters/oidc/fuse7/camel-undertow/src/main/java/org/keycloak/adapters/camel/undertow/UndertowKeycloakComponent.java b/adapters/oidc/fuse7/camel-undertow/src/main/java/org/keycloak/adapters/camel/undertow/UndertowKeycloakComponent.java deleted file mode 100644 index 85921126601..00000000000 --- a/adapters/oidc/fuse7/camel-undertow/src/main/java/org/keycloak/adapters/camel/undertow/UndertowKeycloakComponent.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.adapters.camel.undertow; - -import java.net.URI; -import java.net.URISyntaxException; -import org.apache.camel.CamelContext; -import org.apache.camel.component.undertow.UndertowComponent; -import org.apache.camel.component.undertow.UndertowEndpoint; - -/** - * - * @author hmlnarik - */ -public class UndertowKeycloakComponent extends UndertowComponent { - - public UndertowKeycloakComponent() { - } - - public UndertowKeycloakComponent(CamelContext context) { - super(context); - } - - @Override - protected UndertowEndpoint createEndpointInstance(URI endpointUri, UndertowComponent component) throws URISyntaxException { - return new UndertowKeycloakEndpoint(endpointUri.toString(), component); - } - - @Override - protected String getComponentName() { - return "undertow-keycloak"; - } -} diff --git a/adapters/oidc/fuse7/camel-undertow/src/main/java/org/keycloak/adapters/camel/undertow/UndertowKeycloakConsumer.java b/adapters/oidc/fuse7/camel-undertow/src/main/java/org/keycloak/adapters/camel/undertow/UndertowKeycloakConsumer.java deleted file mode 100644 index 15a9e1a3397..00000000000 --- a/adapters/oidc/fuse7/camel-undertow/src/main/java/org/keycloak/adapters/camel/undertow/UndertowKeycloakConsumer.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.adapters.camel.undertow; - -import org.keycloak.KeycloakPrincipal; -import org.keycloak.adapters.AdapterDeploymentContext; -import org.keycloak.adapters.AdapterTokenStore; -import org.keycloak.adapters.AuthenticatedActionsHandler; -import org.keycloak.adapters.KeycloakDeployment; -import org.keycloak.adapters.NodesRegistrationManagement; -import org.keycloak.adapters.PreAuthActionsHandler; -import org.keycloak.adapters.RequestAuthenticator; -import org.keycloak.adapters.spi.AuthChallenge; -import org.keycloak.adapters.spi.AuthOutcome; -import org.keycloak.adapters.spi.HttpFacade; -import org.keycloak.adapters.spi.InMemorySessionIdMapper; -import org.keycloak.adapters.spi.SessionIdMapper; -import org.keycloak.adapters.undertow.KeycloakUndertowAccount; -import org.keycloak.adapters.undertow.OIDCUndertowHttpFacade; -import org.keycloak.adapters.undertow.SessionManagementBridge; -import org.keycloak.adapters.undertow.UndertowCookieTokenStore; -import org.keycloak.adapters.undertow.UndertowRequestAuthenticator; -import org.keycloak.adapters.undertow.UndertowSessionTokenStore; -import org.keycloak.adapters.undertow.UndertowUserSessionManagement; -import org.keycloak.enums.TokenStore; -import io.undertow.security.api.SecurityContext; -import io.undertow.security.idm.Account; -import io.undertow.security.idm.Credential; -import io.undertow.security.idm.IdentityManager; -import io.undertow.security.impl.SecurityContextImpl; -import io.undertow.server.HttpServerExchange; -import io.undertow.server.session.InMemorySessionManager; -import io.undertow.server.session.SessionManager; -import io.undertow.util.AttachmentKey; -import io.undertow.util.StatusCodes; -import java.util.Collections; -import java.util.List; -import java.util.Set; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.regex.Pattern; -import org.apache.camel.Processor; -import org.apache.camel.component.undertow.UndertowConsumer; - -/** - * - * @author hmlnarik - */ -public class UndertowKeycloakConsumer extends UndertowConsumer { - - private static final Logger LOG = Logger.getLogger(UndertowKeycloakConsumer.class.getName()); - - public static final AttachmentKey KEYCLOAK_PRINCIPAL_KEY = AttachmentKey.create(KeycloakPrincipal.class); - - private static final IdentityManager IDENTITY_MANAGER = new IdentityManager() { - @Override - public Account verify(Account account) { - return account; - } - - @Override - public Account verify(String id, Credential credential) { - throw new IllegalStateException("Should never be called in Keycloak flow"); - } - - @Override - public Account verify(Credential credential) { - throw new IllegalStateException("Should never be called in Keycloak flow"); - } - }; - - protected SessionIdMapper idMapper = new InMemorySessionIdMapper(); - - protected final NodesRegistrationManagement nodesRegistrationManagement = new NodesRegistrationManagement(); - - private final UndertowUserSessionManagement userSessionManagement = new UndertowUserSessionManagement(); - - protected final AdapterDeploymentContext deploymentContext; - - protected final SessionManager sessionManager; - - protected final List allowedRoles; - - private final int confidentialPort; - - private final Pattern skipPattern; - - public UndertowKeycloakConsumer(UndertowKeycloakEndpoint endpoint, Processor processor, - AdapterDeploymentContext deploymentContext, Pattern skipPattern, List allowedRoles, int confidentialPort) { - super(endpoint, processor); - this.sessionManager = new InMemorySessionManager(endpoint.getEndpointUri()); - this.deploymentContext = deploymentContext; - this.skipPattern = skipPattern; - this.confidentialPort = confidentialPort; - this.allowedRoles = allowedRoles == null ? Collections.emptyList() : allowedRoles; - } - - public int getConfidentialPort() { - return confidentialPort; - } - - @Override - public void handleRequest(HttpServerExchange httpExchange) throws Exception { - if (shouldSkip(httpExchange.getRequestPath())) { - super.handleRequest(httpExchange); - return; - } - - //perform only non-blocking operation on exchange - if (httpExchange.isInIoThread()) { - httpExchange.dispatch(this); - return; - } - - OIDCUndertowHttpFacade facade = new OIDCUndertowHttpFacade(httpExchange); - KeycloakDeployment deployment = deploymentContext.resolveDeployment(facade); - - if (deployment == null || !deployment.isConfigured()) { - httpExchange.setStatusCode(StatusCodes.FORBIDDEN); - LOG.fine("deployment not configured"); - return; - } - - LOG.fine("executing PreAuthActionsHandler"); - SessionManagementBridge bridge = new SessionManagementBridge(userSessionManagement, sessionManager); - PreAuthActionsHandler preAuth = new PreAuthActionsHandler(bridge, deploymentContext, facade); - if (preAuth.handleRequest()) return; - - SecurityContext securityContext = httpExchange.getSecurityContext(); - if (securityContext == null) { - securityContext = new SecurityContextImpl(httpExchange, IDENTITY_MANAGER); - } - AdapterTokenStore tokenStore = getTokenStore(httpExchange, facade, deployment, securityContext); - tokenStore.checkCurrentToken(); - - LOG.fine("executing AuthenticatedActionsHandler"); - RequestAuthenticator authenticator = new UndertowRequestAuthenticator(facade, deployment, confidentialPort, securityContext, httpExchange, tokenStore); - AuthOutcome outcome = authenticator.authenticate(); - - if (outcome == AuthOutcome.AUTHENTICATED) { - LOG.fine("AUTHENTICATED"); - if (httpExchange.isResponseComplete()) { - return; - } - AuthenticatedActionsHandler actions = new AuthenticatedActionsHandler(deployment, facade); - if (actions.handledRequest()) { - return; - } else { - final Account authenticatedAccount = securityContext.getAuthenticatedAccount(); - if (authenticatedAccount instanceof KeycloakUndertowAccount) { - final KeycloakUndertowAccount kua = (KeycloakUndertowAccount) authenticatedAccount; - httpExchange.putAttachment(KEYCLOAK_PRINCIPAL_KEY, (KeycloakPrincipal) kua.getPrincipal()); - } - - Set roles = authenticatedAccount.getRoles(); - if (roles == null) { - roles = Collections.EMPTY_SET; - } - - LOG.log(Level.FINE, "Allowed roles: {0}, current roles: {1}", new Object[] {allowedRoles, roles}); - - if (isRoleAllowed(roles, httpExchange)) { - super.handleRequest(httpExchange); - } else { - httpExchange.setStatusCode(StatusCodes.FORBIDDEN); - } - - return; - } - } - - AuthChallenge challenge = authenticator.getChallenge(); - if (challenge != null) { - LOG.fine("challenge"); - challenge.challenge(facade); - return; - } - - httpExchange.setStatusCode(StatusCodes.FORBIDDEN); - } - - public boolean isRoleAllowed(Set roles, HttpServerExchange httpExchange) throws Exception { - for (String role : allowedRoles) { - if (roles.contains(role)) { - return true; - } - } - - return false; - } - - protected AdapterTokenStore getTokenStore(HttpServerExchange exchange, HttpFacade facade, KeycloakDeployment deployment, SecurityContext securityContext) { - if (deployment.getTokenStore() == TokenStore.SESSION) { - return new UndertowSessionTokenStore(exchange, deployment, userSessionManagement, securityContext); - } else { - return new UndertowCookieTokenStore(facade, deployment, securityContext); - } - } - - private boolean shouldSkip(String requestPath) { - return skipPattern != null && skipPattern.matcher(requestPath).matches(); - } - -} diff --git a/adapters/oidc/fuse7/camel-undertow/src/main/java/org/keycloak/adapters/camel/undertow/UndertowKeycloakEndpoint.java b/adapters/oidc/fuse7/camel-undertow/src/main/java/org/keycloak/adapters/camel/undertow/UndertowKeycloakEndpoint.java deleted file mode 100644 index a98d5abeda2..00000000000 --- a/adapters/oidc/fuse7/camel-undertow/src/main/java/org/keycloak/adapters/camel/undertow/UndertowKeycloakEndpoint.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.adapters.camel.undertow; - -import org.keycloak.KeycloakPrincipal; -import org.keycloak.adapters.AdapterDeploymentContext; -import org.keycloak.adapters.KeycloakConfigResolver; -import org.keycloak.adapters.KeycloakDeployment; -import org.keycloak.adapters.KeycloakDeploymentBuilder; -import org.keycloak.representations.adapters.config.AdapterConfig; -import io.undertow.server.HttpServerExchange; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.regex.Pattern; -import org.apache.camel.Consumer; -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.apache.camel.component.undertow.UndertowComponent; -import org.apache.camel.component.undertow.UndertowEndpoint; -import static org.keycloak.adapters.camel.undertow.UndertowKeycloakConsumer.KEYCLOAK_PRINCIPAL_KEY; - -/** - * - * @author hmlnarik - */ -public class UndertowKeycloakEndpoint extends UndertowEndpoint { - - private static final Logger LOG = Logger.getLogger(UndertowKeycloakEndpoint.class.getName()); - - private KeycloakConfigResolver configResolver; - - private AdapterConfig adapterConfig; - - private String skipPattern; - - private List allowedRoles = Collections.emptyList(); - - private int confidentialPort = 8443; - - public UndertowKeycloakEndpoint(String uri, UndertowComponent component) { - super(uri, component); - } - - public AdapterConfig getAdapterConfig() { - return adapterConfig; - } - - public void setAdapterConfig(AdapterConfig adapterConfig) { - LOG.info("adapterConfig"); - this.adapterConfig = adapterConfig; - } - - public String getSkipPattern() { - return skipPattern; - } - - public void setSkipPattern(String skipPattern) { - this.skipPattern = skipPattern; - } - - public List getAllowedRoles() { - return allowedRoles; - } - - public void setAllowedRoles(List allowedRoles) { - this.allowedRoles = allowedRoles; - } - - public void setAllowedRoles(String allowedRoles) { - this.allowedRoles = allowedRoles == null ? null : Arrays.asList(allowedRoles.split("\\s*,\\s*")); - } - - public int getConfidentialPort() { - return confidentialPort; - } - - public void setConfidentialPort(int confidentialPort) { - this.confidentialPort = confidentialPort; - } - - public KeycloakConfigResolver getConfigResolver() { - return configResolver; - } - - public void setConfigResolver(KeycloakConfigResolver configResolver) { - this.configResolver = configResolver; - } - - @Override - public Consumer createConsumer(Processor processor) throws Exception { - return new UndertowKeycloakConsumer(this, processor, getDeploymentContext(), getSkipPatternAsPattern(), computeAllowedRoles(), this.confidentialPort); - } - - public List computeAllowedRoles() { - List res = this.allowedRoles == null ? Collections.emptyList() : this.allowedRoles; - if (res.isEmpty()) { - LOG.warning("No roles were configured, Keycloak will deny every request"); - } - LOG.log(Level.FINE, "Allowed roles: {0}", res); - return res; - } - - @Override - public Exchange createExchange(HttpServerExchange httpExchange) throws Exception { - final Exchange res = super.createExchange(httpExchange); - - KeycloakPrincipal principal = httpExchange.getAttachment(KEYCLOAK_PRINCIPAL_KEY); - LOG.log(Level.FINE, "principal: {0}", principal); - if (principal != null) { - res.setProperty(KeycloakPrincipal.class.getName(), principal); - } - - return res; - } - - private AdapterDeploymentContext getDeploymentContext() { - if (configResolver != null) { - LOG.log(Level.INFO, "Using {0} to resolve Keycloak configuration on a per-request basis.", configResolver.getClass()); - return new AdapterDeploymentContext(configResolver); - } else if (adapterConfig != null) { - KeycloakDeployment kd = KeycloakDeploymentBuilder.build(adapterConfig); - return new AdapterDeploymentContext(kd); - } - - LOG.warning("Adapter is unconfigured, Keycloak will deny every request"); - return new AdapterDeploymentContext(); - } - - private Pattern getSkipPatternAsPattern() { - return skipPattern == null - ? null - : Pattern.compile(skipPattern, Pattern.DOTALL); - } -} diff --git a/adapters/oidc/fuse7/camel-undertow/src/main/resources/META-INF/services/org/apache/camel/component/undertow-keycloak b/adapters/oidc/fuse7/camel-undertow/src/main/resources/META-INF/services/org/apache/camel/component/undertow-keycloak deleted file mode 100644 index 145c1f829f3..00000000000 --- a/adapters/oidc/fuse7/camel-undertow/src/main/resources/META-INF/services/org/apache/camel/component/undertow-keycloak +++ /dev/null @@ -1 +0,0 @@ -class=org.keycloak.adapters.camel.undertow.UndertowKeycloakComponent \ No newline at end of file diff --git a/adapters/oidc/fuse7/jetty94/pom.xml b/adapters/oidc/fuse7/jetty94/pom.xml deleted file mode 100644 index 450b3e73adf..00000000000 --- a/adapters/oidc/fuse7/jetty94/pom.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - keycloak-fuse7-integration-pom - org.keycloak - 999-SNAPSHOT - ../pom.xml - - 4.0.0 - - keycloak-pax-web-jetty94 - Keycloak Fuse 7.0 Adapter - Jetty 9.4 - bundle - - - - org.keycloak.adapters.osgi.jetty94.*;version="${project.version}" - - - !org.keycloak.adapters.osgi.jetty94, - org.ops4j.pax.web.*;version="[7.1,9)", - org.keycloak.*;version="${project.version}", - *;resolution:=optional - - org.ops4j.pax.web.pax-web-jetty - - - - - org.jboss.logging - jboss-logging - provided - - - org.ops4j.pax.web - pax-web-api - provided - - - org.ops4j.pax.web - pax-web-spi - provided - - - org.osgi - org.osgi.core - provided - - - org.osgi - org.osgi.enterprise - provided - - - - org.keycloak - keycloak-jetty94-adapter - provided - - - org.eclipse.jetty - jetty-security - ${jetty9.version} - provided - - - - - - - - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.felix - maven-bundle-plugin - true - - - bundle-manifest - process-classes - - manifest - - - - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.export} - ${keycloak.osgi.fragment} - - - - - - diff --git a/adapters/oidc/fuse7/jetty94/src/main/java/org/keycloak/adapters/osgi/jetty94/KeycloakAuthenticatorService.java b/adapters/oidc/fuse7/jetty94/src/main/java/org/keycloak/adapters/osgi/jetty94/KeycloakAuthenticatorService.java deleted file mode 100644 index 30f767990af..00000000000 --- a/adapters/oidc/fuse7/jetty94/src/main/java/org/keycloak/adapters/osgi/jetty94/KeycloakAuthenticatorService.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.adapters.osgi.jetty94; - -import org.ops4j.pax.web.service.AuthenticatorService; - -/** - * - * @author hmlnarik - */ -public class KeycloakAuthenticatorService implements AuthenticatorService { - - @Override - public T getAuthenticatorService(String method, Class iface) { - if (method == null || iface != org.eclipse.jetty.security.Authenticator.class) { - return null; - } - - if ("KEYCLOAK".equalsIgnoreCase(method)) { - return iface.cast(new org.keycloak.adapters.jetty.KeycloakJettyAuthenticator()); - } - - return null; - } - -} diff --git a/adapters/oidc/fuse7/jetty94/src/main/java/org/keycloak/adapters/osgi/jetty94/PaxWebIntegrationService.java b/adapters/oidc/fuse7/jetty94/src/main/java/org/keycloak/adapters/osgi/jetty94/PaxWebIntegrationService.java deleted file mode 100644 index 7ba9094552c..00000000000 --- a/adapters/oidc/fuse7/jetty94/src/main/java/org/keycloak/adapters/osgi/jetty94/PaxWebIntegrationService.java +++ /dev/null @@ -1,280 +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.adapters.osgi.jetty94; - -import org.eclipse.jetty.security.ConstraintMapping; -import org.eclipse.jetty.util.security.Constraint; -import org.jboss.logging.Logger; -import org.ops4j.pax.web.service.WebContainer; -import org.ops4j.pax.web.service.spi.model.SecurityConstraintMappingModel; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; -import org.osgi.service.http.HttpContext; -import org.osgi.util.tracker.ServiceTracker; -import org.osgi.util.tracker.ServiceTrackerCustomizer; - -import java.net.URL; -import java.security.SecureRandom; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * Integration with pax-web, which allows to inject custom jetty-web.xml configuration from current bundle classpath into {@link WebContainer} - * and allows to inject custom security constraint for securing resources by Keycloak. - * - *

It assumes that pax-web {@link WebContainer} is used as implementation of OSGI {@link org.osgi.service.http.HttpService}, which - * is true in karaf/fuse environment

- * - * @author Marek Posolda - */ -public class PaxWebIntegrationService { - - protected static final Logger log = Logger.getLogger(PaxWebIntegrationService.class); - - private BundleContext bundleContext; - private String jettyWebXmlLocation; - private List constraintMappings; - - private ServiceTracker webContainerTracker; - private HttpContext httpContext; - - public BundleContext getBundleContext() { - return bundleContext; - } - - public void setBundleContext(BundleContext bundleContext) { - this.bundleContext = bundleContext; - } - - public String getJettyWebXmlLocation() { - return jettyWebXmlLocation; - } - - public void setJettyWebXmlLocation(String jettyWebXmlLocation) { - this.jettyWebXmlLocation = jettyWebXmlLocation; - } - - public List getConstraintMappings() { - return constraintMappings; - } - - public void setConstraintMappings(List constraintMappings) { - this.constraintMappings = constraintMappings; - } - - protected ServiceTracker getWebContainerTracker() { - return webContainerTracker; - } - - protected HttpContext getHttpContext() { - return httpContext; - } - - public void setHttpContext(HttpContext httpContext) { - this.httpContext = httpContext; - } - - public void start() { - ServiceTrackerCustomizer trackerCustomizer = new ServiceTrackerCustomizer() { - - @Override - public Object addingService(ServiceReference reference) { - return addingWebContainerCallback(reference); - } - - @Override - public void modifiedService(ServiceReference reference, Object service) { - } - - @Override - public void removedService(ServiceReference reference, Object service) { - removingWebContainerCallback(reference); - } - }; - - webContainerTracker = new ServiceTracker(bundleContext, WebContainer.class.getName(), trackerCustomizer); - webContainerTracker.open(); - } - - public void stop() { - webContainerTracker.remove(webContainerTracker.getServiceReference()); - } - - protected WebContainer addingWebContainerCallback(ServiceReference webContainerServiceReference) { - WebContainer service = (WebContainer) bundleContext.getService(webContainerServiceReference); - if (httpContext == null) { - httpContext = service.createDefaultHttpContext(); - } - - addJettyWebXml(service); - - if (constraintMappings == null) { - throw new IllegalStateException("constraintMappings was null!"); - } - List handlers = new ArrayList<>(); - try { - handlers.add(new JettyConstraintHandler()); - } catch (Throwable t) { - // Ignore - } - try { - handlers.add(new PaxWebConstraintHandler()); - } catch (Throwable t) { - // Ignore - } - for (Object constraintMapping : constraintMappings) { - boolean handled = false; - for (ConstraintHandler handler : handlers) { - handled |= handler.addConstraintMapping(httpContext, service, constraintMapping); - } - if (!handled) { - log.warnv("Unable to add constraint mapping for constraint of type " + constraintMapping.getClass().toString()); - } - } - - service.registerLoginConfig("BASIC", "does-not-matter", null, null, httpContext); - - return service; - } - - protected void addJettyWebXml(WebContainer service) { - String jettyWebXmlLoc; - if (this.jettyWebXmlLocation == null) { - jettyWebXmlLoc = "/WEB-INF/jetty-web.xml"; - } else { - jettyWebXmlLoc = this.jettyWebXmlLocation; - } - - URL jettyWebXml = bundleContext.getBundle().getResource(jettyWebXmlLoc); - if (jettyWebXml != null) { - log.debug("Found jetty-web XML configuration on bundle classpath on " + jettyWebXmlLoc); - service.registerJettyWebXml(jettyWebXml, httpContext); - } else { - log.debug("Not found jetty-web XML configuration on bundle classpath on " + jettyWebXmlLoc); - } - } - - protected void addConstraintMapping(WebContainer service, SecurityConstraintMappingModel constraintMapping) { - String name = constraintMapping.getConstraintName(); - if (name == null) { - name = "Constraint-" + new SecureRandom().nextInt(Integer.MAX_VALUE); - } - log.debug("Adding security constraint name=" + name + ", url=" + constraintMapping.getUrl() + ", dataConstraint=" + constraintMapping.getDataConstraint() + ", canAuthenticate=" - + constraintMapping.isAuthentication() + ", roles=" + constraintMapping.getRoles()); - service.registerConstraintMapping(name, constraintMapping.getMapping(), constraintMapping.getUrl(), constraintMapping.getDataConstraint(), constraintMapping.isAuthentication(), constraintMapping.getRoles(), httpContext); - } - - protected void addConstraintMapping(WebContainer service, ConstraintMapping constraintMapping) { - Constraint constraint = constraintMapping.getConstraint(); - String[] roles = constraint.getRoles(); - // name property is unavailable on constraint object :/ - - String name = "Constraint-" + new SecureRandom().nextInt(Integer.MAX_VALUE); - - int dataConstraint = constraint.getDataConstraint(); - String dataConstraintStr; - switch (dataConstraint) { - case Constraint.DC_UNSET: dataConstraintStr = null; break; - case Constraint.DC_NONE: dataConstraintStr = "NONE"; break; - case Constraint.DC_CONFIDENTIAL: dataConstraintStr = "CONFIDENTIAL"; break; - case Constraint.DC_INTEGRAL: dataConstraintStr = "INTEGRAL"; break; - default: - log.warnv("Unknown data constraint: " + dataConstraint); - dataConstraintStr = "CONFIDENTIAL"; - } - List rolesList = Arrays.asList(roles); - - log.debug("Adding security constraint name=" + name + ", url=" + constraintMapping.getPathSpec() + ", dataConstraint=" + dataConstraintStr + ", canAuthenticate=" - + constraint.getAuthenticate() + ", roles=" + rolesList); - service.registerConstraintMapping(name, null, constraintMapping.getPathSpec(), dataConstraintStr, constraint.getAuthenticate(), rolesList, httpContext); - } - - protected void removingWebContainerCallback(ServiceReference serviceReference) { - WebContainer service = (WebContainer)bundleContext.getService(serviceReference); - if (service != null) { - service.unregisterLoginConfig(httpContext); - service.unregisterConstraintMapping(httpContext); - } - } - - private interface ConstraintHandler { - boolean addConstraintMapping(HttpContext httpContext, WebContainer service, Object cm); - } - - private static class PaxWebConstraintHandler implements ConstraintHandler { - - public boolean addConstraintMapping(HttpContext httpContext, WebContainer service, Object cm) { - if (cm instanceof SecurityConstraintMappingModel) { - SecurityConstraintMappingModel constraintMapping = (SecurityConstraintMappingModel) cm; - String name = constraintMapping.getConstraintName(); - if (name == null) { - name = "Constraint-" + new SecureRandom().nextInt(Integer.MAX_VALUE); - } - log.debug("Adding security constraint name=" + name + ", url=" + constraintMapping.getUrl() + ", dataConstraint=" + constraintMapping.getDataConstraint() + ", canAuthenticate=" - + constraintMapping.isAuthentication() + ", roles=" + constraintMapping.getRoles()); - service.registerConstraintMapping(name, constraintMapping.getMapping(), constraintMapping.getUrl(), constraintMapping.getDataConstraint(), constraintMapping.isAuthentication(), constraintMapping.getRoles(), httpContext); - return true; - } - return false; - } - - } - - private static class JettyConstraintHandler implements ConstraintHandler { - - public boolean addConstraintMapping(HttpContext httpContext, WebContainer service, Object cm) { - if (cm instanceof ConstraintMapping) { - ConstraintMapping constraintMapping = (ConstraintMapping) cm; - Constraint constraint = constraintMapping.getConstraint(); - String[] roles = constraint.getRoles(); - // name property is unavailable on constraint object :/ - - String name = "Constraint-" + new SecureRandom().nextInt(Integer.MAX_VALUE); - - int dataConstraint = constraint.getDataConstraint(); - String dataConstraintStr; - switch (dataConstraint) { - case Constraint.DC_UNSET: - dataConstraintStr = null; - break; - case Constraint.DC_NONE: - dataConstraintStr = "NONE"; - break; - case Constraint.DC_CONFIDENTIAL: - dataConstraintStr = "CONFIDENTIAL"; - break; - case Constraint.DC_INTEGRAL: - dataConstraintStr = "INTEGRAL"; - break; - default: - log.warnv("Unknown data constraint: " + dataConstraint); - dataConstraintStr = "CONFIDENTIAL"; - } - List rolesList = Arrays.asList(roles); - - log.debug("Adding security constraint name=" + name + ", url=" + constraintMapping.getPathSpec() + ", dataConstraint=" + dataConstraintStr + ", canAuthenticate=" - + constraint.getAuthenticate() + ", roles=" + rolesList); - service.registerConstraintMapping(name, null, constraintMapping.getPathSpec(), dataConstraintStr, constraint.getAuthenticate(), rolesList, httpContext); - return true; - } - return false; - } - - } -} diff --git a/adapters/oidc/fuse7/jetty94/src/main/resources/META-INF/services/org.ops4j.pax.web.service.AuthenticatorService b/adapters/oidc/fuse7/jetty94/src/main/resources/META-INF/services/org.ops4j.pax.web.service.AuthenticatorService deleted file mode 100644 index cce9788ce7a..00000000000 --- a/adapters/oidc/fuse7/jetty94/src/main/resources/META-INF/services/org.ops4j.pax.web.service.AuthenticatorService +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.adapters.osgi.jetty94.KeycloakAuthenticatorService \ No newline at end of file diff --git a/adapters/oidc/fuse7/pom.xml b/adapters/oidc/fuse7/pom.xml deleted file mode 100644 index a75dafe724a..00000000000 --- a/adapters/oidc/fuse7/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - keycloak-parent - org.keycloak - 999-SNAPSHOT - ../../../pom.xml - - 4.0.0 - - keycloak-fuse7-integration-pom - pom - Keycloak Fuse 7.0 Integration - - - 7.0.1-SNAPSHOT - 9.4.2.v20170220 - - - - camel-undertow - undertow - - - - - community - - - !product - - - - jetty94 - tomcat8 - - - - diff --git a/adapters/oidc/fuse7/tomcat8/pom.xml b/adapters/oidc/fuse7/tomcat8/pom.xml deleted file mode 100644 index b8e18fbcc6f..00000000000 --- a/adapters/oidc/fuse7/tomcat8/pom.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - keycloak-fuse7-integration-pom - org.keycloak - 999-SNAPSHOT - ../pom.xml - - 4.0.0 - - keycloak-pax-web-tomcat8 - Keycloak Fuse 7.0 Adapter - Tomcat 8 - bundle - - - - org.keycloak.adapters.osgi.tomcat.*;version="${project.version}" - - - !org.keycloak.adapters.osgi.tomcat, - org.ops4j.pax.web.*;version="[7.1,9)", - org.keycloak.*;version="${project.version}", - *;resolution:=optional - - org.ops4j.pax.web.pax-web-tomcat - - - - - org.jboss.logging - jboss-logging - provided - - - org.ops4j.pax.web - pax-web-api - provided - - - - org.keycloak - keycloak-tomcat-adapter - provided - - - org.apache.tomcat - tomcat-catalina - ${tomcat8.version} - provided - - - - - - - - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.felix - maven-bundle-plugin - true - - - bundle-manifest - process-classes - - manifest - - - - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.export} - ${keycloak.osgi.fragment} - - - - - - diff --git a/adapters/oidc/fuse7/tomcat8/src/main/java/org/keycloak/adapters/osgi/tomcat/KeycloakAuthenticatorService.java b/adapters/oidc/fuse7/tomcat8/src/main/java/org/keycloak/adapters/osgi/tomcat/KeycloakAuthenticatorService.java deleted file mode 100644 index 04993b6c2c1..00000000000 --- a/adapters/oidc/fuse7/tomcat8/src/main/java/org/keycloak/adapters/osgi/tomcat/KeycloakAuthenticatorService.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.adapters.osgi.tomcat; - -import org.ops4j.pax.web.service.AuthenticatorService; - -/** - * - * @author hmlnarik - */ -public class KeycloakAuthenticatorService implements AuthenticatorService { - - @Override - public T getAuthenticatorService(String method, Class iface) { - if (method == null || iface != org.apache.catalina.Valve.class) { - return null; - } - - if ("KEYCLOAK".equalsIgnoreCase(method)) { - return iface.cast(new org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve()); - } - - return null; - } - -} diff --git a/adapters/oidc/fuse7/tomcat8/src/main/resources/META-INF/services/org.ops4j.pax.web.service.AuthenticatorService b/adapters/oidc/fuse7/tomcat8/src/main/resources/META-INF/services/org.ops4j.pax.web.service.AuthenticatorService deleted file mode 100644 index 19190807f49..00000000000 --- a/adapters/oidc/fuse7/tomcat8/src/main/resources/META-INF/services/org.ops4j.pax.web.service.AuthenticatorService +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.adapters.osgi.tomcat.KeycloakAuthenticatorService \ No newline at end of file diff --git a/adapters/oidc/fuse7/undertow/pom.xml b/adapters/oidc/fuse7/undertow/pom.xml deleted file mode 100644 index cffbe295dfa..00000000000 --- a/adapters/oidc/fuse7/undertow/pom.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - keycloak-fuse7-integration-pom - org.keycloak - 999-SNAPSHOT - ../pom.xml - - 4.0.0 - - keycloak-pax-web-undertow - Keycloak Fuse 7.0 Adapter - Undertow - bundle - - - 1.8 - 1.8 - - - org.keycloak.adapters.osgi.undertow.*;version="${project.version}" - - - !org.keycloak.adapters.osgi.undertow, - org.keycloak.*;version="${project.version}", - org.keycloak.adapters.osgi.*;version="${project.version}", - org.ops4j.pax.web.*;version="[7.1,9)", - javax.servlet.*;version="[3.1,5)";resolution:=optional, - org.apache.cxf.transport.http;resolution:=optional;version="[3,4)", - org.apache.cxf.transport.http_undertow;resolution:=optional;version="[3,4)", - org.apache.cxf.transport.servlet;resolution:=optional;version="[3,4)", - io.undertow.*;version="[1.4,3)", - *;resolution:=optional - - org.ops4j.pax.web.pax-web-undertow - - - - - org.jboss.logging - jboss-logging - provided - - - org.osgi - org.osgi.core - provided - - - org.osgi - org.osgi.enterprise - provided - - - org.ops4j.pax.web - pax-web-spi - provided - - - org.ops4j.pax.web - pax-web-api - provided - - - org.apache.cxf - cxf-rt-transports-http - ${cxf.version} - provided - - - org.apache.cxf - cxf-rt-transports-http-undertow - ${cxf.undertow.version} - provided - - - - io.undertow - undertow-servlet - provided - - - org.keycloak - keycloak-undertow-adapter - provided - - - org.keycloak - keycloak-osgi-adapter - provided - - - - - - - - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.felix - maven-bundle-plugin - true - - - bundle-manifest - process-classes - - manifest - - - - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.export} - ${keycloak.osgi.fragment} - - - - - - diff --git a/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/CxfKeycloakAuthHandler.java b/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/CxfKeycloakAuthHandler.java deleted file mode 100644 index 2c6fab765db..00000000000 --- a/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/CxfKeycloakAuthHandler.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.adapters.osgi.undertow; - -import org.keycloak.adapters.AdapterDeploymentContext; -import org.keycloak.adapters.KeycloakConfigResolver; -import org.keycloak.adapters.KeycloakDeployment; -import org.keycloak.adapters.KeycloakDeploymentBuilder; -import org.keycloak.adapters.NodesRegistrationManagement; -import org.keycloak.adapters.spi.InMemorySessionIdMapper; -import org.keycloak.adapters.spi.SessionIdMapper; -import org.keycloak.adapters.undertow.UndertowAuthenticationMechanism; -import org.keycloak.adapters.undertow.UndertowUserSessionManagement; -import org.keycloak.representations.adapters.config.AdapterConfig; -import io.undertow.security.api.AuthenticationMechanism; -import io.undertow.security.api.AuthenticationMode; -import io.undertow.security.handlers.AuthenticationCallHandler; -import io.undertow.security.handlers.AuthenticationConstraintHandler; -import io.undertow.security.handlers.AuthenticationMechanismsHandler; -import io.undertow.security.handlers.SecurityInitialHandler; -import io.undertow.security.idm.Account; -import io.undertow.security.idm.Credential; -import io.undertow.security.idm.IdentityManager; -import io.undertow.server.HttpHandler; -import io.undertow.server.HttpServerExchange; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.regex.Pattern; -import org.apache.cxf.transport.http_undertow.CXFUndertowHttpHandler; - -/** - * - * @author hmlnarik - */ -public class CxfKeycloakAuthHandler implements CXFUndertowHttpHandler { - - private static final Logger LOG = Logger.getLogger(CxfKeycloakAuthHandler.class.getName()); - - private static final IdentityManager IDENTITY_MANAGER = new IdentityManager() { - @Override - public Account verify(Account account) { - return account; - } - - @Override - public Account verify(String id, Credential credential) { - throw new IllegalStateException("Should never be called in Keycloak flow"); - } - - @Override - public Account verify(Credential credential) { - throw new IllegalStateException("Should never be called in Keycloak flow"); - } - }; - - private final UndertowUserSessionManagement userSessionManagement = new UndertowUserSessionManagement(); - - protected final NodesRegistrationManagement nodesRegistrationManagement = new NodesRegistrationManagement(); - - protected final SessionIdMapper idMapper = new InMemorySessionIdMapper(); - - private final AtomicReference securityHandler = new AtomicReference<>(); - - private Pattern skipPattern; - - private int confidentialPort = 8443; - - private HttpHandler next; - - private KeycloakConfigResolver configResolver; - - private AdapterConfig adapterConfig; - - @Override - public void handleRequest(HttpServerExchange exchange) throws Exception { - if (shouldSkip(exchange.getRequestPath())) { - next.handleRequest(exchange); - } else { - getSecurityHandler().handleRequest(exchange); - } - } - - private HttpHandler getSecurityHandler() { - if (this.securityHandler.get() == null) { - HttpHandler handler = this.next; - - handler = new AuthenticationCallHandler(handler); - handler = new AuthenticationConstraintHandler(handler); - - AdapterDeploymentContext deploymentContext = buildDeploymentContext(); - - final List mechanisms - = Collections.singletonList( - new UndertowAuthenticationMechanism(deploymentContext, userSessionManagement, nodesRegistrationManagement, confidentialPort, null)); - handler = new AuthenticationMechanismsHandler(handler, mechanisms); - - this.securityHandler.compareAndSet(null, new SecurityInitialHandler(AuthenticationMode.PRO_ACTIVE, IDENTITY_MANAGER, "KEYCLOAK", handler)); - } - - return this.securityHandler.get(); - } - - private AdapterDeploymentContext buildDeploymentContext() { - if (configResolver != null) { - LOG.log(Level.INFO, "Using {0} to resolve Keycloak configuration on a per-request basis.", configResolver.getClass()); - return new AdapterDeploymentContext(configResolver); - } else if (adapterConfig != null) { - KeycloakDeployment kd = KeycloakDeploymentBuilder.build(adapterConfig); - return new AdapterDeploymentContext(kd); - } - - LOG.warning("Adapter is unconfigured, Keycloak will deny every request"); - return new AdapterDeploymentContext(); - } - - @Override - public void setNext(HttpHandler nextHandler) { - this.next = nextHandler; - } - - private boolean shouldSkip(String requestPath) { - return skipPattern != null && skipPattern.matcher(requestPath).matches(); - } - - public KeycloakConfigResolver getConfigResolver() { - return configResolver; - } - - public void setConfigResolver(KeycloakConfigResolver configResolver) { - this.configResolver = configResolver; - } - - public int getConfidentialPort() { - return confidentialPort; - } - - public void setConfidentialPort(int confidentialPort) { - this.confidentialPort = confidentialPort; - } - - public AdapterConfig getAdapterConfig() { - return adapterConfig; - } - - public void setAdapterConfig(AdapterConfig adapterConfig) { - this.adapterConfig = adapterConfig; - } - - public String getSkipPattern() { - return skipPattern.pattern(); - } - - public void setSkipPattern(String skipPattern) { - this.skipPattern = Pattern.compile(skipPattern, Pattern.DOTALL); - } - -} diff --git a/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/KeycloakAuthenticatorService.java b/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/KeycloakAuthenticatorService.java deleted file mode 100644 index e248c7c0545..00000000000 --- a/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/KeycloakAuthenticatorService.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.adapters.osgi.undertow; - -import org.ops4j.pax.web.service.AuthenticatorService; - -/** - * - * @author hmlnarik - */ -public class KeycloakAuthenticatorService implements AuthenticatorService { - - @Override - public T getAuthenticatorService(String method, Class iface) { - if (method == null || iface != io.undertow.servlet.ServletExtension.class) { - return null; - } - - if ("KEYCLOAK".equalsIgnoreCase(method)) { - return iface.cast(new org.keycloak.adapters.undertow.KeycloakServletExtension()); - } - - return null; - } - -} diff --git a/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/PaxWebIntegrationService.java b/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/PaxWebIntegrationService.java deleted file mode 100644 index 89699d62c65..00000000000 --- a/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/PaxWebIntegrationService.java +++ /dev/null @@ -1,142 +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.adapters.osgi.undertow; - -import org.keycloak.adapters.osgi.PaxWebSecurityConstraintMapping; -import org.jboss.logging.Logger; -import org.ops4j.pax.web.service.WebContainer; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; -import org.osgi.service.http.HttpContext; -import org.osgi.util.tracker.ServiceTracker; -import org.osgi.util.tracker.ServiceTrackerCustomizer; - -import java.util.List; - -/** - * Integration with pax-web, which allows to inject custom security constraint for securing resources by Keycloak. - * - *

It assumes that pax-web {@link WebContainer} is used as implementation of OSGI {@link org.osgi.service.http.HttpService}, which - * is true in karaf/fuse environment

- * - * @author Marek Posolda - */ -public class PaxWebIntegrationService { - - protected static final Logger log = Logger.getLogger(PaxWebIntegrationService.class); - - private BundleContext bundleContext; - private List constraintMappings; - - private ServiceTracker webContainerTracker; - private HttpContext httpContext; - - public BundleContext getBundleContext() { - return bundleContext; - } - - public void setBundleContext(BundleContext bundleContext) { - this.bundleContext = bundleContext; - } - - public List getConstraintMappings() { - return constraintMappings; - } - - public void setConstraintMappings(List constraintMappings) { - this.constraintMappings = constraintMappings; - } - - protected ServiceTracker getWebContainerTracker() { - return webContainerTracker; - } - - protected HttpContext getHttpContext() { - return httpContext; - } - - public void setHttpContext(HttpContext httpContext) { - this.httpContext = httpContext; - } - - public void start() { - ServiceTrackerCustomizer trackerCustomizer = new ServiceTrackerCustomizer() { - - @Override - public Object addingService(ServiceReference reference) { - return addingWebContainerCallback(reference); - } - - @Override - public void modifiedService(ServiceReference reference, Object service) { - } - - @Override - public void removedService(ServiceReference reference, Object service) { - removingWebContainerCallback(reference); - } - }; - - webContainerTracker = new ServiceTracker(bundleContext, WebContainer.class.getName(), trackerCustomizer); - webContainerTracker.open(); - } - - public void stop() { - webContainerTracker.remove(webContainerTracker.getServiceReference()); - } - - protected WebContainer addingWebContainerCallback(ServiceReference webContainerServiceReference) { - WebContainer service = (WebContainer) bundleContext.getService(webContainerServiceReference); - if (httpContext == null) { - httpContext = service.createDefaultHttpContext(); - } - - if (constraintMappings == null) { - throw new IllegalStateException("constraintMappings was null!"); - } - for (PaxWebSecurityConstraintMapping constraintMapping : constraintMappings) { - addConstraintMapping(service, constraintMapping); - } - - service.registerLoginConfig("KEYCLOAK", "specified-in-keycloak-json", null, null, httpContext); - - return service; - } - - protected void addConstraintMapping(WebContainer service, PaxWebSecurityConstraintMapping cm) { - log.debug("Adding security constraint name=" + cm.getConstraintName() + ", url=" + cm.getUrl() + ", dataConstraint=" + cm.getDataConstraint() + ", canAuthenticate=" - + cm.isAuthentication() + ", roles=" + cm.getRoles()); - service.registerConstraintMapping( - cm.getConstraintName(), - cm.getMapping(), - cm.getUrl(), - cm.getDataConstraint(), - cm.isAuthentication(), - cm.getRoles(), - httpContext - ); - } - - protected void removingWebContainerCallback(ServiceReference serviceReference) { - WebContainer service = (WebContainer)bundleContext.getService(serviceReference); - if (service != null) { - service.unregisterLoginConfig(httpContext); - service.unregisterConstraintMapping(httpContext); - } - } -} \ No newline at end of file diff --git a/adapters/oidc/fuse7/undertow/src/main/resources/META-INF/services/org.ops4j.pax.web.service.AuthenticatorService b/adapters/oidc/fuse7/undertow/src/main/resources/META-INF/services/org.ops4j.pax.web.service.AuthenticatorService deleted file mode 100644 index 969a4f0d9b7..00000000000 --- a/adapters/oidc/fuse7/undertow/src/main/resources/META-INF/services/org.ops4j.pax.web.service.AuthenticatorService +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.adapters.osgi.undertow.KeycloakAuthenticatorService \ No newline at end of file diff --git a/adapters/oidc/osgi-adapter/pom.xml b/adapters/oidc/osgi-adapter/pom.xml deleted file mode 100755 index 5b2904f387d..00000000000 --- a/adapters/oidc/osgi-adapter/pom.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - keycloak-parent - org.keycloak - 999-SNAPSHOT - ../../../pom.xml - - 4.0.0 - - keycloak-osgi-adapter - Keycloak OSGI Adapter - jar - - - 1.8 - 1.8 - - 8.1.17.v20150415 - - org.keycloak.adapters.osgi.* - - - org.ops4j.pax.web.*;version="[3.0,8)", - javax.servlet.*;version="[3.1,5)";resolution:=optional, - org.eclipse.jetty.*;version="[8.1,10)";resolution:=optional, - org.keycloak.*;version="${project.version}", - org.apache.cxf.transport.http;resolution:=optional;version="[3,4)", - org.apache.cxf.transport.servlet;resolution:=optional;version="[3,4)", - *;resolution:=optional - - - - - - org.keycloak - keycloak-core - provided - - - org.keycloak - keycloak-adapter-core - provided - - - org.keycloak - keycloak-adapter-spi - provided - - - org.jboss.logging - jboss-logging - provided - - - org.osgi - org.osgi.core - provided - - - org.osgi - org.osgi.enterprise - provided - - - org.ops4j.pax.web - pax-web-api - provided - - - org.eclipse.jetty - jetty-security - ${jetty9.version} - provided - - - org.apache.cxf - cxf-rt-transports-http - ${cxf.version} - provided - - - org.apache.httpcomponents - httpclient - provided - - - - junit - junit - test - - - - - - - - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.felix - maven-bundle-plugin - true - - - bundle-manifest - process-classes - - manifest - - - - - - . - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.export} - - - - - - diff --git a/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/BundleBasedKeycloakConfigResolver.java b/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/BundleBasedKeycloakConfigResolver.java deleted file mode 100644 index 8b73767f17c..00000000000 --- a/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/BundleBasedKeycloakConfigResolver.java +++ /dev/null @@ -1,83 +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.adapters.osgi; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; - -import org.keycloak.adapters.KeycloakConfigResolver; -import org.keycloak.adapters.KeycloakDeployment; -import org.keycloak.adapters.KeycloakDeploymentBuilder; -import org.keycloak.adapters.spi.HttpFacade; -import org.osgi.framework.BundleContext; - -/** - * @author Marek Posolda - */ -public class BundleBasedKeycloakConfigResolver implements KeycloakConfigResolver { - - private volatile KeycloakDeployment cachedDeployment; - - private BundleContext bundleContext; - private String configLocation = "WEB-INF/keycloak.json"; - - public BundleContext getBundleContext() { - return bundleContext; - } - - public void setBundleContext(BundleContext bundleContext) { - this.bundleContext = bundleContext; - } - - public String getConfigLocation() { - return configLocation; - } - - public void setConfigLocation(String configLocation) { - this.configLocation = configLocation; - } - - @Override - public KeycloakDeployment resolve(HttpFacade.Request request) { - if (cachedDeployment != null) { - return cachedDeployment; - } else { - cachedDeployment = findDeployment(request); - return cachedDeployment; - } - } - - protected KeycloakDeployment findDeployment(HttpFacade.Request request) { - if (bundleContext == null) { - throw new IllegalStateException("bundleContext must be set for BundleBasedKeycloakConfigResolver!"); - } - - URL url = bundleContext.getBundle().getResource(configLocation); - if (url == null) { - throw new IllegalStateException("Failed to find the file " + configLocation + " on classpath."); - } - - try { - InputStream is = url.openStream(); - return KeycloakDeploymentBuilder.build(is); - } catch (IOException ioe) { - throw new IllegalStateException("Error reading file' " + configLocation + "' from bundle classpath.", ioe); - } - } -} diff --git a/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/HierarchicalPathBasedKeycloakConfigResolver.java b/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/HierarchicalPathBasedKeycloakConfigResolver.java deleted file mode 100644 index 06d01215d98..00000000000 --- a/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/HierarchicalPathBasedKeycloakConfigResolver.java +++ /dev/null @@ -1,89 +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.adapters.osgi; - -import java.net.URI; -import java.util.ArrayList; -import java.util.List; - -import org.jboss.logging.Logger; -import org.keycloak.adapters.KeycloakConfigResolver; -import org.keycloak.adapters.KeycloakDeployment; -import org.keycloak.adapters.OIDCHttpFacade; - -/** - * This {@link KeycloakConfigResolver} tries to resolve most specific configuration for given URI path. If not found, - * parent path is checked up to top-level path. - */ -public class HierarchicalPathBasedKeycloakConfigResolver extends PathBasedKeycloakConfigResolver { - - protected static final Logger log = Logger.getLogger(HierarchicalPathBasedKeycloakConfigResolver.class); - - public HierarchicalPathBasedKeycloakConfigResolver() { - prepopulateCache(); - } - - @Override - public KeycloakDeployment resolve(OIDCHttpFacade.Request request) { - // we cached all available deployments initially and now we'll try to check them from - // most specific to most general - URI uri = URI.create(request.getURI()); - String path = uri.getPath(); - if (path != null) { - while (path.startsWith("/")) { - path = path.substring(1); - } - String[] segments = path.split("/"); - List paths = collectPaths(segments); - for (String pathFragment: paths) { - KeycloakDeployment cachedDeployment = super.getCachedDeployment(pathFragment); - if (cachedDeployment != null) { - return cachedDeployment; - } - } - } - - throw new IllegalStateException("Can't find Keycloak configuration related to URI path " + uri); - } - - /** - *

For segments like "a, b, c, d", returns:

    - *
  • "a-b-c-d"
  • - *
  • "a-b-c"
  • - *
  • "a-b"
  • - *
  • "a"
  • - *
  • ""
  • - *

- * @param segments - * @return - */ - private List collectPaths(String[] segments) { - List result = new ArrayList<>(segments.length + 1); - for (int idx = segments.length; idx >= 0; idx--) { - StringBuilder sb = null; - for (int i = 0; i < idx; i++) { - if (sb == null) { - sb = new StringBuilder(); - } - sb.append("-").append(segments[i]); - } - result.add(sb == null ? "" : sb.toString().substring(1)); - } - return result; - } - -} diff --git a/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/PathBasedKeycloakConfigResolver.java b/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/PathBasedKeycloakConfigResolver.java deleted file mode 100644 index 35f43de62ab..00000000000 --- a/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/PathBasedKeycloakConfigResolver.java +++ /dev/null @@ -1,184 +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.adapters.osgi; - -import org.jboss.logging.Logger; -import org.keycloak.adapters.KeycloakConfigResolver; -import org.keycloak.adapters.KeycloakDeployment; -import org.keycloak.adapters.KeycloakDeploymentBuilder; -import org.keycloak.adapters.OIDCHttpFacade; -import org.keycloak.adapters.spi.HttpFacade; - -import java.io.File; -import java.io.FileFilter; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.net.URI; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -public class PathBasedKeycloakConfigResolver implements KeycloakConfigResolver { - - protected static final Logger log = Logger.getLogger(PathBasedKeycloakConfigResolver.class); - - private final Map cache = new ConcurrentHashMap(); - - private File keycloakConfigLocation = null; - - public PathBasedKeycloakConfigResolver() { - String location = null; - String keycloakConfig = (String) System.getProperties().get("keycloak.config"); - if (keycloakConfig != null && !"".equals(keycloakConfig.trim())) { - location = keycloakConfig; - } else { - String karafEtc = (String) System.getProperties().get("karaf.etc"); - if (karafEtc != null && !"".equals(karafEtc.trim())) { - location = karafEtc; - } - } - if (location != null) { - File loc = new File(location); - if (loc.isDirectory()) { - keycloakConfigLocation = loc; - } - } - } - - @Override - public KeycloakDeployment resolve(OIDCHttpFacade.Request request) { - String webContext = getDeploymentKeyForURI(request); - - return getOrCreateDeployment(webContext); - } - - /** - * {@code pathFragment} is a key for {@link KeycloakDeployment deployments}. The key is used to construct - * a path relative to {@code keycloak.config} or {@code karaf.etc} system properties. - * For given key, {@code -keycloak.json} file is checked. - * @param pathFragment - * @return - */ - protected synchronized KeycloakDeployment getOrCreateDeployment(String pathFragment) { - KeycloakDeployment deployment = getCachedDeployment(pathFragment); - if (null == deployment) { - // not found on the simple cache, try to load it from the file system - if (keycloakConfigLocation == null) { - throw new IllegalStateException("Neither \"keycloak.config\" nor \"karaf.etc\" java properties are set." + - " Please set one of them."); - } - - File configuration = new File(keycloakConfigLocation, pathFragment + ("".equals(pathFragment) ? "" : "-") - + "keycloak.json"); - if (!cacheConfiguration(pathFragment, configuration)) { - throw new IllegalStateException("Not able to read the file " + configuration); - } - deployment = getCachedDeployment(pathFragment); - } - - return deployment; - } - - protected synchronized KeycloakDeployment getCachedDeployment(String pathFragment) { - return cache.get(pathFragment); - } - - /** - * If there's a need, we can pre populate the cache of deployments. - */ - protected void prepopulateCache() { - if (keycloakConfigLocation == null || !keycloakConfigLocation.isDirectory()) { - log.warn("Can't cache Keycloak configurations. No configuration storage is accessible." + - " Please set either \"keycloak.config\" or \"karaf.etc\" system properties"); - return; - } - - File[] configs = keycloakConfigLocation.listFiles(new FileFilter() { - @Override - public boolean accept(File pathname) { - return pathname.isFile() && pathname.getName().endsWith("keycloak.json"); - } - }); - if (configs != null) { - for (File config: configs) { - String pathFragment = null; - if ("keycloak.json".equals(config.getName())) { - pathFragment = ""; - } else if (config.getName().endsWith("-keycloak.json")) { - pathFragment = config.getName() - .substring(0, config.getName().length() - "-keycloak.json".length()); - } - cacheConfiguration(pathFragment, config); - } - } - } - - private boolean cacheConfiguration(String key, File config) { - try { - InputStream is = new FileInputStream(config); - KeycloakDeployment deployment = KeycloakDeploymentBuilder.build(is); - cache.put(key, deployment); - return true; - } catch (FileNotFoundException | RuntimeException e) { - log.warn("Can't cache " + config + ": " + e.getMessage(), e); - return false; - } - } - - /** - * Finds a context path from given {@link HttpFacade.Request}. For default context, first path segment - * is returned. - * @param request - * @return - */ - private String getDeploymentKeyForURI(HttpFacade.Request request) { - String uri = request.getURI(); - String relativePath = request.getRelativePath(); - String webContext = null; - if (relativePath == null || !uri.contains(relativePath)) { - String[] urlTokens = uri.split("/"); - if (urlTokens.length < 4) { - throw new IllegalStateException("Not able to determine the web-context to load the correspondent keycloak.json file"); - } - - webContext = urlTokens[3]; - } else { - URI parsedURI = URI.create(uri); - String path = parsedURI.getPath(); - if (path.contains(relativePath)) { - path = path.substring(0, path.indexOf(relativePath)); - } - while (path.startsWith("/")) { - path = path.substring(1); - } - webContext = path; - if ("".equals(webContext)) { - path = relativePath; - while (path.startsWith("/")) { - path = path.substring(1); - } - if (path.contains("/")) { - path = path.substring(0, path.indexOf("/")); - } - webContext = path; - } - } - - return webContext; - } - -} diff --git a/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/PaxWebIntegrationService.java b/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/PaxWebIntegrationService.java deleted file mode 100644 index 03b19649c8e..00000000000 --- a/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/PaxWebIntegrationService.java +++ /dev/null @@ -1,276 +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.adapters.osgi; - -import org.eclipse.jetty.security.ConstraintMapping; -import org.eclipse.jetty.util.security.Constraint; -import org.jboss.logging.Logger; -import org.ops4j.pax.web.service.WebContainer; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; -import org.osgi.service.http.HttpContext; -import org.osgi.util.tracker.ServiceTracker; -import org.osgi.util.tracker.ServiceTrackerCustomizer; - -import java.net.URL; -import java.security.SecureRandom; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * Integration with pax-web in Fuse 6.3, which allows to inject custom jetty-web.xml configuration from current bundle classpath into {@link WebContainer} - * and allows to inject custom security constraint for securing resources by Keycloak. - * - *

It assumes that pax-web {@link WebContainer} is used as implementation of OSGI {@link org.osgi.service.http.HttpService}, which - * is true in karaf/fuse environment

- * - * @author Marek Posolda - */ -public class PaxWebIntegrationService { - - protected static final Logger log = Logger.getLogger(PaxWebIntegrationService.class); - - private BundleContext bundleContext; - private String jettyWebXmlLocation; - private List constraintMappings; - - private ServiceTracker webContainerTracker; - private HttpContext httpContext; - - public BundleContext getBundleContext() { - return bundleContext; - } - - public void setBundleContext(BundleContext bundleContext) { - this.bundleContext = bundleContext; - } - - public String getJettyWebXmlLocation() { - return jettyWebXmlLocation; - } - - public void setJettyWebXmlLocation(String jettyWebXmlLocation) { - this.jettyWebXmlLocation = jettyWebXmlLocation; - } - - public List getConstraintMappings() { - return constraintMappings; - } - - public void setConstraintMappings(List constraintMappings) { - this.constraintMappings = constraintMappings; - } - - protected ServiceTracker getWebContainerTracker() { - return webContainerTracker; - } - - protected HttpContext getHttpContext() { - return httpContext; - } - - - public void start() { - ServiceTrackerCustomizer trackerCustomizer = new ServiceTrackerCustomizer() { - - @Override - public Object addingService(ServiceReference reference) { - return addingWebContainerCallback(reference); - } - - @Override - public void modifiedService(ServiceReference reference, Object service) { - } - - @Override - public void removedService(ServiceReference reference, Object service) { - removingWebContainerCallback(reference); - } - }; - - webContainerTracker = new ServiceTracker(bundleContext, WebContainer.class.getName(), trackerCustomizer); - webContainerTracker.open(); - } - - public void stop() { - webContainerTracker.remove(webContainerTracker.getServiceReference()); - } - - protected WebContainer addingWebContainerCallback(ServiceReference webContainerServiceReference) { - WebContainer service = (WebContainer) bundleContext.getService(webContainerServiceReference); - httpContext = service.createDefaultHttpContext(); - - addJettyWebXml(service); - - if (constraintMappings == null) { - throw new IllegalStateException("constraintMappings was null!"); - } - List handlers = new ArrayList<>(); - try { - handlers.add(new JettyConstraintHandler()); - } catch (Throwable t) { - // Ignore - } - try { - handlers.add(new PaxWebConstraintHandler()); - } catch (Throwable t) { - // Ignore - } - for (Object constraintMapping : constraintMappings) { - boolean handled = false; - for (ConstraintHandler handler : handlers) { - handled |= handler.addConstraintMapping(httpContext, service, constraintMapping); - } - if (!handled) { - log.warnv("Unable to add constraint mapping for constraint of type " + constraintMapping.getClass().toString()); - } - } - - service.registerLoginConfig("BASIC", "does-not-matter", null, null, httpContext); - - return service; - } - - protected void addJettyWebXml(WebContainer service) { - String jettyWebXmlLoc; - if (this.jettyWebXmlLocation == null) { - jettyWebXmlLoc = "/WEB-INF/jetty-web.xml"; - } else { - jettyWebXmlLoc = this.jettyWebXmlLocation; - } - - URL jettyWebXml = bundleContext.getBundle().getResource(jettyWebXmlLoc); - if (jettyWebXml != null) { - log.debug("Found jetty-web XML configuration on bundle classpath on " + jettyWebXmlLoc); - service.registerJettyWebXml(jettyWebXml, httpContext); - } else { - log.debug("Not found jetty-web XML configuration on bundle classpath on " + jettyWebXmlLoc); - } - } - - protected void addConstraintMapping(WebContainer service, PaxWebSecurityConstraintMapping constraintMapping) { - String name = constraintMapping.getConstraintName(); - if (name == null) { - name = "Constraint-" + new SecureRandom().nextInt(Integer.MAX_VALUE); - } - log.debug("Adding security constraint name=" + name + ", url=" + constraintMapping.getUrl() + ", dataConstraint=" + constraintMapping.getDataConstraint() + ", canAuthenticate=" - + constraintMapping.isAuthentication() + ", roles=" + constraintMapping.getRoles()); - service.registerConstraintMapping(name, constraintMapping.getMapping(), constraintMapping.getUrl(), constraintMapping.getDataConstraint(), constraintMapping.isAuthentication(), constraintMapping.getRoles(), httpContext); - } - - protected void addConstraintMapping(WebContainer service, ConstraintMapping constraintMapping) { - Constraint constraint = constraintMapping.getConstraint(); - String[] roles = constraint.getRoles(); - // name property is unavailable on constraint object :/ - - String name = "Constraint-" + new SecureRandom().nextInt(Integer.MAX_VALUE); - - int dataConstraint = constraint.getDataConstraint(); - String dataConstraintStr; - switch (dataConstraint) { - case Constraint.DC_UNSET: dataConstraintStr = null; break; - case Constraint.DC_NONE: dataConstraintStr = "NONE"; break; - case Constraint.DC_CONFIDENTIAL: dataConstraintStr = "CONFIDENTIAL"; break; - case Constraint.DC_INTEGRAL: dataConstraintStr = "INTEGRAL"; break; - default: - log.warnv("Unknown data constraint: " + dataConstraint); - dataConstraintStr = "CONFIDENTIAL"; - } - List rolesList = Arrays.asList(roles); - - log.debug("Adding security constraint name=" + name + ", url=" + constraintMapping.getPathSpec() + ", dataConstraint=" + dataConstraintStr + ", canAuthenticate=" - + constraint.getAuthenticate() + ", roles=" + rolesList); - service.registerConstraintMapping(name, null, constraintMapping.getPathSpec(), dataConstraintStr, constraint.getAuthenticate(), rolesList, httpContext); - } - - protected void removingWebContainerCallback(ServiceReference serviceReference) { - WebContainer service = (WebContainer)bundleContext.getService(serviceReference); - if (service != null) { - service.unregisterLoginConfig(httpContext); - service.unregisterConstraintMapping(httpContext); - } - } - - private interface ConstraintHandler { - boolean addConstraintMapping(HttpContext httpContext, WebContainer service, Object cm); - } - - private static class PaxWebConstraintHandler implements ConstraintHandler { - - @Override - public boolean addConstraintMapping(HttpContext httpContext, WebContainer service, Object cm) { - if (cm instanceof PaxWebSecurityConstraintMapping) { - PaxWebSecurityConstraintMapping constraintMapping = (PaxWebSecurityConstraintMapping) cm; - String name = constraintMapping.getConstraintName(); - if (name == null) { - name = "Constraint-" + new SecureRandom().nextInt(Integer.MAX_VALUE); - } - log.debug("Adding security constraint name=" + name + ", url=" + constraintMapping.getUrl() + ", dataConstraint=" + constraintMapping.getDataConstraint() + ", canAuthenticate=" - + constraintMapping.isAuthentication() + ", roles=" + constraintMapping.getRoles()); - service.registerConstraintMapping(name, constraintMapping.getMapping(), constraintMapping.getUrl(), constraintMapping.getDataConstraint(), constraintMapping.isAuthentication(), constraintMapping.getRoles(), httpContext); - return true; - } - return false; - } - - } - - private static class JettyConstraintHandler implements ConstraintHandler { - - @Override - public boolean addConstraintMapping(HttpContext httpContext, WebContainer service, Object cm) { - if (cm instanceof ConstraintMapping) { - ConstraintMapping constraintMapping = (ConstraintMapping) cm; - Constraint constraint = constraintMapping.getConstraint(); - String[] roles = constraint.getRoles(); - // name property is unavailable on constraint object :/ - - String name = "Constraint-" + new SecureRandom().nextInt(Integer.MAX_VALUE); - - int dataConstraint = constraint.getDataConstraint(); - String dataConstraintStr; - switch (dataConstraint) { - case Constraint.DC_UNSET: - dataConstraintStr = null; - break; - case Constraint.DC_NONE: - dataConstraintStr = "NONE"; - break; - case Constraint.DC_CONFIDENTIAL: - dataConstraintStr = "CONFIDENTIAL"; - break; - case Constraint.DC_INTEGRAL: - dataConstraintStr = "INTEGRAL"; - break; - default: - log.warnv("Unknown data constraint: " + dataConstraint); - dataConstraintStr = "CONFIDENTIAL"; - } - List rolesList = Arrays.asList(roles); - - log.debug("Adding security constraint name=" + name + ", url=" + constraintMapping.getPathSpec() + ", dataConstraint=" + dataConstraintStr + ", canAuthenticate=" - + constraint.getAuthenticate() + ", roles=" + rolesList); - service.registerConstraintMapping(name, "", constraintMapping.getPathSpec(), dataConstraintStr, constraint.getAuthenticate(), rolesList, httpContext); - return true; - } - return false; - } - - } -} diff --git a/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/PaxWebSecurityConstraintMapping.java b/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/PaxWebSecurityConstraintMapping.java deleted file mode 100644 index d73baf297ce..00000000000 --- a/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/PaxWebSecurityConstraintMapping.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package org.keycloak.adapters.osgi; - -import java.security.SecureRandom; -import java.util.LinkedList; -import java.util.List; - -/** - * - * @author hmlnarik - */ -public class PaxWebSecurityConstraintMapping { - - private String constraintName = "Constraint-" + new SecureRandom().nextInt(Integer.MAX_VALUE); - private String mapping; - private String url; - private String dataConstraint = "NONE"; - private boolean authentication = true; - private List roles = new LinkedList<>(); - - public String getConstraintName() { - return constraintName; - } - - public void setConstraintName(String constraintName) { - this.constraintName = constraintName; - } - - public String getMapping() { - return mapping; - } - - public void setMapping(String mapping) { - this.mapping = mapping; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getDataConstraint() { - return dataConstraint; - } - - public void setDataConstraint(String dataConstraint) { - this.dataConstraint = dataConstraint; - } - - public boolean isAuthentication() { - return authentication; - } - - public void setAuthentication(boolean authentication) { - this.authentication = authentication; - } - - public List getRoles() { - return roles; - } - - public void setRoles(List roles) { - this.roles = roles; - } - -} diff --git a/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/ServletReregistrationService.java b/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/ServletReregistrationService.java deleted file mode 100644 index 269b3cd5fb0..00000000000 --- a/adapters/oidc/osgi-adapter/src/main/java/org/keycloak/adapters/osgi/ServletReregistrationService.java +++ /dev/null @@ -1,254 +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.adapters.osgi; - -import org.apache.cxf.transport.http.DestinationRegistry; -import org.apache.cxf.transport.servlet.CXFNonSpringServlet; -import org.jboss.logging.Logger; -import org.ops4j.pax.web.service.WebContainer; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; -import org.osgi.service.cm.Configuration; -import org.osgi.service.cm.ConfigurationAdmin; -import org.osgi.service.http.HttpContext; -import org.osgi.util.tracker.ServiceTracker; -import org.osgi.util.tracker.ServiceTrackerCustomizer; - -import javax.servlet.Servlet; -import java.util.Arrays; -import java.util.Dictionary; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.List; -import java.util.Properties; - -/** - * Service, which allows to remove previously registered servlets in karaf/fuse environment. It assumes that particular servlet was previously - * registered as service in OSGI container under {@link javax.servlet.Servlet} interface. - * - *

The point is to register automatically registered builtin servlet endpoints (like "/cxf" for instance) to allow secure them - * by Keycloak and re-register them again

- * - * @author Marek Posolda - */ -public class ServletReregistrationService { - - private static final String CXF_SERVLET_PREFIX = "org.apache.cxf.servlet."; - protected static final Logger log = Logger.getLogger(ServletReregistrationService.class); - - private static final List FILTERED_PROPERTIES = Arrays.asList("objectClass", "service.id"); - - private BundleContext bundleContext; - private ServiceReference managedServiceReference; - private ServiceTracker webContainerTracker; - private String alias; - - public BundleContext getBundleContext() { - return bundleContext; - } - - public void setBundleContext(BundleContext bundleContext) { - this.bundleContext = bundleContext; - } - - - public void start() { - if ( managedServiceReference == null) { - return; - } - - Dictionary properties = obtainProperties(); - alias = (String)getProp(properties, CXF_SERVLET_PREFIX + "context", "/cxf"); - if(alias == null){ - alias = "/cxf"; - } - - WebContainer externalWebContainer = findExternalWebContainer(); - if (externalWebContainer == null) { - return; - } - - // Unregister servlet from external container now - try { - externalWebContainer.unregister(alias); - log.debug("Original servlet with alias " + getAlias() + " unregistered successfully from external web container."); - } catch (IllegalStateException e) { - log.warn("Can't unregister servlet due to: " + e.getMessage()); - } - - final Dictionary finalProperties = properties; - ServiceTrackerCustomizer trackerCustomizer = new ServiceTrackerCustomizer() { - - @Override - public Object addingService(ServiceReference webContainerServiceReference) { - WebContainer ourWebContainer = (WebContainer) bundleContext.getService(webContainerServiceReference); - registerServlet(ourWebContainer, finalProperties); - log.debugv("Servlet with alias " + getAlias() + " registered to secured web container"); - return ourWebContainer; - } - - @Override - public void modifiedService(ServiceReference reference, Object service) { - } - - @Override - public void removedService(ServiceReference webContainerServiceReference, Object service) { - WebContainer ourWebContainer = (WebContainer) bundleContext.getService(webContainerServiceReference); - String alias = getAlias(); - ourWebContainer.unregister(alias); - log.debug("Servlet with alias " + getAlias() + " unregistered from secured web container"); - } - }; - - webContainerTracker = new ServiceTracker(bundleContext, WebContainer.class.getName(), trackerCustomizer); - webContainerTracker.open(); - } - - public void stop() { - // Stop tracking our container now and removing reference. This should unregister servlet from our container via trackerCustomizer.removedService (if it's not already unregistered) - webContainerTracker.remove(webContainerTracker.getServiceReference()); - - // Re-register servlet back to original context - WebContainer externalWebContainer = findExternalWebContainer(); - registerServlet(externalWebContainer, obtainProperties()); - log.debug("Servlet with alias " + getAlias() + " registered back to external web container"); - } - - private String getAlias() { - return alias; - } - - /** - * Code comes from org.apache.cxf.transport.http.osgi.ServletExporter#updated(java.util.Dictionary) - * @param webContainer - * @param properties - */ - protected void registerServlet(WebContainer webContainer, Dictionary properties) { - HttpContext httpContext = webContainer.createDefaultHttpContext(); - - ServiceReference destinationServiceServiceReference = bundleContext.getServiceReference("org.apache.cxf.transport.http.DestinationRegistry"); - DestinationRegistry destinationRegistry = (DestinationRegistry) bundleContext.getService(destinationServiceServiceReference); - - Servlet servlet = new CXFNonSpringServlet(destinationRegistry, false); - try { - if (properties == null) { - properties = new Properties(); - } - Properties sprops = new Properties(); - sprops.put("init-prefix", - getProp(properties, CXF_SERVLET_PREFIX + "init-prefix", "")); - sprops.put("servlet-name", - getProp(properties, CXF_SERVLET_PREFIX + "name", "cxf-osgi-transport-servlet")); - sprops.put("hide-service-list-page", - getProp(properties, CXF_SERVLET_PREFIX + "hide-service-list-page", "false")); - sprops.put("disable-address-updates", - getProp(properties, CXF_SERVLET_PREFIX + "disable-address-updates", "true")); - sprops.put("base-address", - getProp(properties, CXF_SERVLET_PREFIX + "base-address", "")); - sprops.put("service-list-path", - getProp(properties, CXF_SERVLET_PREFIX + "service-list-path", "")); - sprops.put("static-resources-list", - getProp(properties, CXF_SERVLET_PREFIX + "static-resources-list", "")); - sprops.put("redirects-list", - getProp(properties, CXF_SERVLET_PREFIX + "redirects-list", "")); - sprops.put("redirect-servlet-name", - getProp(properties, CXF_SERVLET_PREFIX + "redirect-servlet-name", "")); - sprops.put("redirect-servlet-path", - getProp(properties, CXF_SERVLET_PREFIX + "redirect-servlet-path", "")); - sprops.put("service-list-all-contexts", - getProp(properties, CXF_SERVLET_PREFIX + "service-list-all-contexts", "")); - sprops.put("service-list-page-authenticate", - getProp(properties, CXF_SERVLET_PREFIX + "service-list-page-authenticate", "false")); - sprops.put("service-list-page-authenticate-realm", - getProp(properties, CXF_SERVLET_PREFIX + "service-list-page-authenticate-realm", "karaf")); - sprops.put("use-x-forwarded-headers", - getProp(properties, CXF_SERVLET_PREFIX + "use-x-forwarded-headers", "false")); - - // Accept extra properties by default, can be disabled if it is really needed - if (Boolean.valueOf(getProp(properties, CXF_SERVLET_PREFIX + "support.extra.properties", "true").toString())) { - Enumeration keys = properties.keys(); - while (keys.hasMoreElements()) { - String nextKey = keys.nextElement().toString(); - if (!nextKey.startsWith(CXF_SERVLET_PREFIX)) { - sprops.put(nextKey, properties.get(nextKey)); - } - } - } - - Hashtable servletInitParams = new Hashtable(); - Enumeration keys = sprops.keys(); - - while(keys.hasMoreElements()){ - String propName = (String) keys.nextElement(); - if (!FILTERED_PROPERTIES.contains(propName)) { - servletInitParams.put(propName, sprops.getProperty(propName)); - } - } - - // Try to register servlet in given web container now - webContainer.registerServlet(alias, servlet, servletInitParams, httpContext); - } catch (Exception e) { - log.error("Can't register servlet in web container", e); - } - } - - /** - * Find web container in the bundle, where was servlet originally registered - * - * @return web container or null - */ - protected WebContainer findExternalWebContainer() { - BundleContext servletBundleContext = managedServiceReference.getBundle().getBundleContext(); - ServiceReference webContainerReference = servletBundleContext.getServiceReference(WebContainer.class.getName()); - if (webContainerReference == null) { - log.warn("Not found webContainer reference for bundle " + servletBundleContext); - return null; - } else { - return (WebContainer) servletBundleContext.getService(webContainerReference); - } - } - - private Dictionary obtainProperties(){ - Dictionary properties = null; - ServiceReference reference = bundleContext.getServiceReference(ConfigurationAdmin.class.getName()); - ConfigurationAdmin admin = (ConfigurationAdmin) bundleContext.getService(reference); - try { - Configuration configuration = admin.getConfiguration("org.apache.cxf.osgi"); - properties = configuration.getProperties(); - } catch (Exception e){ - log.warn("Unable to obtain cxf osgi configadmin reference.", e); - } - return properties; - } - - private Object getProp(Dictionary properties, String key, Object defaultValue) { - Object value = null; - if(properties != null){ - value = properties.get(key); - } - return value == null ? defaultValue : value; - } - - public ServiceReference getManagedServiceReference() { - return managedServiceReference; - } - - public void setManagedServiceReference(ServiceReference managedServiceReference) { - this.managedServiceReference = managedServiceReference; - } -} diff --git a/adapters/oidc/osgi-adapter/src/test/java/org/keycloak/adapters/osgi/HierarchicalPathBasedKeycloakConfigResolverTest.java b/adapters/oidc/osgi-adapter/src/test/java/org/keycloak/adapters/osgi/HierarchicalPathBasedKeycloakConfigResolverTest.java deleted file mode 100644 index aecbfc90b3c..00000000000 --- a/adapters/oidc/osgi-adapter/src/test/java/org/keycloak/adapters/osgi/HierarchicalPathBasedKeycloakConfigResolverTest.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.adapters.osgi; - -import java.io.InputStream; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import org.junit.Test; -import org.keycloak.adapters.KeycloakDeployment; -import org.keycloak.adapters.OIDCHttpFacade; -import org.keycloak.adapters.spi.AuthenticationError; -import org.keycloak.adapters.spi.HttpFacade; -import org.keycloak.adapters.spi.LogoutError; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; - -public class HierarchicalPathBasedKeycloakConfigResolverTest { - - @Test - public void genericAndSpecificConfigurations() throws Exception { - HierarchicalPathBasedKeycloakConfigResolver resolver = new HierarchicalPathBasedKeycloakConfigResolver(); - populate(resolver, true); - - assertThat(resolver.resolve(new MockRequest("http://localhost/a/b/c/d/e?a=b")).getRealm(), equalTo("a-b-c-d-e")); - assertThat(resolver.resolve(new MockRequest("http://localhost/a/b/c/d/x?a=b")).getRealm(), equalTo("a-b-c-d")); - assertThat(resolver.resolve(new MockRequest("http://localhost/a/b/c/x/x?a=b")).getRealm(), equalTo("a-b-c")); - assertThat(resolver.resolve(new MockRequest("http://localhost/a/b/x/x/x?a=b")).getRealm(), equalTo("a-b")); - assertThat(resolver.resolve(new MockRequest("http://localhost/a/x/x/x/x?a=b")).getRealm(), equalTo("a")); - assertThat(resolver.resolve(new MockRequest("http://localhost/x/x/x/x/x?a=b")).getRealm(), equalTo("")); - - populate(resolver, false); - try { - resolver.resolve(new MockRequest("http://localhost/x/x/x/x/x?a=b")); - fail("Expected java.lang.IllegalStateException: Can't find Keycloak configuration ..."); - } catch (IllegalStateException expected) { - } - } - - @SuppressWarnings("unchecked") - private PathBasedKeycloakConfigResolver populate(PathBasedKeycloakConfigResolver resolver, boolean fallback) - throws Exception { - Field f = PathBasedKeycloakConfigResolver.class.getDeclaredField("cache"); - f.setAccessible(true); - Map cache = (Map) f.get(resolver); - cache.clear(); - cache.put("a-b-c-d-e", newKeycloakDeployment("a-b-c-d-e")); - cache.put("a-b-c-d", newKeycloakDeployment("a-b-c-d")); - cache.put("a-b-c", newKeycloakDeployment("a-b-c")); - cache.put("a-b", newKeycloakDeployment("a-b")); - cache.put("a", newKeycloakDeployment("a")); - if (fallback) { - cache.put("", newKeycloakDeployment("")); - } - - return resolver; - } - - private KeycloakDeployment newKeycloakDeployment(String realm) { - KeycloakDeployment deployment = new KeycloakDeployment(); - deployment.setRealm(realm); - - return deployment; - } - - private class MockRequest implements OIDCHttpFacade.Request { - - private String uri; - - public MockRequest(String uri) { - this.uri = uri; - } - - @Override - public String getMethod() { - return null; - } - - @Override - public String getURI() { - return this.uri; - } - - @Override - public String getRelativePath() { - return null; - } - - @Override - public boolean isSecure() { - return false; - } - - @Override - public String getFirstParam(String param) { - return null; - } - - @Override - public String getQueryParamValue(String param) { - return null; - } - - @Override - public HttpFacade.Cookie getCookie(String cookieName) { - return null; - } - - @Override - public String getHeader(String name) { - return null; - } - - @Override - public List getHeaders(String name) { - return null; - } - - @Override - public InputStream getInputStream() { - return null; - } - - @Override - public InputStream getInputStream(boolean buffered) { - return null; - } - - @Override - public String getRemoteAddr() { - return null; - } - - @Override - public void setError(AuthenticationError error) { - - } - - @Override - public void setError(LogoutError error) { - - } - } - -} diff --git a/adapters/oidc/osgi-adapter/src/test/java/org/keycloak/adapters/osgi/PathBasedKeycloakConfigResolverTest.java b/adapters/oidc/osgi-adapter/src/test/java/org/keycloak/adapters/osgi/PathBasedKeycloakConfigResolverTest.java deleted file mode 100644 index f679e556737..00000000000 --- a/adapters/oidc/osgi-adapter/src/test/java/org/keycloak/adapters/osgi/PathBasedKeycloakConfigResolverTest.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.adapters.osgi; - -import java.io.InputStream; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import org.junit.Test; -import org.keycloak.adapters.KeycloakDeployment; -import org.keycloak.adapters.OIDCHttpFacade; -import org.keycloak.adapters.spi.AuthenticationError; -import org.keycloak.adapters.spi.HttpFacade; -import org.keycloak.adapters.spi.LogoutError; - -import static org.junit.Assert.assertNotNull; - -public class PathBasedKeycloakConfigResolverTest { - - @Test - public void relativeURIsAndContexts() throws Exception { - PathBasedKeycloakConfigResolver resolver = new PathBasedKeycloakConfigResolver(); - - assertNotNull(populate(resolver, "test") - .resolve(new MockRequest("http://localhost/test/a/b/c?d=e", "/a/b/c"))); - - assertNotNull(populate(resolver, "test") - .resolve(new MockRequest("http://localhost/test/a/b/c?d=e", "/a/b"))); - - // means default context and actually we use first segment - assertNotNull(populate(resolver, "test") - .resolve(new MockRequest("http://localhost/test/a/b/c?d=e", "/test/a/b/c"))); - - assertNotNull(populate(resolver, "test/a") - .resolve(new MockRequest("http://localhost/test/a/b/c?d=e", "/b/c"))); - - assertNotNull(populate(resolver, "") - .resolve(new MockRequest("http://localhost/", "/"))); - } - - @SuppressWarnings("unchecked") - private PathBasedKeycloakConfigResolver populate(PathBasedKeycloakConfigResolver resolver, String context) - throws Exception { - Field f = PathBasedKeycloakConfigResolver.class.getDeclaredField("cache"); - f.setAccessible(true); - Map cache = (Map) f.get(resolver); - cache.clear(); - cache.put(context, new KeycloakDeployment()); - - return resolver; - } - - private class MockRequest implements OIDCHttpFacade.Request { - - private String uri; - private String relativePath; - - public MockRequest(String uri, String relativePath) { - this.uri = uri; - this.relativePath = relativePath; - } - - @Override - public String getMethod() { - return null; - } - - @Override - public String getURI() { - return this.uri; - } - - @Override - public String getRelativePath() { - return this.relativePath; - } - - @Override - public boolean isSecure() { - return false; - } - - @Override - public String getFirstParam(String param) { - return null; - } - - @Override - public String getQueryParamValue(String param) { - return null; - } - - @Override - public HttpFacade.Cookie getCookie(String cookieName) { - return null; - } - - @Override - public String getHeader(String name) { - return null; - } - - @Override - public List getHeaders(String name) { - return null; - } - - @Override - public InputStream getInputStream() { - return null; - } - - @Override - public InputStream getInputStream(boolean buffered) { - return null; - } - - @Override - public String getRemoteAddr() { - return null; - } - - @Override - public void setError(AuthenticationError error) { - - } - - @Override - public void setError(LogoutError error) { - - } - } - -} diff --git a/adapters/oidc/pom.xml b/adapters/oidc/pom.xml index 815fbad3ec1..9b0603fe6f8 100755 --- a/adapters/oidc/pom.xml +++ b/adapters/oidc/pom.xml @@ -33,11 +33,9 @@ adapter-core installed - fuse7 jaxrs-oauth-client jetty js - osgi-adapter servlet-filter spring-boot2 spring-boot-adapter-core diff --git a/distribution/adapters/fuse-adapter-zip/assembly.xml b/distribution/adapters/fuse-adapter-zip/assembly.xml deleted file mode 100644 index bc0f148f1a0..00000000000 --- a/distribution/adapters/fuse-adapter-zip/assembly.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - fuse-adapter-dist - - - zip - tar.gz - - false - - - - ${project.build.directory}/system - - */** - - system - - - - src/main/resources/licenses/${product.slot} - docs/licenses-${product.slot}-adapter - - licenses.xml - - - - target/licenses - docs/licenses-${product.slot}-adapter - - - diff --git a/distribution/adapters/fuse-adapter-zip/pom.xml b/distribution/adapters/fuse-adapter-zip/pom.xml deleted file mode 100644 index 9f3674c8346..00000000000 --- a/distribution/adapters/fuse-adapter-zip/pom.xml +++ /dev/null @@ -1,330 +0,0 @@ - - - - 4.0.0 - - keycloak-parent - org.keycloak - 999-SNAPSHOT - ../../../pom.xml - - - keycloak-fuse-adapter-dist - pom - Keycloak Fuse Adapter Distro - - - - - org.keycloak - keycloak-osgi-features - ${project.version} - xml - features - - - * - * - - - - - org.bouncycastle - bcprov-jdk15on - - - * - * - - - - - org.bouncycastle - bcpkix-jdk15on - - - * - * - - - - - com.fasterxml.jackson.core - jackson-core - - - * - * - - - - - com.fasterxml.jackson.core - jackson-annotations - - - * - * - - - - - com.fasterxml.jackson.core - jackson-databind - - - * - * - - - - - com.fasterxml.jackson.module - jackson-module-jaxb-annotations - - - * - * - - - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-base - - - * - * - - - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - - - * - * - - - - - org.jboss.logging - jboss-logging - - - * - * - - - - - org.keycloak - keycloak-common - - - * - * - - - - - org.keycloak - keycloak-core - - - * - * - - - - - org.keycloak - keycloak-authz-client - - - * - * - - - - - org.keycloak - keycloak-adapter-spi - - - * - * - - - - - org.keycloak - keycloak-adapter-core - - - * - * - - - - - org.keycloak - keycloak-osgi-adapter - - - * - * - - - - - org.keycloak - keycloak-jetty-adapter-spi - - - * - * - - - - - org.keycloak - keycloak-jetty-core - - - * - * - - - - - org.keycloak - keycloak-osgi-jaas - ${project.version} - - - * - * - - - - - org.keycloak - keycloak-jetty92-adapter - - - * - * - - - - - org.keycloak - keycloak-undertow-adapter - - - * - * - - - - - org.keycloak - keycloak-undertow-adapter-spi - - - * - * - - - - - org.keycloak - keycloak-pax-web-undertow - ${project.version} - - - * - * - - - - - org.keycloak - keycloak-camel-undertow - ${project.version} - - - * - * - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - prepare-package - - copy-dependencies - - - ${project.build.directory}/system - false - false - true - true - - - - - - maven-assembly-plugin - - - assemble - package - - single - - - - assembly.xml - - target - target/assembly/work - false - - - - - - org.keycloak - keycloak-distribution-licenses-maven-plugin - - - - diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-annotations,2.12.1,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-annotations,2.12.1,Apache Software License 2.0.txt deleted file mode 100644 index d6456956733..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-annotations,2.12.1,Apache Software License 2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-core,2.12.1,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-core,2.12.1,Apache Software License 2.0.txt deleted file mode 100644 index d6456956733..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-core,2.12.1,Apache Software License 2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-databind,2.12.1,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-databind,2.12.1,Apache Software License 2.0.txt deleted file mode 100644 index d6456956733..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.core,jackson-databind,2.12.1,Apache Software License 2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.12.1,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.12.1,Apache Software License 2.0.txt deleted file mode 100644 index 6acf75483f9..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.12.1,Apache Software License 2.0.txt +++ /dev/null @@ -1,8 +0,0 @@ -This copy of Jackson JSON processor databind module is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.12.1,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.12.1,Apache Software License 2.0.txt deleted file mode 100644 index 6acf75483f9..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.12.1,Apache Software License 2.0.txt +++ /dev/null @@ -1,8 +0,0 @@ -This copy of Jackson JSON processor databind module is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.12.1,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.12.1,Apache Software License 2.0.txt deleted file mode 100644 index 283587f1b16..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.12.1,Apache Software License 2.0.txt +++ /dev/null @@ -1,8 +0,0 @@ -This copy of Jackson JSON processor `jackson-module-jaxb-annotations` module is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/licenses.xml b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/licenses.xml deleted file mode 100644 index 16182630e52..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/licenses.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - org.bouncycastle - bcpkix-jdk15on - 1.68 - - - MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv68/LICENSE.html - - - - - org.bouncycastle - bcprov-jdk15on - 1.68 - - - MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv68/LICENSE.html - - - - - com.fasterxml.jackson.core - jackson-annotations - 2.12.1 - - - Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.12.1/LICENSE - - - - - com.fasterxml.jackson.core - jackson-core - 2.12.1 - - - Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.12.1/LICENSE - - - - - com.fasterxml.jackson.core - jackson-databind - 2.12.1 - - - Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.12.1/LICENSE - - - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-base - 2.12.1 - - - Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.12.1/base/src/main/resources/META-INF/LICENSE - - - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - 2.12.1 - - - Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.12.1/json/src/main/resources/META-INF/LICENSE - - - - - com.fasterxml.jackson.module - jackson-module-jaxb-annotations - 2.12.1 - - - Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-modules-base/jackson-modules-base-2.12.1/jaxb/src/main/resources/META-INF/LICENSE - - - - - org.apache.httpcomponents - httpclient - 4.5.2 - - - Apache Software License 2.0 - https://git-wip-us.apache.org/repos/asf?p=httpcomponents-client.git;a=blob_plain;f=LICENSE.txt;hb=refs/tags/rel/v4.5.2 - - - - - org.apache.httpcomponents - httpcore - 4.4.4 - - - Apache Software License 2.0 - https://git-wip-us.apache.org/repos/asf?p=httpcomponents-core.git;a=blob_plain;f=LICENSE.txt;hb=refs/tags/rel/v4.4.4 - - - - - org.jboss.logging - jboss-logging - 3.4.1.Final - - - Apache Software License 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - - diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.apache.httpcomponents,httpclient,4.5.2,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.apache.httpcomponents,httpclient,4.5.2,Apache Software License 2.0.txt deleted file mode 100644 index 32f01eda18f..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.apache.httpcomponents,httpclient,4.5.2,Apache Software License 2.0.txt +++ /dev/null @@ -1,558 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - -========================================================================= - -This project includes Public Suffix List copied from - -licensed under the terms of the Mozilla Public License, v. 2.0 - -Full license text: - -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.apache.httpcomponents,httpcore,4.4.4,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.apache.httpcomponents,httpcore,4.4.4,Apache Software License 2.0.txt deleted file mode 100644 index 72819a9f06f..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.apache.httpcomponents,httpcore,4.4.4,Apache Software License 2.0.txt +++ /dev/null @@ -1,241 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - -========================================================================= - -This project contains annotations in the package org.apache.http.annotation -which are derived from JCIP-ANNOTATIONS -Copyright (c) 2005 Brian Goetz and Tim Peierls. -See http://www.jcip.net and the Creative Commons Attribution License -(http://creativecommons.org/licenses/by/2.5) -Full text: http://creativecommons.org/licenses/by/2.5/legalcode - -License - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - -1. Definitions - - "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. - "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. - "Licensor" means the individual or entity that offers the Work under the terms of this License. - "Original Author" means the individual or entity who created the Work. - "Work" means the copyrightable work of authorship offered under the terms of this License. - "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. - -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. - -3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: - - to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; - to create and reproduce Derivative Works; - to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; - to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. - - For the avoidance of doubt, where the work is a musical composition: - Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. - Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). - Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). - -The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. - -4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: - - You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(b), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(b), as requested. - If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - -5. Representations, Warranties and Disclaimer - -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination - - This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. - Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - -8. Miscellaneous - - Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. - Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. - If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. - This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.68,MIT License.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.68,MIT License.txt deleted file mode 100644 index f536bb1f0a5..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcpkix-jdk15on,1.68,MIT License.txt +++ /dev/null @@ -1,22 +0,0 @@ - - - -Copyright (c) 2000-2021 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org) -

-Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: -

-The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. -

-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.68,MIT License.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.68,MIT License.txt deleted file mode 100644 index f536bb1f0a5..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.bouncycastle,bcprov-jdk15on,1.68,MIT License.txt +++ /dev/null @@ -1,22 +0,0 @@ - - - -Copyright (c) 2000-2021 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org) -

-Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: -

-The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. -

-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.jboss.logging,jboss-logging,3.4.1.Final,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.jboss.logging,jboss-logging,3.4.1.Final,Apache Software License 2.0.txt deleted file mode 100644 index d6456956733..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/keycloak/org.jboss.logging,jboss-logging,3.4.1.Final,Apache Software License 2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-annotations,2.12.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-annotations,2.12.1.redhat-00001,Apache Software License 2.0.txt deleted file mode 100644 index d6456956733..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-annotations,2.12.1.redhat-00001,Apache Software License 2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-core,2.12.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-core,2.12.1.redhat-00001,Apache Software License 2.0.txt deleted file mode 100644 index d6456956733..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-core,2.12.1.redhat-00001,Apache Software License 2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-databind,2.12.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-databind,2.12.1.redhat-00001,Apache Software License 2.0.txt deleted file mode 100644 index 1becba2bb0a..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.core,jackson-databind,2.12.1.redhat-00001,Apache Software License 2.0.txt +++ /dev/null @@ -1 +0,0 @@ -404: Not Found \ No newline at end of file diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.12.1.redhat-00002,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.12.1.redhat-00002,Apache Software License 2.0.txt deleted file mode 100644 index 6acf75483f9..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-base,2.12.1.redhat-00002,Apache Software License 2.0.txt +++ /dev/null @@ -1,8 +0,0 @@ -This copy of Jackson JSON processor databind module is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.12.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.12.1.redhat-00001,Apache Software License 2.0.txt deleted file mode 100644 index 6acf75483f9..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.jaxrs,jackson-jaxrs-json-provider,2.12.1.redhat-00001,Apache Software License 2.0.txt +++ /dev/null @@ -1,8 +0,0 @@ -This copy of Jackson JSON processor databind module is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.12.1.redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.12.1.redhat-00001,Apache Software License 2.0.txt deleted file mode 100644 index 6acf75483f9..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/com.fasterxml.jackson.module,jackson-module-jaxb-annotations,2.12.1.redhat-00001,Apache Software License 2.0.txt +++ /dev/null @@ -1,8 +0,0 @@ -This copy of Jackson JSON processor databind module is licensed under the -Apache (Software) License, version 2.0 ("the License"). -See the License for details about distribution rights, and the -specific rights regarding derivate works. - -You may obtain a copy of the License at: - -http://www.apache.org/licenses/LICENSE-2.0 diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/licenses.xml b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/licenses.xml deleted file mode 100644 index 54c4c02a282..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/licenses.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - org.bouncycastle - bcpkix-jdk15on - 1.68.0.redhat-00005 - - - MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv68/LICENSE.html - - - - - org.bouncycastle - bcprov-jdk15on - 1.68.0.redhat-00005 - - - MIT License - https://raw.githubusercontent.com/bcgit/bc-java/r1rv68/LICENSE.html - - - - - com.fasterxml.jackson.core - jackson-annotations - 2.12.1.redhat-00001 - - - Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-annotations/jackson-annotations-2.12.1/LICENSE - - - - - com.fasterxml.jackson.core - jackson-core - 2.12.1.redhat-00001 - - - Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-core/jackson-core-2.12.1/LICENSE - - - - - com.fasterxml.jackson.core - jackson-databind - 2.12.1.redhat-00001 - - - Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-databind/jackson-databind-2.12.1/src/main/resources/META-INF/LICENSE - - - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-base - 2.12.1.redhat-00002 - - - Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.12.1/json/src/main/resources/META-INF/LICENSE - - - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - 2.12.1.redhat-00001 - - - Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.12.1/json/src/main/resources/META-INF/LICENSE - - - - - com.fasterxml.jackson.module - jackson-module-jaxb-annotations - 2.12.1.redhat-00001 - - - Apache Software License 2.0 - https://raw.githubusercontent.com/FasterXML/jackson-jaxrs-providers/jackson-jaxrs-providers-2.12.1/json/src/main/resources/META-INF/LICENSE - - - - - org.apache.httpcomponents - httpclient - 4.5.2.redhat-2 - - - Apache Software License 2.0 - https://git-wip-us.apache.org/repos/asf?p=httpcomponents-client.git;a=blob_plain;f=LICENSE.txt;hb=refs/tags/rel/v4.5.2 - - - - - org.apache.httpcomponents - httpcore - 4.4.4.redhat-2 - - - Apache Software License 2.0 - https://git-wip-us.apache.org/repos/asf?p=httpcomponents-core.git;a=blob_plain;f=LICENSE.txt;hb=refs/tags/rel/v4.4.4 - - - - - org.jboss.logging - jboss-logging - 3.4.1.Final-redhat-00001 - - - Apache Software License 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - - diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.apache.httpcomponents,httpclient,4.5.2.redhat-2,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.apache.httpcomponents,httpclient,4.5.2.redhat-2,Apache Software License 2.0.txt deleted file mode 100644 index 32f01eda18f..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.apache.httpcomponents,httpclient,4.5.2.redhat-2,Apache Software License 2.0.txt +++ /dev/null @@ -1,558 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - -========================================================================= - -This project includes Public Suffix List copied from - -licensed under the terms of the Mozilla Public License, v. 2.0 - -Full license text: - -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.apache.httpcomponents,httpcore,4.4.4.redhat-2,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.apache.httpcomponents,httpcore,4.4.4.redhat-2,Apache Software License 2.0.txt deleted file mode 100644 index 72819a9f06f..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.apache.httpcomponents,httpcore,4.4.4.redhat-2,Apache Software License 2.0.txt +++ /dev/null @@ -1,241 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - -========================================================================= - -This project contains annotations in the package org.apache.http.annotation -which are derived from JCIP-ANNOTATIONS -Copyright (c) 2005 Brian Goetz and Tim Peierls. -See http://www.jcip.net and the Creative Commons Attribution License -(http://creativecommons.org/licenses/by/2.5) -Full text: http://creativecommons.org/licenses/by/2.5/legalcode - -License - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - -1. Definitions - - "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. - "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. - "Licensor" means the individual or entity that offers the Work under the terms of this License. - "Original Author" means the individual or entity who created the Work. - "Work" means the copyrightable work of authorship offered under the terms of this License. - "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. - -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. - -3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: - - to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; - to create and reproduce Derivative Works; - to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; - to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. - - For the avoidance of doubt, where the work is a musical composition: - Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. - Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). - Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). - -The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. - -4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: - - You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(b), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(b), as requested. - If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - -5. Representations, Warranties and Disclaimer - -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination - - This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. - Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - -8. Miscellaneous - - Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. - Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. - If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. - This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.68.0.redhat-00005,MIT License.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.68.0.redhat-00005,MIT License.txt deleted file mode 100644 index f536bb1f0a5..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcpkix-jdk15on,1.68.0.redhat-00005,MIT License.txt +++ /dev/null @@ -1,22 +0,0 @@ - - - -Copyright (c) 2000-2021 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org) -

-Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: -

-The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. -

-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.68.0.redhat-00005,MIT License.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.68.0.redhat-00005,MIT License.txt deleted file mode 100644 index f536bb1f0a5..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.bouncycastle,bcprov-jdk15on,1.68.0.redhat-00005,MIT License.txt +++ /dev/null @@ -1,22 +0,0 @@ - - - -Copyright (c) 2000-2021 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org) -

-Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: -

-The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. -

-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - - diff --git a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.jboss.logging,jboss-logging,3.4.1.Final-redhat-00001,Apache Software License 2.0.txt b/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.jboss.logging,jboss-logging,3.4.1.Final-redhat-00001,Apache Software License 2.0.txt deleted file mode 100644 index d6456956733..00000000000 --- a/distribution/adapters/fuse-adapter-zip/src/main/resources/licenses/rh-sso/org.jboss.logging,jboss-logging,3.4.1.Final-redhat-00001,Apache Software License 2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/distribution/adapters/osgi/features/pom.xml b/distribution/adapters/osgi/features/pom.xml deleted file mode 100755 index c0653768922..00000000000 --- a/distribution/adapters/osgi/features/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - keycloak-parent - org.keycloak - 999-SNAPSHOT - ../../../../pom.xml - - Keycloak OSGI Features - - 4.0.0 - - keycloak-osgi-features - - - - - src/main/resources - true - - - - - org.apache.maven.plugins - maven-resources-plugin - - - filter - generate-resources - - resources - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - target/classes/features.xml - xml - features - - - - - - - - - - \ No newline at end of file diff --git a/distribution/adapters/osgi/features/src/main/resources/features.xml b/distribution/adapters/osgi/features/src/main/resources/features.xml deleted file mode 100755 index f1412f63d9a..00000000000 --- a/distribution/adapters/osgi/features/src/main/resources/features.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - -

The keycloak adapter core stuff
- mvn:org.apache.httpcomponents/httpclient-osgi/${apache.httpcomponents.fuse.version} - mvn:org.apache.httpcomponents/httpcore-osgi/${apache.httpcomponents.httpcore.fuse.version} - mvn:org.bouncycastle/bcprov-jdk15on/${bouncycastle.version} - mvn:org.bouncycastle/bcpkix-jdk15on/${bouncycastle.version} - mvn:com.fasterxml.jackson.core/jackson-core/${jackson.version} - mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson.version} - mvn:com.fasterxml.jackson.core/jackson-databind/${jackson.version} - mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/${jackson.version} - mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${jackson.version} - mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson.version} - mvn:org.jboss.logging/jboss-logging/${jboss.logging.version} - mvn:org.keycloak/keycloak-common/${project.version} - mvn:org.keycloak/keycloak-core/${project.version} - mvn:org.keycloak/keycloak-authz-client/${project.version} - mvn:org.keycloak/keycloak-adapter-spi/${project.version} - mvn:org.keycloak/keycloak-adapter-core/${project.version} - - - -
The keycloak adapter core stuff
- keycloak-adapter-core - http-whiteboard - mvn:org.keycloak/keycloak-osgi-adapter/${project.version} -
- - -
The keycloak Jetty 9.2 adapter (Fuse 6.3)
- keycloak-adapter-core - jetty - mvn:org.keycloak/keycloak-jetty-adapter-spi/${project.version} - mvn:org.keycloak/keycloak-jetty-core/${project.version} - mvn:org.keycloak/keycloak-jetty92-adapter/${project.version} -
- - - - - - -
Keycloak Pax-Web adapter for Undertow
- keycloak-adapter-core - pax-web-core - mvn:org.keycloak/keycloak-osgi-adapter/${project.version} - mvn:org.keycloak/keycloak-undertow-adapter/${project.version} - mvn:org.keycloak/keycloak-undertow-adapter-spi/${project.version} - mvn:org.keycloak/keycloak-pax-web-undertow/${project.version} - mvn:org.keycloak/keycloak-camel-undertow/${project.version} -
- - - - - -
Keycloak servlet filter adapter
- keycloak-adapter-core - mvn:org.keycloak/keycloak-servlet-filter-adapter/${project.version} - mvn:org.keycloak/keycloak-servlet-adapter-spi/${project.version} -
- - -
The keycloak JAAS configuration
- keycloak-adapter-core - mvn:org.keycloak/keycloak-osgi-jaas/${project.version} -
- - -
The keycloak adapter core stuff
- keycloak-osgi-adapter - keycloak-jaas -
- - diff --git a/distribution/adapters/osgi/jaas/pom.xml b/distribution/adapters/osgi/jaas/pom.xml deleted file mode 100755 index 33aca8d025a..00000000000 --- a/distribution/adapters/osgi/jaas/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - keycloak-parent - org.keycloak - 999-SNAPSHOT - ../../../../pom.xml - - Keycloak OSGI JAAS Realm Configuration - - 4.0.0 - - keycloak-osgi-jaas - bundle - - - 1.8 - 1.8 - - - - - org.apache.karaf.jaas.config, - org.keycloak.adapters.jaas;version=${project.version}, - *;resolution:=optional - - - - - - org.keycloak - keycloak-adapter-core - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - bundle-manifest - process-classes - - manifest - - - - - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.export} - keycloak - ${project.version} - - - - - - - diff --git a/distribution/adapters/osgi/jaas/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/distribution/adapters/osgi/jaas/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index ae1d48a3800..00000000000 --- a/distribution/adapters/osgi/jaas/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - keycloak-config-file = ${jaasBearerKeycloakConfigFile} - role-principal-class = ${jaasBearerRolePrincipalClass} - - - - - keycloak-config-file = ${jaasDirectAccessKeycloakConfigFile} - role-principal-class = ${jaasDirectAccessRolePrincipalClass} - - - - - \ No newline at end of file diff --git a/distribution/adapters/osgi/pom.xml b/distribution/adapters/osgi/pom.xml deleted file mode 100755 index d662936c44c..00000000000 --- a/distribution/adapters/osgi/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - keycloak-parent - org.keycloak - 999-SNAPSHOT - ../../../pom.xml - - Keycloak OSGI Integration - - 4.0.0 - - keycloak-osgi-pom - pom - - - features - jaas - - - \ No newline at end of file diff --git a/distribution/adapters/pom.xml b/distribution/adapters/pom.xml index 7e9ce3e5f40..60c2e47113a 100755 --- a/distribution/adapters/pom.xml +++ b/distribution/adapters/pom.xml @@ -31,9 +31,7 @@ pom - fuse-adapter-zip js-adapter-zip - osgi wildfly-adapter diff --git a/distribution/downloads/src/main/resources/files b/distribution/downloads/src/main/resources/files index a054dc5e1f9..a409285a17c 100644 --- a/distribution/downloads/src/main/resources/files +++ b/distribution/downloads/src/main/resources/files @@ -9,7 +9,6 @@ keycloak-js-adapter-npm-dist:keycloak-oidc-js-adapter keycloak-tomcat-adapter-dist:keycloak-oidc-tomcat-adapter keycloak-wildfly-adapter-dist:keycloak-oidc-wildfly-adapter - keycloak-fuse-adapter-dist:keycloak-oidc-fuse-adapter keycloak-saml-jetty92-adapter-dist:keycloak-saml-jetty92-adapter keycloak-saml-jetty93-adapter-dist:keycloak-saml-jetty93-adapter diff --git a/examples/README.md b/examples/README.md index 1ed6b234d24..8d824b9e144 100755 --- a/examples/README.md +++ b/examples/README.md @@ -42,11 +42,6 @@ Themes Example themes to change the look and feel of login forms, account management console and admin console. For more information look at `themes/README.md`. -Fuse ----- - -This is set of demo applications, showing how to secure your own web applications running inside OSGI environment in JBoss Fuse or Apache Karaf. Fore more information look at `fuse/README.md` - SAML ---- diff --git a/pom.xml b/pom.xml index 8381c287e1b..f6f4142c2c0 100644 --- a/pom.xml +++ b/pom.xml @@ -1168,11 +1168,6 @@ keycloak-js-adapter ${project.version} - - org.keycloak - keycloak-osgi-adapter - ${project.version} - org.keycloak keycloak-spring-boot-adapter-core diff --git a/testsuite/integration-arquillian/HOW-TO-RUN.md b/testsuite/integration-arquillian/HOW-TO-RUN.md index 591ce71e22e..af8ae7f07f1 100644 --- a/testsuite/integration-arquillian/HOW-TO-RUN.md +++ b/testsuite/integration-arquillian/HOW-TO-RUN.md @@ -279,122 +279,6 @@ See the property `wildfly.deprecated.version` in the file [pom.xml](pom.xml) ) . -Papp-server-wildfly-deprecated \ -Dtest=org.keycloak.testsuite.adapter.** - -### JBoss Fuse 6.3 - -1) Download JBoss Fuse 6.3 to your filesystem. It can be downloaded from http://origin-repository.jboss.org/nexus/content/groups/m2-proxy/org/jboss/fuse/jboss-fuse-karaf -Assumed you downloaded `jboss-fuse-karaf-6.3.0.redhat-229.zip` - -2) Install to your local maven repository and change the properties according to your env (This step can be likely avoided if you somehow configure your local maven settings to point directly to Fuse repo): - - mvn install:install-file \ - -DgroupId=org.jboss.fuse \ - -DartifactId=jboss-fuse-karaf \ - -Dversion=6.3.0.redhat-229 \ - -Dpackaging=zip \ - -Dfile=/mydownloads/jboss-fuse-karaf-6.3.0.redhat-229.zip - - -3) Prepare Fuse and run the tests (change props according to your environment, versions etc): - - - # Prepare Fuse server - mvn -f testsuite/integration-arquillian/servers/pom.xml \ - clean install \ - -Papp-server-fuse63 \ - -Dfuse63.version=6.3.0.redhat-229 - - # Run the Fuse adapter tests - mvn -f testsuite/integration-arquillian/tests/base/pom.xml \ - clean install \ - -Pauth-server-wildfly \ - -Papp-server-fuse63 \ - -Dauth.server.ssl.required=false \ - -Dadditional.fuse.repos=,$REPO \ - -Dtest=*.fuse.* - - -### JBoss Fuse 7.X - -1) Download JBoss Fuse 7 to your filesystem. It can be downloaded from http://origin-repository.jboss.org/nexus/content/groups/m2-proxy/org/jboss/fuse/fuse-karaf (Fuse 7.3 or higher is required) -Assumed you downloaded `fuse-karaf-7.3.0.fuse-730065-redhat-00002.zip` - -2) Install to your local maven repository and change the properties according to your env (This step can be likely avoided if you somehow configure your local maven settings to point directly to Fuse repo): - - - mvn install:install-file \ - -DgroupId=org.jboss.fuse \ - -DartifactId=fuse-karaf \ - -Dversion=7.3.0.fuse-730065-redhat-00002 \ - -Dpackaging=zip \ - -Dfile=/mydownloads/fuse-karaf-7.3.0.fuse-730065-redhat-00002.zip - - -3) Prepare Fuse and run the tests (change props according to your environment, versions etc): - - - # Prepare Fuse server - mvn -f testsuite/integration-arquillian/servers/pom.xml \ - clean install \ - -Papp-server-fuse7x \ - -Dfuse7x.version=7.3.0.fuse-730065-redhat-00002 - - # Run the Fuse adapter tests - mvn -f testsuite/integration-arquillian/tests/base/pom.xml \ - clean test \ - -Papp-server-fuse7x \ - -Dauth.server.ssl.required=false \ - -Dadditional.fuse.repos=,$REPO \ - -Dtest=*.fuse.* - - -### EAP6 with Hawtio - -1) Download JBoss EAP 6.4.0.GA zip - -2) Install to your local maven repository and change the properties according to your env (This step can be likely avoided if you somehow configure your local maven settings to point directly to EAP repo): - - - mvn install:install-file \ - -DgroupId=org.jboss.as \ - -DartifactId=jboss-as-dist \ - -Dversion=7.5.21.Final-redhat-1 \ - -Dpackaging=zip \ - -Dfile=/mydownloads/jboss-eap-6.4.0.zip - - -3) Download Fuse EAP installer (for example from http://origin-repository.jboss.org/nexus/content/groups/m2-proxy/com/redhat/fuse/eap/fuse-eap-installer/6.3.0.redhat-220/ ) - -4) Install previously downloaded file manually - - - mvn install:install-file \ - -DgroupId=com.redhat.fuse.eap \ - -DartifactId=fuse-eap-installer \ - -Dversion=6.3.0.redhat-347 \ - -Dpackaging=jar \ - -Dfile=/fuse-eap-installer-6.3.0.redhat-347.jar - - -5) Prepare EAP6 with Hawtio and run the test - - - # Prepare EAP6 and deploy hawtio - mvn -f testsuite/integration-arquillian/servers \ - clean install \ - -Pauth-server-wildfly \ - -Papp-server-eap6 \ - -Dapp.server.jboss.version=7.5.21.Final-redhat-1 \ - -Dfuse63.version=6.3.0.redhat-347 - - # Run the test - mvn -f testsuite/integration-arquillian/tests/base/pom.xml \ - clean install \ - -Pauth-server-wildfly \ - -Papp-server-eap6 \ - -Dtest=EAP6Fuse6HawtioAdapterTest - - ## Migration test ### DB migration test diff --git a/testsuite/integration-arquillian/README.md b/testsuite/integration-arquillian/README.md index e9eceb0da04..24bec855357 100644 --- a/testsuite/integration-arquillian/README.md +++ b/testsuite/integration-arquillian/README.md @@ -182,8 +182,7 @@ integration-arquillian │ │ │ ├──app-server │ │ ├──jboss (wildfly/eap/as) -│ │ ├──tomcat -│ │ └──karaf +│ │ └──tomcat │ │ │ └──wildfly-balancer │ @@ -194,8 +193,7 @@ integration-arquillian └──other (common settings for all test modules dependent on base) │ ├──adapters (common settings for all adapter test modules - will be moved into base) - │ ├──jboss - │ └──karaf + │ └──jboss │ ├──console ├──console_no_users diff --git a/testsuite/integration-arquillian/pom.xml b/testsuite/integration-arquillian/pom.xml index 2856f5c7f87..b17ea25828d 100644 --- a/testsuite/integration-arquillian/pom.xml +++ b/testsuite/integration-arquillian/pom.xml @@ -55,7 +55,6 @@ 3.0.1.Final 1.0.1.Final 1.0.0.CR3 - 2.2.0.Final 1.2.0.Beta3 1.1.0.Final 1.1.0.Final @@ -212,22 +211,6 @@ undertow-embedded ${undertow-embedded.version} - - org.jboss.arquillian.container - arquillian-container-karaf-managed - ${arquillian-container-karaf.version} - - - org.jboss.arquillian.container - arquillian-container-osgi - ${arquillian-container-karaf.version} - - - com.google.guava - guava - - - diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/assembly.xml b/testsuite/integration-arquillian/servers/app-server/karaf/assembly.xml deleted file mode 100644 index d908d35b667..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/assembly.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - ${app.server.karaf} - - - zip - - - false - - - - ${app.server.karaf.home} - app-server-${app.server.karaf} - - **/*.sh - %regex[.*config/org/ops4j/pax/web/context.*] - - - - ${app.server.karaf.home} - app-server-${app.server.karaf} - - **/*.sh - - 0755 - - - - diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/pom.xml b/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/pom.xml deleted file mode 100644 index ea0d6fb5bd8..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-karaf - 999-SNAPSHOT - - 4.0.0 - - integration-arquillian-servers-app-server-fuse63 - jar - App Server - Fuse 6.3 - - - fuse63 - org.jboss.fuse - jboss-fuse-karaf - ${fuse63.version} - jboss-fuse-${fuse63.version} - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-spi - ${project.version} - - - org.keycloak.testsuite - integration-arquillian-util - ${project.version} - - - org.jboss.arquillian.container - arquillian-container-osgi - - - com.google.guava - guava - - - - - - - - - maven-enforcer-plugin - - - - enforce - - - - - fuse63.version - - - - - - - - - - diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/java/org/keycloak/testsuite/arquillian/fuse/Fuse63AppServerArquillianExtension.java b/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/java/org/keycloak/testsuite/arquillian/fuse/Fuse63AppServerArquillianExtension.java deleted file mode 100644 index 86567707818..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/java/org/keycloak/testsuite/arquillian/fuse/Fuse63AppServerArquillianExtension.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.arquillian.fuse; - -import org.jboss.arquillian.container.spi.client.container.DeployableContainer; -import org.jboss.arquillian.core.spi.LoadableExtension; -import org.keycloak.testsuite.utils.arquillian.fuse.CustomFuseContainer; - -/** - * - * @author Vlasta Ramik - */ -public class Fuse63AppServerArquillianExtension implements LoadableExtension { - - @Override - public void register(ExtensionBuilder builder) { - - builder.service(DeployableContainer.class, CustomFuseContainer.class); - - } - -} diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/java/org/keycloak/testsuite/arquillian/fuse/container/Fuse63AppServerProvider.java b/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/java/org/keycloak/testsuite/arquillian/fuse/container/Fuse63AppServerProvider.java deleted file mode 100644 index afc0f20d59f..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/java/org/keycloak/testsuite/arquillian/fuse/container/Fuse63AppServerProvider.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.arquillian.fuse.container; - -import java.util.ArrayList; -import java.util.List; -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.fuse.CustomFuseContainer; - -/** - * @author Vlasta Ramik - */ -public class Fuse63AppServerProvider implements AppServerContainerProvider { - - private Node configuration; - private static final String containerName = "fuse63"; - - private final String appServerHome; - private final String appServerJavaHome; - private final String managementUser; - private final String managementPassword; - - public Fuse63AppServerProvider() { - appServerHome = System.getProperty("app.server.home"); - appServerJavaHome = System.getProperty("app.server.java.home"); - managementUser = System.getProperty("app.server.management.user"); - managementPassword = System.getProperty("app.server.management.password"); - - Validate.notNullOrEmpty(appServerHome, "app.server.home is not set."); - Validate.notNullOrEmpty(appServerJavaHome, "app.server.java.home is not set."); - Validate.notNullOrEmpty(managementUser, "app.server.management.user is not set."); - Validate.notNullOrEmpty(managementPassword, "app.server.management.password is not set."); - } - - @Override - public String getName() { - return containerName; - } - - @Override - public List getContainers() { - List containers = new ArrayList<>(); - - containers.add(standaloneContainer()); - - return containers; - } - - private void createChild(String name, String text) { - configuration.createChild("property").attribute("name", name).text(text); - } - - private Node standaloneContainer() { - Node container = new Node("container"); - container.attribute("mode", "manual"); - container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName); - - configuration = container.createChild("configuration"); - createChild("enabled", "true"); - createChild("adapterImplClass", CustomFuseContainer.class.getName()); - createChild("autostartBundle", "false"); - createChild("karafHome", appServerHome); - createChild("javaHome", appServerJavaHome); - createChild("javaVmArguments", - System.getProperty("app.server.karaf.jvm.debug.args", "") + " " + - System.getProperty("adapter.test.props", " ") - ); - - createChild("jmxServiceURL", "service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root"); - createChild("jmxUsername", managementUser); - createChild("jmxPassword", managementPassword); - - return container; - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension deleted file mode 100644 index acdc5ffb6b9..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.testsuite.arquillian.fuse.Fuse63AppServerArquillianExtension diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider b/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider deleted file mode 100644 index fc1bdd722bb..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.testsuite.arquillian.fuse.container.Fuse63AppServerProvider diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/keycloak-direct-access.json b/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/keycloak-direct-access.json deleted file mode 100644 index 2441134231b..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/keycloak-direct-access.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm": "demo", - "resource": "ssh-jmx-admin-client", - "ssl-required" : "external", - "auth-server-url" : "http://localhost:8080/auth", - "credentials": { - "secret": "password" - } -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/keycloak-hawtio-client.json b/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/keycloak-hawtio-client.json deleted file mode 100644 index 64d0d578854..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/keycloak-hawtio-client.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "realm" : "demo", - "resource" : "hawtio-client", - "auth-server-url" : "http://localhost:8080/auth", - "ssl-required" : "external", - "public-client" : true -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/keycloak-hawtio.json b/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/keycloak-hawtio.json deleted file mode 100644 index 36daac064ad..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/keycloak-hawtio.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm" : "demo", - "resource" : "jaas", - "bearer-only" : true, - "auth-server-url" : "http://localhost:8080/auth", - "ssl-required" : "external", - "use-resource-role-mappings": false, - "principal-attribute": "preferred_username" -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/users.properties b/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/users.properties deleted file mode 100644 index f2814f4a3c1..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/main/resources/users.properties +++ /dev/null @@ -1 +0,0 @@ -admin=password,admin,manager,viewer,Monitor, Operator, Maintainer, Deployer, Auditor, Administrator, SuperUser \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/saml-adapter-not-supported b/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/saml-adapter-not-supported deleted file mode 100644 index 8b137891791..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse63/src/saml-adapter-not-supported +++ /dev/null @@ -1 +0,0 @@ - diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/pom.xml b/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/pom.xml deleted file mode 100644 index e846e9d72f4..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-karaf - 999-SNAPSHOT - - 4.0.0 - - integration-arquillian-servers-app-server-fuse7x - jar - App Server - Fuse 7.x - - - fuse7x - org.jboss.fuse - fuse-karaf - ${fuse7x.version} - fuse-karaf-${fuse7x.version} - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-spi - ${project.version} - - - org.keycloak.testsuite - integration-arquillian-util - ${project.version} - - - org.jboss.arquillian.container - arquillian-container-osgi - - - com.google.guava - guava - - - - - - - - - maven-enforcer-plugin - - - - enforce - - - - - fuse7x.version - - - - - - - - - - diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/java/org/keycloak/testsuite/arquillian/fuse/Fuse7xAppServerArquillianExtension.java b/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/java/org/keycloak/testsuite/arquillian/fuse/Fuse7xAppServerArquillianExtension.java deleted file mode 100644 index 7b2a6fa71af..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/java/org/keycloak/testsuite/arquillian/fuse/Fuse7xAppServerArquillianExtension.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.arquillian.fuse; - -import org.jboss.arquillian.container.spi.client.container.DeployableContainer; -import org.jboss.arquillian.core.spi.LoadableExtension; -import org.keycloak.testsuite.utils.arquillian.fuse.CustomFuseContainer; - -/** - * - * @author Vlasta Ramik - */ -public class Fuse7xAppServerArquillianExtension implements LoadableExtension { - - @Override - public void register(ExtensionBuilder builder) { - - builder.service(DeployableContainer.class, CustomFuseContainer.class); - - } - -} diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/java/org/keycloak/testsuite/arquillian/fuse/container/Fuse7xAppServerProvider.java b/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/java/org/keycloak/testsuite/arquillian/fuse/container/Fuse7xAppServerProvider.java deleted file mode 100644 index d7652b11f1d..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/java/org/keycloak/testsuite/arquillian/fuse/container/Fuse7xAppServerProvider.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2018 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.arquillian.fuse.container; - -import java.util.ArrayList; -import java.util.List; -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.fuse.CustomFuseContainer; - -/** - * @author Vlasta Ramik - */ -public class Fuse7xAppServerProvider implements AppServerContainerProvider { - - private Node configuration; - private static final String containerName = "fuse7x"; - - private final String appServerHome; - private final String appServerJavaHome; - private final String managementUser; - private final String managementPassword; - - public Fuse7xAppServerProvider() { - appServerHome = System.getProperty("app.server.home"); - appServerJavaHome = System.getProperty("app.server.java.home"); - managementUser = System.getProperty("app.server.management.user"); - managementPassword = System.getProperty("app.server.management.password"); - - Validate.notNullOrEmpty(appServerHome, "app.server.home is not set."); - Validate.notNullOrEmpty(appServerJavaHome, "app.server.java.home is not set."); - Validate.notNullOrEmpty(managementUser, "app.server.management.user is not set."); - Validate.notNullOrEmpty(managementPassword, "app.server.management.password is not set."); - } - - @Override - public String getName() { - return containerName; - } - - @Override - public List getContainers() { - List containers = new ArrayList<>(); - - containers.add(standaloneContainer()); - - return containers; - } - - private void createChild(String name, String text) { - configuration.createChild("property").attribute("name", name).text(text); - } - - private Node standaloneContainer() { - Node container = new Node("container"); - container.attribute("mode", "manual"); - container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName); - - configuration = container.createChild("configuration"); - createChild("enabled", "true"); - createChild("adapterImplClass", CustomFuseContainer.class.getName()); - createChild("autostartBundle", "false"); - createChild("karafHome", appServerHome); - createChild("javaHome", appServerJavaHome); - createChild("javaVmArguments", - System.getProperty("app.server.karaf.jvm.debug.args", "") + " " + - System.getProperty("adapter.test.props", " ") - ); - - createChild("jmxServiceURL", "service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root"); - createChild("jmxUsername", managementUser); - createChild("jmxPassword", managementPassword); - - return container; - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension deleted file mode 100644 index 68b1252ddba..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.testsuite.arquillian.fuse.Fuse7xAppServerArquillianExtension diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider b/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider deleted file mode 100644 index 97783aed9b3..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/META-INF/services/org.keycloak.testsuite.arquillian.container.AppServerContainerProvider +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.testsuite.arquillian.fuse.container.Fuse7xAppServerProvider diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/cxf-customerservice-keycloak.json b/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/cxf-customerservice-keycloak.json deleted file mode 100644 index d0e4ad4d321..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/cxf-customerservice-keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm": "demo", - "resource": "builtin-cxf-app", - "auth-server-url": "http://localhost:8080/auth", - "ssl-required" : "external", - "bearer-only": true, - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-bearer.json b/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-bearer.json deleted file mode 100644 index b7f6b9ea90a..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-bearer.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm" : "demo", - "resource" : "jaas", - "bearer-only" : true, - "auth-server-url" : "http://localhost:8080/auth", - "ssl-required" : "external", - "use-resource-role-mappings": false, - "principal-attribute": "preferred_username" -} diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-direct-access.json b/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-direct-access.json deleted file mode 100644 index bc741a9c819..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-direct-access.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm" : "demo", - "resource" : "ssh-jmx-admin-client", - "auth-server-url" : "http://localhost:8080/auth", - "ssl-required" : "external", - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-hawtio-client.json b/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-hawtio-client.json deleted file mode 100644 index 97fb5c97475..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-hawtio-client.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "realm" : "demo", - "clientId" : "hawtio-client", - "url" : "http://localhost:8080/auth", - "ssl-required" : "external", - "public-client" : true -} diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-hawtio.json b/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-hawtio.json deleted file mode 100644 index bc741a9c819..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/keycloak-hawtio.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm" : "demo", - "resource" : "ssh-jmx-admin-client", - "auth-server-url" : "http://localhost:8080/auth", - "ssl-required" : "external", - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/users.properties b/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/users.properties deleted file mode 100644 index a71b022c9ef..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/main/resources/users.properties +++ /dev/null @@ -1 +0,0 @@ -admin=password,admin,manager,viewer,ssh,systembundles diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/saml-adapter-not-supported b/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/saml-adapter-not-supported deleted file mode 100644 index 8b137891791..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/fuse7x/src/saml-adapter-not-supported +++ /dev/null @@ -1 +0,0 @@ - diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/pom.xml b/testsuite/integration-arquillian/servers/app-server/karaf/pom.xml deleted file mode 100644 index 3f510de1768..00000000000 --- a/testsuite/integration-arquillian/servers/app-server/karaf/pom.xml +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server - 999-SNAPSHOT - - 4.0.0 - - integration-arquillian-servers-app-server-karaf - pom - App Server - Karaf - - - ${project.parent.basedir}/common - ${project.parent.basedir}/assembly.xml - ${containers.home}/${app.server.karaf.unpacked.folder.name} - - - - - - app-server-karaf-submodules - - - src - - - - - - - maven-enforcer-plugin - - - - enforce - - - - - app.server.karaf - app.server.karaf.groupId - app.server.karaf.artifactId - app.server.karaf.version - app.server.karaf.unpacked.folder.name - - - !windows - Automated Karaf/Fuse adapter configuration currently doesn't work on Windows. - - - - - - - - - maven-dependency-plugin - - - unpack-karaf - generate-resources - - unpack - - - - - ${app.server.karaf.groupId} - ${app.server.karaf.artifactId} - ${app.server.karaf.version} - zip - ${containers.home} - - - true - - - - - - maven-resources-plugin - - - copy-configs - process-resources - - copy-resources - - - ${app.server.karaf.home}/etc - true - - - src/main/resources - - users.properties - keycloak-bearer.json - cxf-customerservice-keycloak.json - keycloak-direct-access.json - keycloak-hawtio-client.json - keycloak-hawtio.json - - - - - - - - - maven-assembly-plugin - - - create-zip - package - - single - - - - ${assembly.xml} - - false - - - - - - - - - - app-server-fuse63 - - - app.server - fuse63 - - - - fuse63 - - - - app-server-fuse7x - - - app.server - fuse7x - - - - fuse7x - - - - - diff --git a/testsuite/integration-arquillian/servers/app-server/pom.xml b/testsuite/integration-arquillian/servers/app-server/pom.xml index b317209256e..17d7e7cddfc 100644 --- a/testsuite/integration-arquillian/servers/app-server/pom.xml +++ b/testsuite/integration-arquillian/servers/app-server/pom.xml @@ -38,7 +38,6 @@ app-server-spi jboss - karaf tomcat undertow jetty diff --git a/testsuite/integration-arquillian/test-apps/fuse/README.md b/testsuite/integration-arquillian/test-apps/fuse/README.md deleted file mode 100644 index c8c810b9771..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/README.md +++ /dev/null @@ -1,76 +0,0 @@ -Keycloak Fuse demo -================== - -Currently Keycloak supports securing your web applications running inside [JBoss Fuse](http://www.jboss.org/products/fuse/overview/) or [Apache Karaf](http://karaf.apache.org/). It leverages: -- Jetty9 adapter for both JBoss Fuse 6.3 and Apache Karaf 4, that include [Jetty9](http://eclipse.org/jetty/) server under the covers and Jetty is used for running various kinds of web applications -- Jetty8 adapter for both JBoss Fuse 6.2 and Apache Karaf 3, that include [Jetty8](http://eclipse.org/jetty/) server under the covers and Jetty is used for running various kinds of web applications - -It's highly recommended to use the JBoss Fuse 6.3.0 Rollup 1 or newer for this tutorial. - -**WARNING:** Running your applications inside standalone Apache Karaf may work, however we are testing just with JBoss Fuse 6.3.0 Rollup 1 and not with standalone Karaf server. Also we -did not test with Fuse versions older than 6.3.0 Rollup 1. So if you really want adapter on standalone Karaf server or older Fuse, it's up to you to figure exact steps to have it working. - -The Fuse example is slightly modified version of Keycloak base demo applications. The main difference among base demo is that for Fuse demo -are applications running on separate Fuse server. Keycloak server is supposed to run separately on Wildfly. - -Fuse demo contains those basic applications: -* **customer-app-fuse** A WAR application that is deployed with [pax-war extender](https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+War) -* **product-app-fuse** A servlet application deployed with [pax-whiteboard extender](https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+Whiteboard) -* **camel** [Apache Camel](http://camel.apache.org/) endpoint running on separate Jetty engine on [http://localhost:8383/admin-camel-endpoint](http://localhost:8383/admin-camel-endpoint). -The customer-app-fuse invokes the endpoint to get data. -* **cxf-jaxrs** [Apache CXF](http://cxf.apache.org/) JAX-RS endpoint running on default Jetty on [http://localhost:8181/cxf/customerservice](http://localhost:8181/cxf/customerservice). -The customer-app-fuse invokes the endpoint to get data -* **cxf-jaxws** [Apache CXF](http://cxf.apache.org/) JAX-WS endpoint running on separate Jetty engine on [http://localhost:8282/PersonServiceCF](http://localhost:8282/PersonServiceCF). -The product-app-fuse invokes the endpoint to get data. -* **external-config** A WAR application with external adapter configuration not bundled within the application, but instead in `$FUSE_HOME/etc` directory. - -Running of demo consists of 2 steps. First you need to run separate Keycloak server and then Fuse server with the applications - -Base steps ----------- - -* Run external instance of Keycloak server on WildFly . It's easiest to run and download Keycloak standalone server. Fuse demo suppose that server is running on [http://localhost:8080/auth](http://localhost:8080/auth) -* Import realm `demo` from the file `demorealm.json` on `examples/fuse/demorealm.json` . See [here](../demo-template/README.md#step-3-import-the-test-realm) -the details on how to import the realm -* Then download Keycloak examples and build Fuse example, which is needed so the feature repository is added to your local maven repo: - -``` -unzip -q keycloak-examples-.zip -cd keycloak-examples-/fuse -mvn clean install -``` - - -Running demo on JBoss Fuse 6.3.0 Rollup 1 ------------------------------- -You just need to download and run JBoss Fuse and then run those commands from the karaf terminal to install the needed features and Keycloak fuse demo (Replace Keycloak versions with the current Keycloak version number): - -``` -KEYCLOAK_VERSION="2.2.1.Final" -features:addurl mvn:org.keycloak/keycloak-osgi-features/$KEYCLOAK_VERSION/xml/features -features:addurl mvn:org.keycloak.testsuite/fuse-example-keycloak-features/$KEYCLOAK_VERSION/xml/features -features:install keycloak-fuse-6.3-example -``` - -After that you can test running on [http://localhost:8181/customer-portal](http://localhost:8181/customer-portal) and login as "bburke@redhat.com" with password "password". Customer-portal is able to -receive the response from the endpoints provided by `cxf-jaxrs` and `camel` applications. Note that camel endpoint is available just for users with role `admin` -in this demo, so "bburke@redhat.com" can't access it. You may login as "admin" with password "password" in order to invoke camel endpoint. - -From [http://localhost:8181/product-portal](http://localhost:8181/product-portal) you will see servlet endpoint, which invokes JAX-WS provided by `cxf-jaxws` application. - -Note that this demo also secures whole default CXF endpoint on [http://localhost:8181/cxf](http://localhost:8181/cxf) hence every application running under it is secured too. - -To have the `external-config` example running, you can copy the file `examples/fuse/external-config/external-config-keycloak.json` to the `$FUSE_HOME/etc` directory. -Then go to [http://localhost:8181/external-config/index.html](http://localhost:8181/external-config/index.html) to test the secured application. - -How to secure your own application ----------------------------------- -See [Docs](https://keycloak.gitbooks.io/securing-client-applications-guide/content/v/latest/topics/oidc/java/fuse-adapter.html) for more details. - - -How to secure Fuse admin services ---------------------------------- -It's possible to secure fuse admin services with Keycloak too. See [fuse-admin](fuse-admin/README.md) for info on how to secure -Fuse admin console, remote SSH and JMX access with Keycloak. - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/pom.xml b/testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/pom.xml deleted file mode 100755 index 0d060c51b7c..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/pom.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - integration-arquillian-test-apps-fuse-parent - org.keycloak.testsuite - 999-SNAPSHOT - - - 4.0.0 - fuse-example-camel-endpoint-fuse7-undertow - bundle - Camel endpoint example - Secured in Karaf/Fuse 7.0 on Undertow - - - - - - - - javax.servlet;version="[3.1,5)", - javax.servlet.http;version="[3.1,5)", - javax.net.ssl, - org.apache.camel.*, - io.undertow.*;version="[1.4,3)", - org.apache.camel;version="[2.13,3)", - org.keycloak.*;version="${project.version}", - org.osgi.service.blueprint, - org.osgi.service.blueprint.container - - - org.keycloak.example.* - - - - - - org.jboss.spec.javax.servlet - jboss-servlet-api_3.0_spec - provided - - - org.keycloak - keycloak-core - - - org.apache.camel - camel-core - ${camel.version} - - - org.apache.camel - camel-blueprint - ${camel.version} - - - org.apache.camel - camel-undertow - ${camel.version} - - - io.undertow - undertow-core - - - - - install - - - - org.apache.felix - maven-bundle-plugin - true - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.private} - ${keycloak.osgi.export} - - - - - - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/src/main/java/org/keycloak/example/CamelHelloProcessor.java b/testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/src/main/java/org/keycloak/example/CamelHelloProcessor.java deleted file mode 100644 index ab637fdbb30..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/src/main/java/org/keycloak/example/CamelHelloProcessor.java +++ /dev/null @@ -1,48 +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.example; - -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.keycloak.KeycloakPrincipal; -import org.keycloak.representations.AccessToken; -import javax.servlet.http.HttpServletRequest; - -/** - * @author Marek Posolda - */ -public class CamelHelloProcessor implements Processor { - - @Override - public void process(Exchange exchange) throws Exception { - // Fuse 7 - KeycloakPrincipal keycloakPrincipal = (KeycloakPrincipal) exchange.getProperty(KeycloakPrincipal.class.getName(), KeycloakPrincipal.class); - - if (keycloakPrincipal == null) { - // Fuse 6.3 - HttpServletRequest req = exchange.getIn().getBody(HttpServletRequest.class); - keycloakPrincipal = (KeycloakPrincipal) req.getUserPrincipal(); - } - - AccessToken accessToken = keycloakPrincipal.getKeycloakSecurityContext().getToken(); - String username = accessToken.getPreferredUsername(); - String fullName = accessToken.getName(); - - exchange.getOut().setBody("Hello " + username + "! Your full name is " + fullName + "."); - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 83c9131d216..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Hello rest service - - Just a hello - - - - - - - - - - - (__This second sentence is returned from a Camel RestDSL endpoint__) - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json b/testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json deleted file mode 100644 index a9b9993d63d..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/camel-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "realm": "demo", - "resource": "admin-camel-endpoint", - "bearer-only": "true", - "auth-server-url": "http://localhost:8080/auth", - "ssl-required" : "external", - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/camel/pom.xml b/testsuite/integration-arquillian/test-apps/fuse/camel/pom.xml deleted file mode 100755 index 2ec0665b04e..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/camel/pom.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - integration-arquillian-test-apps-fuse-parent - org.keycloak.testsuite - 999-SNAPSHOT - - - 4.0.0 - org.keycloak.testsuite - fuse-example-camel-endpoint - bundle - Camel endpoint example - Secured in Karaf/Fuse - - - - - - - - javax.servlet;version="[3.1,5)", - javax.servlet.http;version="[3.1,5)", - org.apache.camel.*, - org.apache.camel;version="[2.13,3)", - org.eclipse.jetty.security;version="[8,10)", - org.eclipse.jetty.server.nio;version="[8,10)", - org.eclipse.jetty.util.security;version="[8,10)", - org.keycloak.*;version="${project.version}", - org.osgi.service.blueprint, - org.osgi.service.blueprint.container, - org.osgi.service.event, - - - org.keycloak.example.* - - - - - - org.keycloak - keycloak-core - - - org.apache.camel - camel-core - ${camel.version} - - - org.apache.camel - camel-blueprint - ${camel.version} - - org.apache.camel - camel-jetty9 - ${camel.version} - - - - - install - - - - org.apache.felix - maven-bundle-plugin - true - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.private} - ${keycloak.osgi.export} - - - - - - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/camel/src/main/java/org/keycloak/example/CamelHelloProcessor.java b/testsuite/integration-arquillian/test-apps/fuse/camel/src/main/java/org/keycloak/example/CamelHelloProcessor.java deleted file mode 100644 index ba0d852fbc7..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/camel/src/main/java/org/keycloak/example/CamelHelloProcessor.java +++ /dev/null @@ -1,42 +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.example; - -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.keycloak.KeycloakPrincipal; -import org.keycloak.representations.AccessToken; - -import javax.servlet.http.HttpServletRequest; - -/** - * @author Marek Posolda - */ -public class CamelHelloProcessor implements Processor { - - @Override - public void process(Exchange exchange) throws Exception { - HttpServletRequest req = exchange.getIn().getBody(HttpServletRequest.class); - KeycloakPrincipal keycloakPrincipal = (KeycloakPrincipal) req.getUserPrincipal(); - AccessToken accessToken = keycloakPrincipal.getKeycloakSecurityContext().getToken(); - String username = accessToken.getPreferredUsername(); - String fullName = accessToken.getName(); - - exchange.getOut().setBody("Hello " + username + "! Your full name is " + fullName + "."); - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/camel/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/testsuite/integration-arquillian/test-apps/fuse/camel/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 506adaa4288..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/camel/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - admin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hello rest service - - Just an helllo - - - - - - - - - - - (__This second sentence is returned from a Camel RestDSL endpoint__) - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/pom.xml b/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/pom.xml deleted file mode 100755 index 4d33849c160..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/pom.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - integration-arquillian-test-apps-fuse-parent - org.keycloak.testsuite - 999-SNAPSHOT - - - 4.0.0 - org.keycloak.testsuite - fuse-example-customer-portal - war - Customer Portal - Secured in Karaf/Fuse - - - - - - - org.apache.http.auth.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.client.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.conn.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.cookie.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.impl.auth.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.impl.client.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.impl.conn.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.impl.cookie.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.impl.execchain.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.*;version=${apache.httpcomponents.httpcore.fuse.version}, - javax.servlet.*;version="[3.1,5)", - org.keycloak.adapters.authentication;version="${project.version}";resolution:=optional, - org.keycloak.adapters.jetty;version="${project.version}";resolution:=optional, - org.keycloak.adapters;version="${project.version}", - org.keycloak.constants;version="${project.version}", - org.keycloak.util;version="${project.version}", - org.keycloak.*;version="${project.version}", - *;resolution:=optional - - - org.keycloak.example.* - - - - - - org.jboss.spec.javax.servlet - jboss-servlet-api_3.0_spec - provided - - - org.keycloak - keycloak-core - provided - - - org.keycloak - keycloak-adapter-core - provided - - - org.apache.httpcomponents - httpclient - provided - - - - - customer-portal-fuse - - - org.apache.maven.plugins - maven-war-plugin - - - ${basedir}/target/classes/META-INF/MANIFEST.MF - - - - - - org.apache.felix - maven-bundle-plugin - true - - - bundle-manifest - process-classes - - manifest - - - - - - war - - - customer-portal - customer-portal - WEB-INF/lib - .,WEB-INF/classes - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.private} - ${keycloak.osgi.export} - - - - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/java/org/keycloak/example/CamelClient.java b/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/java/org/keycloak/example/CamelClient.java deleted file mode 100644 index ae2eea708fe..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/java/org/keycloak/example/CamelClient.java +++ /dev/null @@ -1,115 +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.example; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; - -import javax.servlet.http.HttpServletRequest; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpGet; -import org.keycloak.KeycloakSecurityContext; -import org.keycloak.adapters.HttpClientBuilder; - -/** - * @author Marek Posolda - */ -public class CamelClient { - - public static String sendRequest(HttpServletRequest req) throws CxfRsClient.Failure { - KeycloakSecurityContext session = (KeycloakSecurityContext) req.getAttribute(KeycloakSecurityContext.class.getName()); - - HttpClient client = new HttpClientBuilder() - .disableTrustManager().build(); - - StringBuilder sb = new StringBuilder(); - try { - // Initially let's invoke a simple Camel-Jetty exposed endpoint - HttpGet get = new HttpGet("http://localhost:8383/admin-camel-endpoint"); - get.addHeader("Authorization", "Bearer " + session.getTokenString()); - try { - HttpResponse response = client.execute(get); - if (response.getStatusLine().getStatusCode() != 200) { - return "There was a failure processing request. You either didn't configure Keycloak properly or you don't have admin permission? Status code is " - + response.getStatusLine().getStatusCode(); - } - HttpEntity entity = response.getEntity(); - InputStream is = entity.getContent(); - try { - sb.append(getStringFromInputStream(is)); - } finally { - is.close(); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - // Here we invoke a Jetty endpoint, published using Camel RestDSL - get = new HttpGet("http://localhost:8484/restdsl/hello/world"); - get.addHeader("Authorization", "Bearer " + session.getTokenString()); - try { - HttpResponse response = client.execute(get); - if (response.getStatusLine().getStatusCode() != 200) { - return "There was a failure processing request with the RestDSL endpoint. You either didn't configure Keycloak properly or you don't have admin permission? Status code is " - + response.getStatusLine().getStatusCode(); - } - HttpEntity entity = response.getEntity(); - InputStream is = entity.getContent(); - try { - sb.append(getStringFromInputStream(is)); - } finally { - is.close(); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } finally { - client.getConnectionManager().shutdown(); - } - - return sb.toString(); - } - - private static String getStringFromInputStream(InputStream is) { - BufferedReader br = null; - StringBuilder sb = new StringBuilder(); - String line; - try { - br = new BufferedReader(new InputStreamReader(is)); - while ((line = br.readLine()) != null) { - sb.append(line); - } - } catch (IOException e) { - throw new RuntimeException(e); - } finally { - if (br != null) { - try { - br.close(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - } - return sb.toString(); - - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/java/org/keycloak/example/CxfRsClient.java b/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/java/org/keycloak/example/CxfRsClient.java deleted file mode 100644 index 8c54a82ccad..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/java/org/keycloak/example/CxfRsClient.java +++ /dev/null @@ -1,91 +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.example; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpGet; -import org.keycloak.KeycloakSecurityContext; -import org.keycloak.adapters.HttpClientBuilder; -import org.keycloak.common.util.UriUtils; -import org.keycloak.representations.IDToken; -import org.keycloak.util.JsonSerialization; - -import javax.servlet.http.HttpServletRequest; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -public class CxfRsClient { - - static class TypedList extends ArrayList { - } - - public static class Failure extends Exception { - private int status; - - public Failure(int status) { - this.status = status; - } - - public int getStatus() { - return status; - } - } - - public static IDToken getIDToken(HttpServletRequest req) { - KeycloakSecurityContext session = (KeycloakSecurityContext) req.getAttribute(KeycloakSecurityContext.class.getName()); - return session.getIdToken(); - - } - - public static List getCustomers(HttpServletRequest req) throws Failure { - KeycloakSecurityContext session = (KeycloakSecurityContext) req.getAttribute(KeycloakSecurityContext.class.getName()); - - HttpClient client = new HttpClientBuilder() - .disableTrustManager().build(); - try { - HttpGet get = new HttpGet(UriUtils.getOrigin(req.getRequestURL().toString()) + "/cxf/customerservice/customers"); - get.addHeader("Authorization", "Bearer " + session.getTokenString()); - try { - HttpResponse response = client.execute(get); - if (response.getStatusLine().getStatusCode() != 200) { - throw new Failure(response.getStatusLine().getStatusCode()); - } - HttpEntity entity = response.getEntity(); - InputStream is = entity.getContent(); - try { - return JsonSerialization.readValue(is, TypedList.class); - } finally { - is.close(); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } finally { - client.getConnectionManager().shutdown(); - } - } - -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/WEB-INF/jetty-web.xml deleted file mode 100644 index 6b42d3f00cf..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/WEB-INF/keycloak.json b/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/WEB-INF/keycloak.json deleted file mode 100755 index c7f61f68e39..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/WEB-INF/keycloak.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm": "demo", - "resource": "customer-portal", - "auth-server-url": "http://localhost:8080/auth", - "ssl-required" : "external", - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/WEB-INF/web.xml b/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/WEB-INF/web.xml deleted file mode 100755 index c41ce2bd94e..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - customer-portal - - - index.html - - - - - Customers - /customers/* - - - user - - - - - KEYCLOAK - does-not-matter - - - - admin - - - user - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/customers/camel.jsp b/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/customers/camel.jsp deleted file mode 100755 index 938b6e69bec..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/customers/camel.jsp +++ /dev/null @@ -1,13 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1" %> -<%@ page import="org.keycloak.example.CamelClient" %> - - - Camel page - - -

You will receive info from camel endpoint. Endpoint is accessible just for user with admin role

-

Response from camel: <%= CamelClient.sendRequest(request) %>

-

- - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/customers/cxf-rs.jsp b/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/customers/cxf-rs.jsp deleted file mode 100755 index c8d3fd1fb10..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/customers/cxf-rs.jsp +++ /dev/null @@ -1,54 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1" %> -<%@ page import="org.keycloak.common.util.KeycloakUriBuilder" %> -<%@ page import="org.keycloak.constants.ServiceUrlConstants" %> -<%@ page import="org.keycloak.example.CxfRsClient" %> -<%@ page import="org.keycloak.representations.IDToken" %> -<%@ page import="org.keycloak.common.util.UriUtils"%> -<%@ page import="org.keycloak.KeycloakSecurityContext"%> -<%@ page session="false" %> - - - Customer View Page - - -<% - String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth").path(ServiceUrlConstants.TOKEN_SERVICE_LOGOUT_PATH) - .queryParam("redirect_uri", "http://localhost:8181/customer-portal").build("demo").toString(); - String acctUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth").path(ServiceUrlConstants.ACCOUNT_SERVICE_PATH) - .queryParam("referrer", "customer-portal").build("demo").toString(); - IDToken idToken = CxfRsClient.getIDToken(request); - KeycloakSecurityContext kSession = (KeycloakSecurityContext) request.getAttribute(KeycloakSecurityContext.class.getName()); -%> -

Goto: products | logout | manage acct

-Servlet User Principal <%=request.getUserPrincipal().getName()%> - made this request. -

Caller IDToken values (You can specify what is returned in IDToken in the customer-portal claims page in the admin console:

-

Username: <%=idToken.getPreferredUsername()%>

-

Email: <%=idToken.getEmail()%>

-

Full Name: <%=idToken.getName()%>

-

First: <%=idToken.getGivenName()%>

-

Last: <%=idToken.getFamilyName()%>

-

Customer Listing

-

curl -H "Authorization: Bearer <%=kSession.getTokenString()%>" <%=UriUtils.getOrigin(request.getRequestURL().toString()) + "/cxf/customerservice/customers"%>

-<% - java.util.List list = null; - try { - list = CxfRsClient.getCustomers(request); - } catch (CxfRsClient.Failure failure) { - out.println("There was a failure processing request. You either didn't configure Keycloak properly, or maybe" + - "you just forgot to secure the cxf ws service?"); - out.println("Status from cxf ws service invocation was: " + failure.getStatus()); - return; - } - for (String cust : list) { - out.print("

"); - out.print(cust); - out.println("

"); - - } -%> -

- - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/index.html b/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/index.html deleted file mode 100755 index fc8b469bc93..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/customer-app-fuse/src/main/webapp/index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - Customer portal on Karaf/Fuse - - -

Customer Portal

- -

Customer Listing - CXF RS endpoint

- -

Admin Interface - Apache Camel endpoint

- - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/pom.xml b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/pom.xml deleted file mode 100755 index a01939a22a9..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/pom.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - integration-arquillian-test-apps-fuse-parent - org.keycloak.testsuite - 999-SNAPSHOT - - - 4.0.0 - fuse-example-cxf-jaxrs-fuse7-undertow - bundle - CXF JAXRS Example - Secured in Karaf/Fuse 7 on Undertow - - - - - - javax.ws.rs;version="[2,3)", - META-INF.cxf;version="[2.7,3.4)", - META-INF.cxf.osgi;version="[2.7,3.4)";resolution:=optional, - org.apache.cxf.transport.http;version="[2.7,3.4)", - org.apache.cxf.*;version="[2.7,3.4)", - com.fasterxml.jackson.jaxrs.json;version="[2.8,3)", - org.keycloak.*;version="${project.version}", - *;resolution:=optional - - - org.keycloak.example.rs.* - - - - - - org.apache.cxf - cxf-rt-frontend-jaxrs - ${cxf.jaxrs.version} - - - org.apache.cxf - cxf-rt-transports-http - ${cxf.version} - - - org.apache.cxf - cxf-rt-transports-http-undertow - ${cxf.undertow.version} - - - - - install - - - - org.apache.felix - maven-bundle-plugin - true - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.private} - ${keycloak.osgi.export} - - - - - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/java/org/keycloak/example/rs/CxfCustomerService.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/java/org/keycloak/example/rs/CxfCustomerService.java deleted file mode 100644 index 184391fe0d6..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/java/org/keycloak/example/rs/CxfCustomerService.java +++ /dev/null @@ -1,46 +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.example.rs; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import java.util.ArrayList; -import java.util.List; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -@Path("/customers") -public class CxfCustomerService { - - @GET - @Produces("application/json") - public List getCustomers() { - ArrayList rtn = new ArrayList(); - rtn.add("Bill Burke"); - rtn.add("Stian Thorgersen"); - rtn.add("Stan Silvert"); - rtn.add("Gabriel Cardoso"); - rtn.add("Viliam Rockai"); - rtn.add("Marek Posolda"); - rtn.add("Boleslaw Dawidowicz"); - return rtn; - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/resources/META-INF/cxf/bus-extensions.txt b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/resources/META-INF/cxf/bus-extensions.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index ba2c1117714..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json deleted file mode 100644 index a8c4b752e14..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm": "demo", - "resource": "builtin-cxf-app", - "auth-server-url": "http://localhost:8080/auth", - "ssl-required" : "external", - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/pom.xml b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/pom.xml deleted file mode 100755 index 2fdd9d6dba8..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - integration-arquillian-test-apps-fuse-parent - org.keycloak.testsuite - 999-SNAPSHOT - - - 4.0.0 - fuse-example-cxf-jaxrs - bundle - CXF JAXRS Example - Secured in Karaf/Fuse - - - - - - javax.ws.rs;version="[2,3)", - META-INF.cxf;version="[2.7,3.4)", - META-INF.cxf.osgi;version="[2.7,3.4)";resolution:=optional, - org.apache.cxf.transport.http;version="[2.7,3.4)", - org.apache.cxf.*;version="[2.7,3.4)", - com.fasterxml.jackson.jaxrs.json;version="${jackson.version}", - org.eclipse.jetty.security;version="[8,10)", - org.eclipse.jetty.util.security;version="[8,10)", - org.keycloak.*;version="${project.version}", - org.keycloak.adapters.jetty;version="${project.version}", - *;resolution:=optional - - - org.keycloak.example.rs.* - - - - - - org.apache.cxf - cxf-rt-frontend-jaxrs - ${cxf.jaxrs.version} - - - org.apache.cxf - cxf-rt-transports-http - ${cxf.version} - - - org.apache.cxf - cxf-rt-transports-http-jetty - ${cxf.jetty.version} - - - - - install - - - - org.apache.felix - maven-bundle-plugin - true - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.private} - ${keycloak.osgi.export} - - - - - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/java/org/keycloak/example/rs/CxfCustomerService.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/java/org/keycloak/example/rs/CxfCustomerService.java deleted file mode 100644 index 184391fe0d6..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/java/org/keycloak/example/rs/CxfCustomerService.java +++ /dev/null @@ -1,46 +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.example.rs; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import java.util.ArrayList; -import java.util.List; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -@Path("/customers") -public class CxfCustomerService { - - @GET - @Produces("application/json") - public List getCustomers() { - ArrayList rtn = new ArrayList(); - rtn.add("Bill Burke"); - rtn.add("Stian Thorgersen"); - rtn.add("Stan Silvert"); - rtn.add("Gabriel Cardoso"); - rtn.add("Viliam Rockai"); - rtn.add("Marek Posolda"); - rtn.add("Boleslaw Dawidowicz"); - return rtn; - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/META-INF/cxf/bus-extensions.txt b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/META-INF/cxf/bus-extensions.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 74b5fabf419..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - user - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/WEB-INF/jetty-web.xml deleted file mode 100644 index 6b42d3f00cf..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/WEB-INF/keycloak.json b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/WEB-INF/keycloak.json deleted file mode 100644 index a8c4b752e14..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxrs/src/main/resources/WEB-INF/keycloak.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm": "demo", - "resource": "builtin-cxf-app", - "auth-server-url": "http://localhost:8080/auth", - "ssl-required" : "external", - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/pom.xml b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/pom.xml deleted file mode 100755 index b8a9eea1e5d..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - integration-arquillian-test-apps-fuse-parent - org.keycloak.testsuite - 999-SNAPSHOT - - - 4.0.0 - fuse-example-cxf-jaxws-fuse7-undertow - bundle - CXF JAXWS Example - Secured in Karaf/Fuse 7 on Undertow - - - - - - javax.jws;resolution:=optional, - javax.wsdl, - javax.xml.bind;version="[2.2,3)", - javax.xml.bind.annotation;version="[2.2,3)", - javax.xml.namespace, - javax.xml.ws, - META-INF.cxf;version="[2.7,3.4)", - META-INF.cxf.osgi;version="[2.7,3.4)";resolution:=optional, - org.apache.cxf.transport.http_undertow;version="[2.7,3.4)";resolution:=optional, - org.apache.cxf.transport.http_undertow.blueprint;version="[2.7,3.4)";resolution:=optional, - org.keycloak.*;version="${project.version}", - *;resolution:=optional - - - org.keycloak.example.ws.* - - - - - - org.apache.geronimo.specs - geronimo-ws-metadata_2.0_spec - 1.1.2 - - - org.apache.geronimo.specs - geronimo-jaxws_2.2_spec - 1.0 - - - javax.xml.bind - jaxb-api - 2.2 - - - org.apache.cxf - cxf-rt-frontend-jaxws - ${cxf.version} - - - org.apache.cxf - cxf-rt-transports-http - ${cxf.version} - - - - - install - - - - org.apache.felix - maven-bundle-plugin - true - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.private} - ${keycloak.osgi.export} - - - - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/Product.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/Product.java deleted file mode 100644 index 90023bae34d..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/Product.java +++ /dev/null @@ -1,42 +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.example.ws; - -import org.keycloak.example.ws.types.ObjectFactory; - -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebService; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.ws.RequestWrapper; -import javax.xml.ws.ResponseWrapper; - -@WebService -@XmlSeeAlso({ObjectFactory.class}) -public interface Product { - - @RequestWrapper(localName = "GetProduct", className = "GetProduct") - @ResponseWrapper(localName = "GetProductResponse", className = "GetProductResponse") - @WebMethod(operationName = "GetProduct") - public void getProduct( - @WebParam(mode = WebParam.Mode.INOUT, name = "productId") - javax.xml.ws.Holder productId, - @WebParam(mode = WebParam.Mode.OUT, name = "name") - javax.xml.ws.Holder name - ) throws UnknownProductFault; -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/ProductImpl.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/ProductImpl.java deleted file mode 100644 index 80411354788..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/ProductImpl.java +++ /dev/null @@ -1,44 +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.example.ws; - -import javax.jws.WebService; -import javax.xml.ws.Holder; - -@WebService(serviceName = "ProductService", endpointInterface = "org.keycloak.example.ws.Product") -public class ProductImpl implements Product { - - public void getProduct(Holder productId, Holder name) - throws UnknownProductFault - { - if (productId.value == null || productId.value.length() == 0) { - org.keycloak.example.ws.types.UnknownProductFault fault = new org.keycloak.example.ws.types.UnknownProductFault(); - fault.setProductId(productId.value); - throw new UnknownProductFault(null,fault); - } else if (productId.value.trim().equals("1")) { - name.value = "IPad"; - } else if (productId.value.trim().equals("2")) { - name.value = "IPhone"; - } else { - org.keycloak.example.ws.types.UnknownProductFault fault = new org.keycloak.example.ws.types.UnknownProductFault(); - fault.setProductId(productId.value); - throw new UnknownProductFault(null,fault); - } - } - -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/UnknownProductFault.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/UnknownProductFault.java deleted file mode 100644 index da7ceb1975e..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/UnknownProductFault.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.example.ws; - -import javax.xml.ws.WebFault; - -@WebFault(name = "UnknownProductFault") -public class UnknownProductFault extends Exception { - - private org.keycloak.example.ws.types.UnknownProductFault unknownProductFault; - - public UnknownProductFault() { - super(); - } - - public UnknownProductFault(String message) { - super(message); - } - - public UnknownProductFault(String message, Throwable cause) { - super(message, cause); - } - - public UnknownProductFault(String message, org.keycloak.example.ws.types.UnknownProductFault unknownProductFault) { - super(message); - this.unknownProductFault = unknownProductFault; - } - - public UnknownProductFault(String message, org.keycloak.example.ws.types.UnknownProductFault unknownProductFault, Throwable cause) { - super(message, cause); - this.unknownProductFault = unknownProductFault; - } - - public org.keycloak.example.ws.types.UnknownProductFault getFaultInfo() { - return this.unknownProductFault; - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/GetProduct.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/GetProduct.java deleted file mode 100644 index 6e4b1c81438..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/GetProduct.java +++ /dev/null @@ -1,81 +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.example.ws.types; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="productId" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "productId" -}) -@XmlRootElement(name = "GetProduct") -public class GetProduct { - - @XmlElement(required = true) - protected String productId; - - /** - * Gets the value of the productId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getProductId() { - return productId; - } - - /** - * Sets the value of the productId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setProductId(String value) { - this.productId = value; - } - -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/GetProductResponse.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/GetProductResponse.java deleted file mode 100644 index a1220c3a69d..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/GetProductResponse.java +++ /dev/null @@ -1,109 +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.example.ws.types; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="productId" type="{http://www.w3.org/2001/XMLSchema}string"/>*
- *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "productId", - "name" -}) -@XmlRootElement(name = "GetProductResponse") -public class GetProductResponse { - - @XmlElement(required = true) - protected String productId; - @XmlElement(required = true) - protected String name; - - /** - * Gets the value of the productId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getProductId() { - return productId; - } - - /** - * Sets the value of the productId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setProductId(String value) { - this.productId = value; - } - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/ObjectFactory.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/ObjectFactory.java deleted file mode 100644 index eef95634f6a..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/ObjectFactory.java +++ /dev/null @@ -1,73 +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.example.ws.types; - -import javax.xml.bind.annotation.XmlRegistry; - - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the org.apache.servicemix.samples.wsdl_first.types package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.servicemix.samples.wsdl_first.types - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link GetProductResponse } - * - */ - public GetProductResponse createGetProductResponse() { - return new GetProductResponse(); - } - - /** - * Create an instance of {@link GetProduct } - * - */ - public GetProduct createGetProduct() { - return new GetProduct(); - } - - /** - * Create an instance of {@link UnknownProductFault } - * - */ - public UnknownProductFault createUnknownProductFault() { - return new UnknownProductFault(); - } - -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/UnknownProductFault.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/UnknownProductFault.java deleted file mode 100644 index 862239d4b06..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/UnknownProductFault.java +++ /dev/null @@ -1,81 +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.example.ws.types; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="productId" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "productId" -}) -@XmlRootElement(name = "UnknownProductFault") -public class UnknownProductFault { - - @XmlElement(required = true) - protected String productId; - - /** - * Gets the value of the productId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getProductId() { - return productId; - } - - /** - * Sets the value of the productId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setProductId(String value) { - this.productId = value; - } - -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/package-info.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/package-info.java deleted file mode 100644 index 4fd528b5de7..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/java/org/keycloak/example/ws/types/package-info.java +++ /dev/null @@ -1,18 +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.example.ws.types; diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 8acae94de5a..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json deleted file mode 100644 index e4caeb2c882..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "realm": "demo", - "resource": "custom-cxf-endpoint", - "bearer-only": "true", - "auth-server-url": "http://localhost:8080/auth", - "ssl-required" : "external" -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/pom.xml b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/pom.xml deleted file mode 100755 index a5d76af76a8..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/pom.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - integration-arquillian-test-apps-fuse-parent - org.keycloak.testsuite - 999-SNAPSHOT - - - 4.0.0 - fuse-example-cxf-jaxws - bundle - CXF JAXWS Example - Secured in Karaf/Fuse - - - - - - javax.jws;resolution:=optional, - javax.wsdl, - javax.xml.bind;version="[2.2,3)", - javax.xml.bind.annotation;version="[2.2,3)", - javax.xml.namespace, - javax.xml.ws, - META-INF.cxf;version="[2.7,3.4)", - META-INF.cxf.osgi;version="[2.7,3.4)";resolution:=optional, - org.apache.cxf.bus;version="[2.7,3.4)", - org.apache.cxf.bus.spring;version="[2.7,3.4)", - org.apache.cxf.bus.resource;version="[2.7,3.4)", - org.apache.cxf.transport.http;version="[2.7,3.4)", - org.apache.cxf.*;version="[2.7,3.4)", - org.springframework.beans.factory.config, - org.eclipse.jetty.security;version="[8,10)", - org.eclipse.jetty.util.security;version="[8,10)", - org.keycloak.*;version="${project.version}" - - - org.keycloak.example.ws.* - - - - - - org.apache.geronimo.specs - geronimo-ws-metadata_2.0_spec - 1.1.2 - - - org.apache.geronimo.specs - geronimo-jaxws_2.2_spec - 1.0 - - - javax.xml.bind - jaxb-api - 2.2 - - - org.apache.cxf - cxf-rt-frontend-jaxws - ${cxf.version} - - - org.apache.cxf - cxf-rt-transports-http - ${cxf.version} - - - - - install - - - - org.apache.felix - maven-bundle-plugin - true - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.private} - ${keycloak.osgi.export} - - - - - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/Product.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/Product.java deleted file mode 100644 index 90023bae34d..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/Product.java +++ /dev/null @@ -1,42 +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.example.ws; - -import org.keycloak.example.ws.types.ObjectFactory; - -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebService; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.ws.RequestWrapper; -import javax.xml.ws.ResponseWrapper; - -@WebService -@XmlSeeAlso({ObjectFactory.class}) -public interface Product { - - @RequestWrapper(localName = "GetProduct", className = "GetProduct") - @ResponseWrapper(localName = "GetProductResponse", className = "GetProductResponse") - @WebMethod(operationName = "GetProduct") - public void getProduct( - @WebParam(mode = WebParam.Mode.INOUT, name = "productId") - javax.xml.ws.Holder productId, - @WebParam(mode = WebParam.Mode.OUT, name = "name") - javax.xml.ws.Holder name - ) throws UnknownProductFault; -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/ProductImpl.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/ProductImpl.java deleted file mode 100644 index 80411354788..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/ProductImpl.java +++ /dev/null @@ -1,44 +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.example.ws; - -import javax.jws.WebService; -import javax.xml.ws.Holder; - -@WebService(serviceName = "ProductService", endpointInterface = "org.keycloak.example.ws.Product") -public class ProductImpl implements Product { - - public void getProduct(Holder productId, Holder name) - throws UnknownProductFault - { - if (productId.value == null || productId.value.length() == 0) { - org.keycloak.example.ws.types.UnknownProductFault fault = new org.keycloak.example.ws.types.UnknownProductFault(); - fault.setProductId(productId.value); - throw new UnknownProductFault(null,fault); - } else if (productId.value.trim().equals("1")) { - name.value = "IPad"; - } else if (productId.value.trim().equals("2")) { - name.value = "IPhone"; - } else { - org.keycloak.example.ws.types.UnknownProductFault fault = new org.keycloak.example.ws.types.UnknownProductFault(); - fault.setProductId(productId.value); - throw new UnknownProductFault(null,fault); - } - } - -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/UnknownProductFault.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/UnknownProductFault.java deleted file mode 100644 index da7ceb1975e..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/UnknownProductFault.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.example.ws; - -import javax.xml.ws.WebFault; - -@WebFault(name = "UnknownProductFault") -public class UnknownProductFault extends Exception { - - private org.keycloak.example.ws.types.UnknownProductFault unknownProductFault; - - public UnknownProductFault() { - super(); - } - - public UnknownProductFault(String message) { - super(message); - } - - public UnknownProductFault(String message, Throwable cause) { - super(message, cause); - } - - public UnknownProductFault(String message, org.keycloak.example.ws.types.UnknownProductFault unknownProductFault) { - super(message); - this.unknownProductFault = unknownProductFault; - } - - public UnknownProductFault(String message, org.keycloak.example.ws.types.UnknownProductFault unknownProductFault, Throwable cause) { - super(message, cause); - this.unknownProductFault = unknownProductFault; - } - - public org.keycloak.example.ws.types.UnknownProductFault getFaultInfo() { - return this.unknownProductFault; - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/GetProduct.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/GetProduct.java deleted file mode 100644 index 6e4b1c81438..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/GetProduct.java +++ /dev/null @@ -1,81 +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.example.ws.types; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="productId" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "productId" -}) -@XmlRootElement(name = "GetProduct") -public class GetProduct { - - @XmlElement(required = true) - protected String productId; - - /** - * Gets the value of the productId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getProductId() { - return productId; - } - - /** - * Sets the value of the productId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setProductId(String value) { - this.productId = value; - } - -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/GetProductResponse.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/GetProductResponse.java deleted file mode 100644 index a1220c3a69d..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/GetProductResponse.java +++ /dev/null @@ -1,109 +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.example.ws.types; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="productId" type="{http://www.w3.org/2001/XMLSchema}string"/>*
- *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "productId", - "name" -}) -@XmlRootElement(name = "GetProductResponse") -public class GetProductResponse { - - @XmlElement(required = true) - protected String productId; - @XmlElement(required = true) - protected String name; - - /** - * Gets the value of the productId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getProductId() { - return productId; - } - - /** - * Sets the value of the productId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setProductId(String value) { - this.productId = value; - } - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/ObjectFactory.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/ObjectFactory.java deleted file mode 100644 index eef95634f6a..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/ObjectFactory.java +++ /dev/null @@ -1,73 +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.example.ws.types; - -import javax.xml.bind.annotation.XmlRegistry; - - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the org.apache.servicemix.samples.wsdl_first.types package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.servicemix.samples.wsdl_first.types - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link GetProductResponse } - * - */ - public GetProductResponse createGetProductResponse() { - return new GetProductResponse(); - } - - /** - * Create an instance of {@link GetProduct } - * - */ - public GetProduct createGetProduct() { - return new GetProduct(); - } - - /** - * Create an instance of {@link UnknownProductFault } - * - */ - public UnknownProductFault createUnknownProductFault() { - return new UnknownProductFault(); - } - -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/UnknownProductFault.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/UnknownProductFault.java deleted file mode 100644 index 862239d4b06..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/UnknownProductFault.java +++ /dev/null @@ -1,81 +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.example.ws.types; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for anonymous complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType>
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="productId" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "", propOrder = { - "productId" -}) -@XmlRootElement(name = "UnknownProductFault") -public class UnknownProductFault { - - @XmlElement(required = true) - protected String productId; - - /** - * Gets the value of the productId property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getProductId() { - return productId; - } - - /** - * Sets the value of the productId property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setProductId(String value) { - this.productId = value; - } - -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/package-info.java b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/package-info.java deleted file mode 100644 index 4fd528b5de7..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/package-info.java +++ /dev/null @@ -1,18 +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.example.ws.types; diff --git a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/resources/META-INF/spring/beans.xml b/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/resources/META-INF/spring/beans.xml deleted file mode 100644 index 4f9af70ab95..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/cxf-jaxws/src/main/resources/META-INF/spring/beans.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - user - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/demorealm.json b/testsuite/integration-arquillian/test-apps/fuse/demorealm.json deleted file mode 100644 index 1f609e60f2c..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/demorealm.json +++ /dev/null @@ -1,294 +0,0 @@ -{ - "realm": "demo", - "enabled": true, - "accessTokenLifespan": 60, - "accessCodeLifespan": 60, - "accessCodeLifespanUserAction": 300, - "ssoSessionIdleTimeout": 600, - "ssoSessionMaxLifespan": 36000, - "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", "ssh" ], - "clientRoles": { - "account": [ "manage-account" ] - } - }, - { - "username" : "stian", - "enabled": true, - "email" : "stian@redhat.com", - "firstName": "Stian", - "lastName": "Thorgersen", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user", "ssh" ], - "clientRoles": { - "account": [ "manage-account" ] - } - }, - { - "username" : "mposolda@redhat.com", - "enabled": true, - "email" : "mposolda@redhat.com", - "firstName": "Marek", - "lastName": "Posolda", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user", "ssh" ], - "clientRoles": { - "account": [ "manage-account" ] - } - }, - { - "username" : "admin", - "enabled": true, - "email" : "admin@admin.com", - "firstName": "Admin", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user","admin", "ssh" ], - "clientRoles": { - "realm-management": [ "realm-admin" ], - "account": [ "manage-account" ] - } - }, - { - "username" : "jmxadmin", - "enabled": true, - "email" : "jmxadmin@admin.com", - "firstName": "JmxAdmin", - "lastName": "Burke", - "credentials" : [ - { "type" : "password", - "value" : "password" } - ], - "realmRoles": [ "user", "jmxAdmin", "ssh" ], - "clientRoles": { - "account": [ "manage-account" ], - "realm-management": [ "realm-admin" ] - } - }, - { - "username" : "john", - "firstName" : "John", - "lastName" : "Anthony", - "email" : "john@hawt.io", - "enabled" : true, - "credentials" : [ - { - "type" : "password", - "value" : "password" - } - ], - "realmRoles" : [ "viewer", "ssh" ], - "applicationRoles": { - "account" : [ "view-profile", "manage-account" ] - } - }, - { - "username" : "mary", - "firstName" : "Mary", - "lastName" : "Kelly", - "email" : "mary@hawt.io", - "enabled" : true, - "credentials" : [ - { - "type" : "password", - "value" : "password" - } - ], - "realmRoles" : [ "ssh" ], - "applicationRoles": { - "account" : [ "view-profile", "manage-account" ] - } - }, - { - "username" : "root", - "firstName" : "Root", - "lastName" : "Root", - "email" : "root@hawt.io", - "enabled" : true, - "credentials" : [ - { - "type" : "password", - "value" : "password" - } - ], - "realmRoles" : [ "jmxAdmin", "ssh" ], - "applicationRoles": { - "account" : [ "view-profile", "manage-account" ], - "realm-management" : [ "realm-admin" ] - } - } - ], - "roles" : { - "realm" : [ - { - "name": "user", - "description": "User privileges" - }, - { - "name": "admin", - "description": "Administrator privileges" - }, - { - "name": "manager" - }, - { - "name": "viewer" - }, - { - "name": "Operator" - }, - { - "name": "Maintainer" - }, - { - "name": "Deployer" - }, - { - "name": "Auditor" - }, - { - "name": "Administrator" - }, - { - "name": "SuperUser" - }, - { - "name": "ssh" - }, - { - "name": "jmxAdmin", - "description": "Admin role with all privileges to SSH and JMX access", - "composite": true, - "composites": { - "realm": [ "admin", "manager", "viewer", "Operator", "Maintainer", "Deployer", "Auditor", "Administrator", "SuperUser", "ssh" ] - } - } - ] - }, - "clients": [ - { - "clientId": "customer-portal", - "enabled": true, - "adminUrl": "http://localhost:8181/customer-portal", - "baseUrl": "http://localhost:8181/customer-portal", - "redirectUris": [ - "http://localhost:8181/customer-portal/*" - ], - "secret": "password" - }, - { - "clientId": "product-portal", - "enabled": true, - "adminUrl": "http://localhost:8181/product-portal", - "baseUrl": "http://localhost:8181/product-portal", - "redirectUris": [ - "http://localhost:8181/product-portal/*" - ], - "secret": "password" - }, - { - "clientId": "builtin-cxf-app", - "enabled": true, - "adminUrl": "http://localhost:8181/cxf", - "baseUrl": "http://localhost:8181/cxf", - "redirectUris": [ - "http://localhost:8181/cxf/*" - ], - "secret": "password" - }, - { - "clientId": "custom-cxf-endpoint", - "enabled": true, - "adminUrl": "http://localhost:8282/PersonServiceCF", - "baseUrl": "http://localhost:8282/PersonServiceCF", - "bearerOnly": true - }, - { - "clientId": "admin-camel-endpoint", - "enabled": true, - "adminUrl": "http://localhost:8383/admin-camel-endpoint", - "baseUrl": "http://localhost:8383/admin-camel-endpoint", - "bearerOnly": true - }, - { - "clientId": "admin-camel-restdsl", - "enabled": true, - "adminUrl": "http://localhost:8484/restdsl", - "baseUrl": "http://localhost:8484/restdsl", - "bearerOnly": true - }, - { - "clientId": "ssh-jmx-admin-client", - "enabled": true, - "publicClient": false, - "standardFlowEnabled": false, - "directAccessGrantsEnabled": true, - "secret": "password" - }, - { - "clientId": "external-config", - "enabled": true, - "adminUrl": "http://localhost:8181/external-config", - "baseUrl": "http://localhost:8181/external-config", - "redirectUris": [ - "http://localhost:8181/external-config", - "http://localhost:8181/external-config/*" - ], - "secret": "password" - }, - { - "clientId" : "hawtio-client", - "surrogateAuthRequired" : false, - "fullScopeAllowed" : false, - "enabled" : true, - "redirectUris" : [ "http://localhost:8080/hawtio/*", "http://localhost:8181/hawtio/*", "http://localhost:8081/hawtio/*" ], - "webOrigins" : [ "http://localhost:8080", "http://localhost:8181", "http://localhost:8081" ], - "bearerOnly" : false, - "publicClient" : true, - "protocol" : "openid-connect" - } - - ], - "scopeMappings": [ - { - "client": "ssh-jmx-admin-client", - "roles": [ "admin", "jmxAdmin" ] - }, - { - "client": "hawtio-client", - "roles": [ "viewer", "jmxAdmin" ] - } - ], - "clientScopeMappings": { - "account": [ - { - "client": "hawtio-client", - "roles": [ "view-profile", "manage-account" ] - } - ] - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/external-config/external-config-keycloak.json b/testsuite/integration-arquillian/test-apps/fuse/external-config/external-config-keycloak.json deleted file mode 100644 index 469da82a179..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/external-config/external-config-keycloak.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm": "demo", - "resource": "external-config", - "auth-server-url": "http://localhost:8080/auth", - "ssl-required" : "external", - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/external-config/pom.xml b/testsuite/integration-arquillian/test-apps/fuse/external-config/pom.xml deleted file mode 100755 index 3a899a865a7..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/external-config/pom.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - 4.0.0 - - - integration-arquillian-test-apps-fuse-parent - org.keycloak.testsuite - 999-SNAPSHOT - - - Keycloak Examples - External Config - fuse-example-external-config - war - org.keycloak.testsuite - - Keycloak External Config Example - - - - - - - org.apache.http.auth.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.client.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.conn.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.cookie.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.impl.auth.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.impl.client.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.impl.conn.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.impl.cookie.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.impl.execchain.*;version=${apache.httpcomponents.fuse.version}, - org.apache.http.*;version=${apache.httpcomponents.httpcore.fuse.version}, - javax.servlet.*;version="[3.1,5)", - org.keycloak.adapters.jetty;version="${project.version}";resolution:=optional, - org.keycloak.adapters;version="${project.version}", - org.keycloak.constants;version="${project.version}", - org.keycloak.adapters.osgi;version="${project.version}", - org.keycloak.util;version="${project.version}", - org.keycloak.*;version="${project.version}", - *;resolution:=optional - - - org.keycloak.example.* - - - - - - org.jboss.spec.javax.servlet - jboss-servlet-api_3.0_spec - provided - - - - - org.keycloak - keycloak-adapter-core - provided - - - org.keycloak - keycloak-adapter-spi - provided - - - - - org.keycloak - keycloak-core - provided - - - - external-config - - - org.apache.maven.plugins - maven-war-plugin - - - ${basedir}/target/classes/META-INF/MANIFEST.MF - - - - - org.apache.felix - maven-bundle-plugin - true - - - bundle-manifest - process-classes - - manifest - - - - - - war - - - external-config - external-config - WEB-INF/lib - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.private} - ${keycloak.osgi.export} - - - - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/java/org/keycloak/examples/ProtectedServlet.java b/testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/java/org/keycloak/examples/ProtectedServlet.java deleted file mode 100755 index ec30cccb3bf..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/java/org/keycloak/examples/ProtectedServlet.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.keycloak.examples;/* - * 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. - */ - -import org.keycloak.KeycloakPrincipal; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; - - -@WebServlet(urlPatterns = "/servlet") -public class ProtectedServlet extends HttpServlet { - - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - String realm = req.getPathInfo().split("/")[1]; - if (realm.contains("?")) { - realm = realm.split("\\?")[0]; - } - - if (req.getPathInfo().contains("logout")) { - req.logout(); - resp.sendRedirect(req.getContextPath() + "/" + realm); - return; - } - - KeycloakPrincipal principal = (KeycloakPrincipal) req.getUserPrincipal(); - - resp.setContentType("text/html"); - PrintWriter writer = resp.getWriter(); - - writer.write("Realm: "); - writer.write(principal.getKeycloakSecurityContext().getRealm()); - - writer.write("
User: "); - writer.write(principal.getKeycloakSecurityContext().getIdToken().getPreferredUsername()); - - writer.write(String.format("
Logout", realm)); - } - } diff --git a/testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/webapp/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/webapp/WEB-INF/jetty-web.xml deleted file mode 100644 index 6b42d3f00cf..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/webapp/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/webapp/WEB-INF/web.xml b/testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 43c63b2266d..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - External Config Example - - - keycloak.config.resolver - org.keycloak.adapters.osgi.PathBasedKeycloakConfigResolver - - - - index.html - - - - - - REST endpoints - /* - - - user - - - - - KEYCLOAK - specified-in-keycloak-json - - - - admin - - - user - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/webapp/index.html b/testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/webapp/index.html deleted file mode 100755 index 600c959181f..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/external-config/src/main/webapp/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - External Config Example Karaf/Fuse - - -

External configuration worked.

- -

Log out

- - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/features/pom.xml b/testsuite/integration-arquillian/test-apps/fuse/features/pom.xml deleted file mode 100755 index b83028789d7..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/features/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - integration-arquillian-test-apps-fuse-parent - org.keycloak.testsuite - 999-SNAPSHOT - - - 4.0.0 - org.keycloak.testsuite - fuse-example-keycloak-features - Keycloak Fuse Example - Features - - - - - - src/main/resources - true - - - - - org.apache.maven.plugins - maven-resources-plugin - - - filter - generate-resources - - resources - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - target/classes/features.xml - xml - features - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/features/src/main/resources/features.xml b/testsuite/integration-arquillian/test-apps/fuse/features/src/main/resources/features.xml deleted file mode 100644 index e73ccc38cca..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/features/src/main/resources/features.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - -
The Keycloak / Fuse 7.0 on Undertow example
- pax-http-undertow - war - camel - camel-undertow - cxf - keycloak - keycloak-pax-http-undertow - - mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${jackson.version} - mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson.version} - mvn:org.keycloak.testsuite/fuse-example-camel-endpoint-fuse7-undertow/${project.version} - mvn:org.keycloak.testsuite/fuse-example-cxf-jaxrs-fuse7-undertow/${project.version} - mvn:org.keycloak.testsuite/fuse-example-cxf-jaxws-fuse7-undertow/${project.version} - mvn:org.keycloak.testsuite/fuse-example-customer-portal/${project.version}/war - mvn:org.keycloak.testsuite/fuse-example-external-config/${project.version}/war - mvn:org.keycloak.testsuite/fuse-example-product-portal-fuse7-undertow/${project.version} -
- - -
The Keycloak / Fuse 6.3 example
- war - camel - camel-jetty9 - cxf - keycloak - keycloak-jetty9-adapter - mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${jackson.version} - mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson.version} - mvn:org.keycloak.testsuite/fuse-example-product-portal/${project.version} - mvn:org.keycloak.testsuite/fuse-example-customer-portal/${project.version}/war - mvn:org.keycloak.testsuite/fuse-example-external-config/${project.version}/war - mvn:org.keycloak.testsuite/fuse-example-camel-endpoint/${project.version} - mvn:org.keycloak.testsuite/fuse-example-cxf-jaxws/${project.version} - mvn:org.keycloak.testsuite/fuse-example-cxf-jaxrs/${project.version} -
- -
diff --git a/testsuite/integration-arquillian/test-apps/fuse/fuse-admin/README.md b/testsuite/integration-arquillian/test-apps/fuse/fuse-admin/README.md deleted file mode 100644 index c819724c7a7..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/fuse-admin/README.md +++ /dev/null @@ -1,51 +0,0 @@ -How to secure Fuse admin services -================================= - -Fuse admin console authentication on JBoss Fuse 6.3.0 Rollup 1 or newer ---------------------------------- -Fuse admin console is Hawt.io. Follow the instructions in [Docs](https://keycloak.gitbooks.io/securing-client-applications-guide/content/v/latest/topics/oidc/java/fuse/hawtio.html) for details on how to integrate it. - -Example steps: - -1) Import `demo` realm as mentioned in [Base steps](../README.md#base-steps) . It contains `hawtio-client` and some example users. - -2) Copy files [keycloak-hawtio.json](keycloak-hawtio.json) and [keycloak-hawtio-client.json](keycloak-hawtio-client.json) to the `$FUSE_HOME/etc/` directory. - -3) Edit properties in `$FUSE_HOME/etc/system.properties` as described in the documentation pointed above. - -3) Run Fuse and install `keycloak` feature in the terminal as described in the documentation pointed above. - -4) Test. After going to `http://localhost:8181/hawtio` you can login as any of these users. Password of all the sample users is `password` : -* root - He has role `admin` . He can access to everything in Hawtio -* john - He has role `viewer` . He can access to man functionalities in Hawtio. -* mary - She is not able to successfully authenticate to Hawtio - - -SSH authentication with keycloak credentials on JBoss Fuse 6.3.0 Rollup 1 or newer ------------------------------------------------------------------------ - -Follow the instructions in [Docs](https://keycloak.gitbooks.io/securing-client-applications-guide/content/v/latest/topics/oidc/java/fuse/fuse-admin.html) for details - -Example steps for enable SSH authentication: - -1) Import `demo` realm as mentioned in [Base steps](../README.md#base-steps) . It contains `ssh-jmx-admin-client` and some example users. - -2) Then you need to update/specify this property in file `$FUSE_HOME/etc/org.apache.karaf.shell.cfg` as mentioned in the docs pointed above. - -3) Copy file from Keycloak fuse examples [keycloak-direct-access.json](keycloak-direct-access.json) to `$FUSE_HOME/etc/` directory. - -4) Start Fuse and install `keycloak` JAAS realm into Fuse as mentioned in the docs pointed above. - -5) Try to login into SSH as different users with the command shown in the docs pointed above. Password of all the sample users is `password` : -* root - He can run any command in Fuse Karaf SSH terminal -* john - He can run just read-only commands (eg. `features:list` ) but not write command (eg. `features:addurl` ). -* mary - She is not able to successfully authenticate to SSH - - -JMX authentication with keycloak credentials on JBoss Fuse 6.3.0 Rollup 1 or newer ------------------------------------------------------------------------ - -See [Docs](https://keycloak.gitbooks.io/securing-client-applications-guide/content/v/latest/topics/oidc/java/fuse/fuse-admin.html) for details - -You can use file [keycloak-direct-access.json](keycloak-direct-access.json) to be copied into `$FUSE_HOME/etc/` as mentioned above in the SSH section. You can -also test with same users. diff --git a/testsuite/integration-arquillian/test-apps/fuse/fuse-admin/keycloak-direct-access.json b/testsuite/integration-arquillian/test-apps/fuse/fuse-admin/keycloak-direct-access.json deleted file mode 100644 index 2441134231b..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/fuse-admin/keycloak-direct-access.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm": "demo", - "resource": "ssh-jmx-admin-client", - "ssl-required" : "external", - "auth-server-url" : "http://localhost:8080/auth", - "credentials": { - "secret": "password" - } -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/fuse-admin/keycloak-hawtio-client.json b/testsuite/integration-arquillian/test-apps/fuse/fuse-admin/keycloak-hawtio-client.json deleted file mode 100644 index c28051d85a6..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/fuse-admin/keycloak-hawtio-client.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "realm" : "demo", - "resource" : "hawtio-client", - "auth-server-url" : "http://localhost:8080/auth", - "ssl-required" : "external", - "public-client" : true -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/fuse-admin/keycloak-hawtio.json b/testsuite/integration-arquillian/test-apps/fuse/fuse-admin/keycloak-hawtio.json deleted file mode 100644 index b7f6b9ea90a..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/fuse-admin/keycloak-hawtio.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm" : "demo", - "resource" : "jaas", - "bearer-only" : true, - "auth-server-url" : "http://localhost:8080/auth", - "ssl-required" : "external", - "use-resource-role-mappings": false, - "principal-attribute": "preferred_username" -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/pom.xml b/testsuite/integration-arquillian/test-apps/fuse/pom.xml deleted file mode 100755 index 6736d4ac336..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - integration-arquillian-test-apps - org.keycloak.testsuite - 999-SNAPSHOT - - - Fuse Test Applications - - 4.0.0 - - integration-arquillian-test-apps-fuse-parent - org.keycloak.testsuite - pom - - 2.21.2 - - - customer-app-fuse - cxf-jaxrs - cxf-jaxrs-fuse7-undertow - cxf-jaxws - cxf-jaxws-fuse7-undertow - product-app-fuse - product-app-fuse7-undertow - camel - camel-fuse7-undertow - features - external-config - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/pom.xml b/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/pom.xml deleted file mode 100755 index ca678a3cadf..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - integration-arquillian-test-apps-fuse-parent - org.keycloak.testsuite - 999-SNAPSHOT - - - 4.0.0 - fuse-example-product-portal - bundle - Product Portal - Secured in Karaf/Fuse - - - - - - javax.xml.namespace, - org.eclipse.jetty.security;version="[8.1,10)", - org.eclipse.jetty.util.security;version="[8.1,10)", - org.apache.cxf.service.model;version="[2.7,3.4)", - org.apache.cxf.*;version="[2.7,3.4)", - org.keycloak.adapters.jetty;version="${project.version}", - org.keycloak.*;version="${project.version}", - *;resolution:=optional - - - org.keycloak.example.* - - - - - - org.jboss.spec.javax.servlet - jboss-servlet-api_3.0_spec - - - org.keycloak - keycloak-core - - - - - org.keycloak.testsuite - fuse-example-cxf-jaxws - ${project.version} - - - - - install - - - - org.apache.felix - maven-bundle-plugin - true - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.private} - ${keycloak.osgi.export} - - - - - - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/java/org/keycloak/example/ProductPortalServlet.java b/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/java/org/keycloak/example/ProductPortalServlet.java deleted file mode 100644 index eda8c1f2a4b..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/java/org/keycloak/example/ProductPortalServlet.java +++ /dev/null @@ -1,121 +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.example; - -import org.apache.cxf.endpoint.Client; -import org.apache.cxf.frontend.ClientProxy; -import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; -import org.apache.cxf.message.Message; -import org.keycloak.KeycloakSecurityContext; -import org.keycloak.common.util.KeycloakUriBuilder; -import org.keycloak.constants.ServiceUrlConstants; -import org.keycloak.example.ws.Product; -import org.keycloak.example.ws.UnknownProductFault; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.xml.ws.Holder; -import javax.xml.ws.WebServiceException; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Servlet for receiving informations about products from backend JAXWS service - * - * @author Marek Posolda - */ -public class ProductPortalServlet extends HttpServlet { - - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - resp.setContentType("text/html"); - - // Send jaxws request - try (PrintWriter out = resp.getWriter()) { - out.println("Product Portal Page"); - - String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth") - .path(ServiceUrlConstants.TOKEN_SERVICE_LOGOUT_PATH) - .queryParam("redirect_uri", "http://localhost:8181/product-portal") - .build("demo") - .toString(); - - String acctUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth") - .path(ServiceUrlConstants.ACCOUNT_SERVICE_PATH) - .queryParam("referrer", "product-portal") - .build("demo") - .toString(); - - out.println("

Goto: customers | logout | manage acct

"); - out.println("Servlet User Principal " + req.getUserPrincipal() + " made this request."); - - String unsecuredWsClientResponse = sendWsReq(req, "1", false); - String securedWsClientResponse = sendWsReq(req, "1", true); - String securedWsClient2Response = sendWsReq(req, "2", true); - - out.println("

Product with ID 1 - unsecured request (it should end with failure): " + unsecuredWsClientResponse + "


"); - out.println("

Product with ID 1 - secured request: " + securedWsClientResponse + "


"); - out.println("

Product with ID 2 - secured request: " + securedWsClient2Response + "


"); - out.println(""); - out.flush(); - } - } - - private String sendWsReq(HttpServletRequest req, String productId, boolean secured) { - JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); - factory.setServiceClass(Product.class); - factory.setAddress("http://localhost:8282/ProductServiceCF"); - - Product simpleClient = (Product) factory.create(); - Holder _getProduct_productId = new Holder<>(productId); - Holder _getProduct_name = new Holder<>(); - - // Attach Authorization header - if (secured) { - Client clientProxy = ClientProxy.getClient(simpleClient); - - KeycloakSecurityContext session = (KeycloakSecurityContext) req.getAttribute(KeycloakSecurityContext.class.getName()); - if (session == null) throw new RuntimeException("Keycloak Security Context is null."); - - Map> headers = new HashMap<>(); - headers.put("Authorization", Collections.singletonList("Bearer " + session.getTokenString())); - - clientProxy.getRequestContext().put(Message.PROTOCOL_HEADERS, headers); - } - - try { - simpleClient.getProduct(_getProduct_productId, _getProduct_name); - return String.format("Product received: id=%s, name=%s", _getProduct_productId.value, _getProduct_name.value); - } catch (UnknownProductFault upf) { - return "UnknownProductFault has occurred. Details: " + upf.toString(); - } catch (WebServiceException wse) { - String error = "Can't receive product. Reason: " + wse.getMessage(); - if (wse.getCause() != null) { - Throwable cause = wse.getCause(); - error = error + " Details: " + cause.getClass().getName() + ": " + cause.getMessage(); - } - return error; - } - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 8de70c38ef1..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - user - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/resources/WEB-INF/jetty-web.xml b/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/resources/WEB-INF/jetty-web.xml deleted file mode 100644 index 6b42d3f00cf..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/resources/WEB-INF/jetty-web.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/resources/WEB-INF/keycloak.json b/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/resources/WEB-INF/keycloak.json deleted file mode 100644 index e90433ac515..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse/src/main/resources/WEB-INF/keycloak.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm": "demo", - "resource": "product-portal", - "auth-server-url": "http://localhost:8080/auth", - "ssl-required" : "external", - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/pom.xml b/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/pom.xml deleted file mode 100755 index d0106169b2e..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/pom.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - integration-arquillian-test-apps-fuse-parent - org.keycloak.testsuite - 999-SNAPSHOT - - - 4.0.0 - fuse-example-product-portal-fuse7-undertow - bundle - Product Portal - Secured in Karaf/Fuse 7 on Undertow - - - - - - javax.wsdl, - javax.xml.bind;version="[2.2,3)", - javax.xml.bind.annotation;version="[2.2,3)", - javax.xml.namespace, - javax.xml.ws, - META-INF.cxf;version="[2.7,3.4)", - org.apache.cxf.transport.http;version="[2.7,3.4)", - org.apache.cxf.*;version="[2.7,3.4)", - org.keycloak.*;version="${project.version}", - org.keycloak.adapters.authentication;version="${project.version}";resolution:=optional, - javax.servlet.*;version="[3.1,5)", - *;resolution:=optional - - - org.keycloak.example.* - - - - - - org.jboss.spec.javax.servlet - jboss-servlet-api_3.0_spec - - - org.keycloak - keycloak-core - - - - - org.keycloak.testsuite - fuse-example-cxf-jaxws-fuse7-undertow - ${project.version} - - - - - install - - - - org.apache.felix - maven-bundle-plugin - true - - - ${project.name} - ${project.groupId}.${project.artifactId} - ${keycloak.osgi.import} - ${keycloak.osgi.private} - ${keycloak.osgi.export} - - - - - - - - diff --git a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/src/main/java/org/keycloak/example/ProductPortalServlet.java b/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/src/main/java/org/keycloak/example/ProductPortalServlet.java deleted file mode 100644 index ee023fa88cf..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/src/main/java/org/keycloak/example/ProductPortalServlet.java +++ /dev/null @@ -1,119 +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.example; - -import org.apache.cxf.endpoint.Client; -import org.apache.cxf.frontend.ClientProxy; -import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; -import org.apache.cxf.message.Message; -import org.keycloak.KeycloakSecurityContext; -import org.keycloak.common.util.KeycloakUriBuilder; -import org.keycloak.constants.ServiceUrlConstants; -import org.keycloak.example.ws.Product; -import org.keycloak.example.ws.UnknownProductFault; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.xml.ws.WebServiceException; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Servlet for receiving informations about products from backend JAXWS service - * - * @author Marek Posolda - */ -public class ProductPortalServlet extends HttpServlet { - - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - resp.setContentType("text/html"); - - // Send jaxws request - PrintWriter out = resp.getWriter(); - out.println("Product Portal Page"); - - String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth").path(ServiceUrlConstants.TOKEN_SERVICE_LOGOUT_PATH) - .queryParam("redirect_uri", "http://localhost:8181/product-portal").build("demo").toString(); - String acctUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth").path(ServiceUrlConstants.ACCOUNT_SERVICE_PATH) - .queryParam("referrer", "product-portal").build("demo").toString(); - - out.println("

Goto: customers | logout | manage acct

"); - out.println("Servlet User Principal " + req.getUserPrincipal() + " made this request."); - - String unsecuredWsClientResponse = sendWsReq(req, "1", false); - String securedWsClientResponse = sendWsReq(req, "1", true); - String securedWsClient2Response = sendWsReq(req, "2", true); - - out.println("

Product with ID 1 - unsecured request (it should end with failure): " + unsecuredWsClientResponse + "


"); - out.println("

Product with ID 1 - secured request: " + securedWsClientResponse + "


"); - out.println("

Product with ID 2 - secured request: " + securedWsClient2Response + "


"); - out.println(""); - out.flush(); - out.close(); - } - - private String sendWsReq(HttpServletRequest req, String productId, boolean secured) { - Product simpleClient = null; -// try { - JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); - factory.setServiceClass(Product.class); - factory.setAddress("http://localhost:8282/ProductServiceCF"); - - simpleClient = (Product)factory.create(); -/* } catch (Exception ex) { - ex.printStackTrace(); - String error = "Cannot create WS client: " + ex; - return error; - }*/ - java.lang.String _getProduct_productIdVal = productId; - javax.xml.ws.Holder _getProduct_productId = new javax.xml.ws.Holder(_getProduct_productIdVal); - javax.xml.ws.Holder _getProduct_name = new javax.xml.ws.Holder(); - - // Attach Authorization header - if (secured) { - Client clientProxy = ClientProxy.getClient(simpleClient); - - KeycloakSecurityContext session = (KeycloakSecurityContext) req.getAttribute(KeycloakSecurityContext.class.getName()); - Map> headers = new HashMap>(); - headers.put("Authorization", Arrays.asList("Bearer " + session.getTokenString())); - - clientProxy.getRequestContext().put(Message.PROTOCOL_HEADERS, headers); - } - - try { - simpleClient.getProduct(_getProduct_productId, _getProduct_name); - return String.format("Product received: id=%s, name=%s", _getProduct_productId.value, _getProduct_name.value); - } catch (UnknownProductFault upf) { - return "UnknownProductFault has occurred. Details: " + upf.toString(); - } catch (WebServiceException wse) { - String error = "Can't receive product. Reason: " + wse.getMessage(); - if (wse.getCause() != null) { - Throwable cause = wse.getCause(); - error = error + " Details: " + cause.getClass().getName() + ": " + cause.getMessage(); - } - return error; - } - } -} diff --git a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 2166764892f..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - user - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json b/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json deleted file mode 100644 index e90433ac515..00000000000 --- a/testsuite/integration-arquillian/test-apps/fuse/product-app-fuse7-undertow/src/main/resources/WEB-INF/keycloak.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "realm": "demo", - "resource": "product-portal", - "auth-server-url": "http://localhost:8080/auth", - "ssl-required" : "external", - "credentials": { - "secret": "password" - } -} diff --git a/testsuite/integration-arquillian/test-apps/pom.xml b/testsuite/integration-arquillian/test-apps/pom.xml index df2edafe60a..69230b2d63d 100644 --- a/testsuite/integration-arquillian/test-apps/pom.xml +++ b/testsuite/integration-arquillian/test-apps/pom.xml @@ -23,7 +23,6 @@ servlets app-profile-jee cors - fuse spring-boot-adapter-app
diff --git a/testsuite/integration-arquillian/test-apps/test-apps-dist/build.xml b/testsuite/integration-arquillian/test-apps/test-apps-dist/build.xml index 37c7fa90c04..a9cd8061124 100755 --- a/testsuite/integration-arquillian/test-apps/test-apps-dist/build.xml +++ b/testsuite/integration-arquillian/test-apps/test-apps-dist/build.xml @@ -59,13 +59,5 @@ - - - - - - - - diff --git a/testsuite/integration-arquillian/tests/base/pom.xml b/testsuite/integration-arquillian/tests/base/pom.xml index 4f5a52d0533..d914b74aa8f 100644 --- a/testsuite/integration-arquillian/tests/base/pom.xml +++ b/testsuite/integration-arquillian/tests/base/pom.xml @@ -693,156 +693,6 @@ - - app-server-fuse63 - - - app.server - fuse63 - - - - fuse63 - false - - - 0 - 8080 - 9990 - - 8181 - - admin - password - -agentlib:jdwp=transport=dt_socket,server=y,suspend=${app.server.debug.suspend},address=localhost:${app.server.debug.port} - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-fuse63 - ${project.version} - runtime - - - org.keycloak.testsuite - integration-arquillian-test-apps-fuse-parent - ${project.version} - runtime - pom - - - org.jboss.arquillian.container - arquillian-container-karaf-managed - - - - - - maven-enforcer-plugin - - enforce - - - - - When running fuse tests 'additional.fuse.repos' is expected to be set. - additional.fuse.repos - - - - - - org.commonjava.maven.plugins - directory-maven-plugin - - - maven-surefire-plugin - - - ${app.server.management.user} - ${app.server.management.password} - ${app.server.karaf.jvm.debug.args} - - - - - - - - app-server-fuse7x - - - app.server - fuse7x - - - - fuse7x - false - - - 0 - 8080 - 9990 - - 8181 - - admin - password - -agentlib:jdwp=transport=dt_socket,server=y,suspend=${app.server.debug.suspend},address=localhost:${app.server.debug.port} - - - - org.keycloak.testsuite - integration-arquillian-servers-app-server-fuse7x - ${project.version} - runtime - - - org.keycloak.testsuite - integration-arquillian-test-apps-fuse-parent - ${project.version} - runtime - pom - - - org.jboss.arquillian.container - arquillian-container-karaf-managed - - - - - - maven-enforcer-plugin - - enforce - - - - - When running fuse tests 'additional.fuse.repos' is expected to be set. - additional.fuse.repos - - - - - - org.commonjava.maven.plugins - directory-maven-plugin - - - maven-surefire-plugin - - - ${app.server.management.user} - ${app.server.management.password} - ${app.server.karaf.jvm.debug.args} - - - - - - app-server-tomcat8 diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/Hawtio2Page.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/Hawtio2Page.java deleted file mode 100644 index f28c67b819a..00000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/Hawtio2Page.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.keycloak.testsuite.adapter.page; - -import org.keycloak.testsuite.page.AbstractPage; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -import javax.ws.rs.core.UriBuilder; -import org.keycloak.testsuite.util.JavascriptBrowser; - -import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement; - -/** - * @author mhajas - */ -public class Hawtio2Page extends AbstractPage { - - public String getUrl() { - if (Boolean.parseBoolean(System.getProperty("app.server.ssl.required"))) { - return "https://localhost:" + System.getProperty("app.server.https.port", "8543") + "/hawtio"; - } - return "http://localhost:" + System.getProperty("app.server.http.port", "8180") + "/hawtio"; - } - - @Override - public UriBuilder createUriBuilder() { - return UriBuilder.fromUri(getUrl()); - } - - // First variant for Fuse 7.1, 7.2, the second variant for Fuse 7.3 - @FindBy(xpath = "//a[@id ='userDropdownMenu'] | //button[@id ='userDropdownMenu']") - @JavascriptBrowser - private WebElement dropDownMenu; - - // First variant for Fuse 7.1, 7.2, the second variant for Fuse 7.3 - @FindBy(xpath = "//a[@ng-click='userDetails.logout()'] | //a[@ng-focus='authService.logout()']") - @JavascriptBrowser - private WebElement logoutButton; - - public void logout() { - waitUntilElement(dropDownMenu).is().clickable(); - dropDownMenu.click(); - waitUntilElement(logoutButton).is().clickable(); - logoutButton.click(); - } -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/HawtioPage.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/HawtioPage.java deleted file mode 100644 index ff3f2bb25c9..00000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/HawtioPage.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.keycloak.testsuite.adapter.page; - -import org.jboss.arquillian.graphene.wait.ElementBuilder; -import org.keycloak.testsuite.page.AbstractPage; -import org.openqa.selenium.By; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.FindBy; - -import javax.ws.rs.core.UriBuilder; -import org.keycloak.testsuite.util.JavascriptBrowser; - -import java.util.concurrent.TimeUnit; - -import static org.jboss.arquillian.graphene.Graphene.waitGui; -import static org.keycloak.testsuite.util.WaitUtils.pause; - -/** - * @author mhajas - */ -public class HawtioPage extends AbstractPage { - - public String getUrl() { - if (Boolean.parseBoolean(System.getProperty("app.server.ssl.required"))) { - return "https://localhost:" + System.getProperty("app.server.https.port", "8543") + "/hawtio"; - } - return "http://localhost:" + System.getProperty("app.server.http.port", "8180") + "/hawtio"; - } - - @Override - public UriBuilder createUriBuilder() { - return UriBuilder.fromUri(getUrl()); - } - - @FindBy(xpath = "//a[@class='dropdown-toggle' and @data-original-title='Preferences and log out']") - @JavascriptBrowser - private WebElement dropDownMenu; - - @FindBy(xpath = "//a[@ng-click='logout()']") - @JavascriptBrowser - private WebElement logoutButton; - - @FindBy(xpath = "//input[@type='submit' and @value='Yes']") - @JavascriptBrowser - private WebElement modal; - - public void logout(WebDriver jsDriver) { - log.debug("logging out"); - hawtioWaitUntil(dropDownMenu).is().clickable(); - dropDownMenu.click(); - - // There is a tooltip shown which prevents logout button from clicking - // So we need to move mouse away from dropDownMenu element - new Actions(jsDriver).moveToElement(logoutButton).perform(); - pause(100); // Wait for tooltip to fade out - - hawtioWaitUntil(logoutButton).is().clickable(); - logoutButton.click(); - hawtioWaitUntil(modal).is().clickable(); - modal.click(); - } - - public ElementBuilder hawtioWaitUntil(WebElement element) { - return waitGui().withTimeout(3, TimeUnit.MINUTES).until().element(element); - } - - public ElementBuilder hawtioWaitUntil(By element) { - return waitGui().withTimeout(3, TimeUnit.MINUTES).until().element(element); - } -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/AbstractFuseExample.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/AbstractFuseExample.java deleted file mode 100644 index e82e4d99230..00000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/AbstractFuseExample.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.adapter.page.fuse; - -import org.keycloak.testsuite.adapter.page.AppServerContextRoot; - -import java.net.MalformedURLException; -import java.net.URL; -import org.keycloak.testsuite.util.DroneUtils; - -/** - * - * @author tkyjovsk - */ -public abstract class AbstractFuseExample extends AppServerContextRoot { - - public abstract String getContext(); - - private URL url; - - @Override - public URL getInjectedUrl() { - if (url == null) { - try { - url = new URL(super.getInjectedUrl().toExternalForm() + "/" + getContext()); - } catch (MalformedURLException ex) { - throw new IllegalStateException(ex); - } - } - return url; - } - - /* - * non-javadoc - * - * When run tests with phantomjs customer or prutuct portal page isn't properly - * loaded. This method reloads page in such case. - */ - @Override - public void navigateTo() { - super.navigateTo(); - - if (DroneUtils.getCurrentDriver().getPageSource().contains("")) { - log.debug("Page wasn't properly loaded - redirecting."); - super.navigateTo(); - } - } -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/AdminInterface.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/AdminInterface.java deleted file mode 100644 index d39b6c28f9b..00000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/AdminInterface.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.adapter.page.fuse; - -/** - * - * @author tkyjovsk - */ -public class AdminInterface extends CustomerPortalFuseExample { - - @Override - public String getContext() { - return super.getContext() + "/customers/camel.jsp"; - } - -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/CustomerListing.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/CustomerListing.java deleted file mode 100644 index b4959809895..00000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/CustomerListing.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.adapter.page.fuse; - -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * - * @author tkyjovsk - */ -public class CustomerListing extends CustomerPortalFuseExample { - - @Override - public String getContext() { - return super.getContext() + "/customers/cxf-rs.jsp"; - } - - @FindBy(linkText = "products") - protected WebElement productsLink; - @FindBy(linkText = "logout") - protected WebElement logOutLink; - @FindBy(linkText = "manage acct") - protected WebElement accountManagementLink; - - public void clickProducts() { - productsLink.click(); - } - - public void clickLogOut() { - logOutLink.click(); - } - - public void clickAccountManagement() { - accountManagementLink.click(); - } - -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/CustomerPortalFuseExample.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/CustomerPortalFuseExample.java deleted file mode 100644 index e18779785d2..00000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/CustomerPortalFuseExample.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.adapter.page.fuse; - -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * - * @author tkyjovsk - */ -public class CustomerPortalFuseExample extends AbstractFuseExample { - - public static final String DEPLOYMENT_NAME = "customer-portal-fuse-example"; - public static final String DEPLOYMENT_CONTEXT = "customer-portal"; - - @Override - public String getContext() { - return DEPLOYMENT_CONTEXT; - } - - @FindBy(linkText = "Customer Listing - CXF RS endpoint") - protected WebElement customerListingLink; - - @FindBy(linkText = "Admin Interface - Apache Camel endpoint") - protected WebElement adminInterfaceLink; - - public void clickCustomerListingLink() { - customerListingLink.click(); - } - - public void clickAdminInterfaceLink() { - adminInterfaceLink.click(); - } - -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/ProductPortalFuseExample.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/ProductPortalFuseExample.java deleted file mode 100644 index 0c0ae7b60c2..00000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/fuse/ProductPortalFuseExample.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.adapter.page.fuse; - -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -/** - * - * @author tkyjovsk - */ -public class ProductPortalFuseExample extends AbstractFuseExample { - - public static final String DEPLOYMENT_NAME = "product-portal-fuse-example"; - public static final String DEPLOYMENT_CONTEXT = "product-portal"; - - @Override - public String getContext() { - return DEPLOYMENT_CONTEXT; - } - - @FindBy(linkText = "products") - protected WebElement productsLink; - @FindBy(linkText = "logout") - protected WebElement logOutLink; - @FindBy(linkText = "manage acct") - protected WebElement accountManagementLink; - - @FindBy(xpath = "//p[contains(text(),'Product with ID 1 - unsecured request')]") - protected WebElement product1Unsecured; - @FindBy(xpath = "//p[contains(text(),'Product with ID 1 - secured request')]") - protected WebElement product1Secured; - @FindBy(xpath = "//p[contains(text(),'Product with ID 2 - secured request')]") - protected WebElement product2Secured; - - public String getProduct1UnsecuredText() { - return product1Unsecured.getText(); - } - - public String getProduct1SecuredText() { - return product1Secured.getText(); - } - - public String getProduct2SecuredText() { - return product2Secured.getText(); - } - - public void clickLogOutLink() { - logOutLink.click(); - } - -} 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 8c735e2309e..b0d9f56b230 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 @@ -31,7 +31,6 @@ import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; import org.keycloak.testsuite.arquillian.annotation.AppServerContainers; import org.keycloak.testsuite.arquillian.containers.SelfManagedAppContainerLifecycle; import org.keycloak.testsuite.utils.arquillian.ContainerConstants; -import org.keycloak.testsuite.utils.fuse.FuseUtils; import org.wildfly.extras.creaper.commands.web.AddConnector; import org.wildfly.extras.creaper.commands.web.AddConnectorSslConfig; import org.wildfly.extras.creaper.core.CommandFailedException; @@ -208,9 +207,6 @@ public class AppServerTestEnricher { log.info("Starting app server: " + testContext.getAppServerInfo().getQualifier()); controller.start(testContext.getAppServerInfo().getQualifier()); } - if (isFuseAppServer()) { - FuseUtils.setUpFuse(ContainerConstants.APP_SERVER_PREFIX + CURRENT_APP_SERVER); - } } } @@ -361,10 +357,6 @@ public class AppServerTestEnricher { return CURRENT_APP_SERVER.equals("wls"); } - public static boolean isFuseAppServer() { - return CURRENT_APP_SERVER.contains("fuse"); - } - public static boolean isRemoteAppServer() { return CURRENT_APP_SERVER.contains("remote"); } diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/KeycloakArquillianExtension.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/KeycloakArquillianExtension.java index af01583a312..78e000226ff 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/KeycloakArquillianExtension.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/KeycloakArquillianExtension.java @@ -17,7 +17,6 @@ package org.keycloak.testsuite.arquillian; -import org.jboss.arquillian.container.osgi.OSGiApplicationArchiveProcessor; import org.jboss.arquillian.container.test.impl.enricher.resource.URLResourceProvider; import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; import org.jboss.arquillian.container.test.spi.client.deployment.DeploymentScenarioGenerator; @@ -42,7 +41,6 @@ import org.keycloak.testsuite.arquillian.provider.URLProvider; import org.keycloak.testsuite.drone.HtmlUnitScreenshots; import org.keycloak.testsuite.drone.KeycloakDronePostSetup; import org.keycloak.testsuite.drone.KeycloakWebDriverConfigurator; -import org.keycloak.testsuite.utils.arquillian.fuse.KeycloakOSGiApplicationArchiveProcessor; /** * @@ -80,7 +78,6 @@ public class KeycloakArquillianExtension implements LoadableExtension { builder .override(ResourceProvider.class, URLResourceProvider.class, URLProvider.class) .override(ResourceProvider.class, CustomizableURLResourceProvider.class, URLProvider.class) - .override(ApplicationArchiveProcessor.class, OSGiApplicationArchiveProcessor.class, KeycloakOSGiApplicationArchiveProcessor.class) .override(ResourceProvider.class, ContainerCustomizableURLResourceProvider.class, URLProvider.class); builder diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/EAP6Fuse6HawtioAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/EAP6Fuse6HawtioAdapterTest.java deleted file mode 100644 index 72465e52451..00000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/EAP6Fuse6HawtioAdapterTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.adapter.example.fuse; - -import static org.keycloak.testsuite.auth.page.AuthRealm.DEMO; -import static org.keycloak.testsuite.util.URLAssert.waitUntilUrlStartsWith; -import static org.keycloak.testsuite.utils.io.IOUtil.loadRealm; -import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlStartsWith; - -import java.io.IOException; -import java.util.List; - -import org.jboss.arquillian.container.test.api.ContainerController; -import org.jboss.arquillian.drone.api.annotation.Drone; -import org.jboss.arquillian.graphene.page.Page; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.junit.After; -import org.junit.Assume; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.testsuite.adapter.AbstractExampleAdapterTest; -import org.keycloak.testsuite.adapter.page.HawtioPage; -import org.keycloak.testsuite.arquillian.AppServerTestEnricher; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import org.keycloak.testsuite.util.ContainerAssume; -import org.keycloak.testsuite.utils.arquillian.ContainerConstants; -import org.keycloak.testsuite.arquillian.containers.SelfManagedAppContainerLifecycle; -import org.keycloak.testsuite.auth.page.login.OIDCLogin; -import org.keycloak.testsuite.util.DroneUtils; -import org.keycloak.testsuite.util.JavascriptBrowser; -import org.keycloak.testsuite.util.WaitUtils; - -import org.openqa.selenium.WebDriver; - -/** - * @author mhajas - */ -@AppServerContainer(ContainerConstants.APP_SERVER_EAP6) -public class EAP6Fuse6HawtioAdapterTest extends AbstractExampleAdapterTest implements SelfManagedAppContainerLifecycle { - - @ArquillianResource - private ContainerController controller; - - @Drone - @JavascriptBrowser - protected WebDriver jsDriver; - - @Page - @JavascriptBrowser - private HawtioPage hawtioPage; - - @Page - @JavascriptBrowser - private OIDCLogin testRealmLoginPageFuse; - - @Override - public void addAdapterTestRealms(List testRealms) { - testRealms.add(loadRealm("/adapter-test/hawtio-realm/demorealm.json")); - } - - @BeforeClass - public static void enabled() { - Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows")); - ContainerAssume.assumeNotAppServerSSL(); - ContainerAssume.assumeAuthServerSSL(); - } - - @Before - public void addJSDriver() { - DroneUtils.addWebDriver(jsDriver); - } - - @Before - @Override - public void startServer() { - try { - AppServerTestEnricher.prepareServerDir("standalone-fuse"); - } catch (IOException ex) { - throw new RuntimeException("Wasn't able to prepare server dir.", ex); - } - - controller.start(testContext.getAppServerInfo().getQualifier()); - } - - @After - @Override - public void stopServer() { - controller.stop(testContext.getAppServerInfo().getQualifier()); - } - - @Test - public void hawtioLoginAndLogoutTest() { - testRealmLoginPageFuse.setAuthRealm(DEMO); - - log.debug("Go to hawtioPage"); - hawtioPage.navigateTo(); - WaitUtils.waitForPageToLoad(); - - log.debug("log in"); - waitUntilUrlStartsWith(testRealmLoginPageFuse.toString(), 60); - testRealmLoginPageFuse.form().login("root", "password"); - - waitUntilUrlStartsWith(hawtioPage.toString() + "/welcome", 180); - - hawtioPage.logout(jsDriver); - WaitUtils.waitForPageToLoad(); - - assertCurrentUrlStartsWith(testRealmLoginPageFuse); - - hawtioPage.navigateTo(); - WaitUtils.waitForPageToLoad(); - assertCurrentUrlStartsWith(testRealmLoginPageFuse); - } -} diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/FuseAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/FuseAdapterTest.java deleted file mode 100644 index 95f027bcf2a..00000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/FuseAdapterTest.java +++ /dev/null @@ -1,402 +0,0 @@ -/* - * Copyright 2017 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.adapter.example.fuse; - -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.keycloak.testsuite.auth.page.AuthRealm.DEMO; -import static org.keycloak.testsuite.utils.fuse.FuseUtils.assertCommand; -import static org.keycloak.testsuite.utils.fuse.FuseUtils.getCommandOutput; -import static org.keycloak.testsuite.utils.io.IOUtil.loadRealm; -import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlStartsWith; -import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlStartsWithLoginUrlOf; - -import java.io.File; -import java.io.IOException; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import javax.management.InstanceNotFoundException; -import javax.management.MBeanException; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import javax.management.ReflectionException; -import javax.management.remote.JMXConnector; -import javax.management.remote.JMXConnectorFactory; -import javax.management.remote.JMXServiceURL; -import org.jboss.arquillian.drone.api.annotation.Drone; -import org.jboss.arquillian.graphene.page.Page; -import org.junit.Assert; -import org.junit.Assume; -import org.junit.Before; -import org.junit.Test; -import org.keycloak.common.Profile; -import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.testsuite.adapter.AbstractExampleAdapterTest; -import org.keycloak.testsuite.adapter.page.Hawtio2Page; -import org.keycloak.testsuite.adapter.page.HawtioPage; -import org.keycloak.testsuite.adapter.page.fuse.AdminInterface; -import org.keycloak.testsuite.adapter.page.fuse.CustomerListing; -import org.keycloak.testsuite.adapter.page.fuse.CustomerPortalFuseExample; -import org.keycloak.testsuite.adapter.page.fuse.ProductPortalFuseExample; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import org.keycloak.testsuite.arquillian.annotation.DisableFeature; -import org.keycloak.testsuite.auth.page.AuthRealm; -import org.keycloak.testsuite.auth.page.account.Account; -import org.keycloak.testsuite.utils.arquillian.ContainerConstants; -import org.keycloak.testsuite.auth.page.login.OIDCLogin; -import org.keycloak.testsuite.util.DroneUtils; -import org.keycloak.testsuite.util.JavascriptBrowser; -import org.keycloak.testsuite.util.WaitUtils; -import org.keycloak.testsuite.utils.fuse.FuseUtils.Result; -import org.openqa.selenium.By; -import org.openqa.selenium.WebDriver; - -@AppServerContainer(ContainerConstants.APP_SERVER_FUSE63) -@AppServerContainer(ContainerConstants.APP_SERVER_FUSE7X) -@DisableFeature(value = Profile.Feature.ACCOUNT2, skipRestart = true) // TODO remove this (KEYCLOAK-16228) -public class FuseAdapterTest extends AbstractExampleAdapterTest { - - @Drone - @JavascriptBrowser - protected WebDriver jsDriver; - - @Page - @JavascriptBrowser - private HawtioPage hawtioPage; - @Page - @JavascriptBrowser - private Hawtio2Page hawtio2Page; - @Page - @JavascriptBrowser - private OIDCLogin testRealmLoginPageFuse; - @Page - @JavascriptBrowser - private AuthRealm loginPageFuse; - @Page - @JavascriptBrowser - protected CustomerPortalFuseExample customerPortal; - @Page - @JavascriptBrowser - protected CustomerListing customerListing; - @Page - @JavascriptBrowser - protected AdminInterface adminInterface; - @Page - @JavascriptBrowser - protected ProductPortalFuseExample productPortal; - @Page - @JavascriptBrowser - protected Account testRealmAccount; - - @Override - public void addAdapterTestRealms(List testRealms) { - RealmRepresentation fuseRealm = loadRealm(new File(TEST_APPS_HOME_DIR + "/fuse/demorealm.json")); - testRealms.add(fuseRealm); - } - - @Override - public void setDefaultPageUriParameters() { - super.setDefaultPageUriParameters(); - testRealmLoginPageFuse.setAuthRealm(DEMO); - testRealmPage.setAuthRealm(DEMO); - testRealmLoginPage.setAuthRealm(DEMO); - testRealmAccount.setAuthRealm(DEMO); - loginPageFuse.setAuthRealm(DEMO); - } - - @Before - public void addJsDriver() { - DroneUtils.addWebDriver(jsDriver); - } - - @Override - public boolean isImportAfterEachMethod() { - return false; - } - - @Test - @AppServerContainer(value = ContainerConstants.APP_SERVER_FUSE7X, skip = true) - public void hawtio1LoginTest() throws Exception { - hawtioPage.navigateTo(); - WaitUtils.waitForPageToLoad(); - assertCurrentUrlStartsWith(loginPageFuse); - testRealmLoginPageFuse.form().login("user", "invalid-password"); - assertCurrentUrlStartsWith(loginPageFuse); - - testRealmLoginPageFuse.form().login("invalid-user", "password"); - assertCurrentUrlStartsWith(loginPageFuse); - - testRealmLoginPageFuse.form().login("root", "password"); - assertCurrentUrlStartsWith(hawtioPage.toString() + "/welcome"); - hawtioPage.logout(jsDriver); - assertCurrentUrlStartsWith(testRealmLoginPageFuse); - - hawtioPage.navigateTo(); - log.debug("logging in as mary"); - testRealmLoginPageFuse.form().login("mary", "password"); - log.debug("Previous WARN waitForPageToLoad time exceeded! is expected"); - assertThat(DroneUtils.getCurrentDriver().getCurrentUrl(), not(containsString("welcome"))); - } - - @Test - @AppServerContainer(value = ContainerConstants.APP_SERVER_FUSE63, skip = true) - public void hawtio2LoginTest() throws Exception { - - Assume.assumeTrue("This test doesn't work with phantomjs", !"phantomjs".equals(System.getProperty("js.browser"))); - - hawtio2Page.navigateTo(); - WaitUtils.waitForPageToLoad(); - - assertCurrentUrlStartsWith(loginPageFuse); - testRealmLoginPageFuse.form().login("user", "invalid-password"); - assertCurrentUrlStartsWith(loginPageFuse); - - testRealmLoginPageFuse.form().login("invalid-user", "password"); - assertCurrentUrlStartsWith(loginPageFuse); - - log.debug("logging in as root"); - testRealmLoginPageFuse.form().login("root", "password"); - assertCurrentUrlStartsWith(hawtio2Page.toString()); - - assertHawtio2Page("camel", true); - assertHawtio2Page("jmx", true); - assertHawtio2Page("osgi", true); - assertHawtio2Page("logs", true); - - hawtio2Page.logout(); - WaitUtils.waitForPageToLoad(); - - assertCurrentUrlStartsWith(testRealmLoginPageFuse); - - hawtio2Page.navigateTo(); - WaitUtils.waitForPageToLoad(); - - log.debug("logging in as mary"); - testRealmLoginPageFuse.form().login("mary", "password"); - log.debug("Current URL: " + DroneUtils.getCurrentDriver().getCurrentUrl()); - assertCurrentUrlStartsWith(hawtio2Page.toString()); - - assertHawtio2Page("camel", false); - assertHawtio2Page("jmx", false); - assertHawtio2Page("osgi", false); - assertHawtio2Page("logs", false); - } - - private void assertHawtio2Page(String urlFragment, boolean expectedSuccess) { - DroneUtils.getCurrentDriver().navigate().to(hawtio2Page.getUrl() + "/" + urlFragment); - WaitUtils.waitForPageToLoad(); - WaitUtils.waitUntilElement(By.xpath("//img[@alt='Red Hat Fuse Management Console'] | //img[@ng-src='img/fuse-logo.svg']")).is().present(); - if (expectedSuccess) { - assertCurrentUrlStartsWith(hawtio2Page.getUrl() + "/" + urlFragment); - } else { - assertCurrentUrlStartsWith(hawtio2Page.getUrl() + "/jvm"); - } - } - - @Test - @AppServerContainer(value = ContainerConstants.APP_SERVER_FUSE7X, skip = true) - public void sshLoginTestFuse6() throws Exception { - assertCommand("mary", "password", "shell:date", Result.NO_CREDENTIALS); - assertCommand("john", "password", "shell:info", Result.NO_CREDENTIALS); - assertCommand("john", "password", "shell:date", Result.OK); - assertCommand("root", "password", "shell:info", Result.OK); - } - - @Test - @AppServerContainer(value = ContainerConstants.APP_SERVER_FUSE63, skip = true) - public void sshLoginTestFuse7() throws Exception { - assertCommand("mary", "password", "shell:date", Result.NOT_FOUND); - assertCommand("john", "password", "shell:info", Result.OK); - assertCommand("john", "password", "shell:date", Result.OK); - assertRoles("root", - "ssh", - "jmxAdmin", - "admin", - "manager", - "viewer", - "Administrator", - "Auditor", - "Deployer", - "Maintainer", - "Operator", - "SuperUser" - ); - } - - private void assertRoles(String username, String... expectedRoles) throws Exception { - final String commandOutput = getCommandOutput(username, "password", "jaas:whoami -r --no-format"); - final List parsedOutput = Arrays.asList(commandOutput.split("\\n+")); - assertThat(parsedOutput, containsInAnyOrder(expectedRoles)); - } - - @Test - public void jmxLoginTest() throws Exception { - ObjectName mbean = new ObjectName("org.apache.karaf:type=config,name=root"); - log.debug("jmxLoginTest - testing: invalid credentials"); - try (JMXConnector jmxConnector = getJMXConnector(10, TimeUnit.SECONDS, "mary", "password1")) { - jmxConnector.getMBeanServerConnection(); - Assert.fail(); - } catch (TimeoutException expected) { - assertThat(expected.getCause().toString(), containsString("java.lang.SecurityException: Authentication failed")); - } - log.debug("jmxLoginTest - testing: no role"); - try (JMXConnector jmxConnector = getJMXConnector("mary", "password")) { - MBeanServerConnection connection = jmxConnector.getMBeanServerConnection(); - assertJmxInvoke(false, connection, mbean, "listProperties", new Object [] {""}, new String [] {String.class.getName()}); - assertJmxInvoke(false, connection, mbean, "setProperty", new Object [] {"", "x", "y"}, new String [] {String.class.getName(), String.class.getName(), String.class.getName()}); - } - log.debug("jmxLoginTest - testing: read only role"); - try (JMXConnector jmxConnector = getJMXConnector("john", "password")) { - MBeanServerConnection connection = jmxConnector.getMBeanServerConnection(); - assertJmxInvoke(true, connection, mbean, "listProperties", new Object [] {""}, new String [] {String.class.getName()}); - assertJmxInvoke(false, connection, mbean, "setProperty", new Object [] {"", "x", "y"}, new String [] {String.class.getName(), String.class.getName(), String.class.getName()}); - } - log.debug("jmxLoginTest - testing: read write role"); - try (JMXConnector jmxConnector = getJMXConnector("root", "password")) { - MBeanServerConnection connection = jmxConnector.getMBeanServerConnection(); - assertJmxInvoke(true, connection, mbean, "listProperties", new Object [] {""}, new String [] {String.class.getName()}); - assertJmxInvoke(true, connection, mbean, "setProperty", new Object [] {"", "x", "y"}, new String [] {String.class.getName(), String.class.getName(), String.class.getName()}); - } - } - - private Object assertJmxInvoke(boolean expectSuccess, MBeanServerConnection connection, ObjectName mbean, String method, - Object[] params, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException, IOException { - try { - Object result = connection.invoke(mbean, method, params, signature); - assertTrue(expectSuccess); - return result; - } catch (SecurityException se) { - assertTrue(!expectSuccess); - return null; - } - } - - private JMXConnector getJMXConnector(String username, String password) throws Exception { - return getJMXConnector(2, TimeUnit.MINUTES, username, password); - } - - private JMXConnector getJMXConnector(long timeout, TimeUnit unit, String username, String password) throws Exception { - Exception lastException = null; - long timeoutMillis = System.currentTimeMillis() + unit.toMillis(timeout); - while (System.currentTimeMillis() < timeoutMillis) { - try { - Map env = Collections.singletonMap(JMXConnector.CREDENTIALS, new String[] { username, password }); - return JMXConnectorFactory.connect(new JMXServiceURL(getJmxServiceUrl()), env); - } catch (Exception ex) { - lastException = ex; - Thread.sleep(500); - log.debug("Loop: Getting MBean Server Connection: last caught exception: " + lastException.getClass().getName()); - } - } - log.error("Failed to get MBean Server Connection within " + timeout + " " + unit.toString()); - TimeoutException timeoutException = new TimeoutException(); - timeoutException.initCause(lastException); - throw timeoutException; - } - - private String getJmxServiceUrl() throws Exception { - return "service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-root"; - } - - @Test - public void testCustomerListingAndAccountManagement() { - customerPortal.navigateTo(); - assertCurrentUrlStartsWith(customerPortal); - - customerPortal.clickCustomerListingLink(); - assertCurrentUrlStartsWithLoginUrlOf(testRealmPage); - - testRealmLoginPageFuse.form().login("bburke@redhat.com", "password"); - assertCurrentUrlStartsWith(customerListing); - - assertThat(DroneUtils.getCurrentDriver().getPageSource(), allOf( - containsString("Username: bburke@redhat.com"), - containsString("Bill Burke"), - containsString("Stian Thorgersen") - )); - - // account mgmt - customerListing.clickAccountManagement(); - - assertCurrentUrlStartsWith(testRealmAccount); - assertThat(testRealmAccount.getUsername(), equalTo("bburke@redhat.com")); - - DroneUtils.getCurrentDriver().navigate().back(); - customerListing.clickLogOut(); - - // assert user not logged in - customerPortal.clickCustomerListingLink(); - assertCurrentUrlStartsWithLoginUrlOf(testRealmPage); - - } - - @Test - public void testAdminInterface() { - customerPortal.navigateTo(); - assertCurrentUrlStartsWith(customerPortal); - - customerPortal.clickAdminInterfaceLink(); - WaitUtils.waitForPageToLoad(); - assertCurrentUrlStartsWithLoginUrlOf(testRealmPage); - - testRealmLoginPageFuse.form().login("admin", "password"); - assertCurrentUrlStartsWith(adminInterface); - assertThat(DroneUtils.getCurrentDriver().getPageSource(), containsString("Hello admin!")); - assertThat(DroneUtils.getCurrentDriver().getPageSource(), containsString("This second sentence is returned from a Camel RestDSL endpoint")); - - customerListing.navigateTo(); - WaitUtils.waitForPageToLoad(); - customerListing.clickLogOut(); - WaitUtils.waitForPageToLoad(); - - WaitUtils.pause(2500); - customerPortal.navigateTo();//needed for phantomjs - WaitUtils.waitForPageToLoad(); - customerPortal.clickAdminInterfaceLink(); - WaitUtils.waitForPageToLoad(); - assertCurrentUrlStartsWithLoginUrlOf(testRealmPage); - - testRealmLoginPageFuse.form().login("bburke@redhat.com", "password"); - assertCurrentUrlStartsWith(adminInterface); - assertThat(DroneUtils.getCurrentDriver().getPageSource(), containsString("Status code is 403")); - } - - @Test - @AppServerContainer(value = ContainerConstants.APP_SERVER_FUSE63, skip = true) - public void testProductPortal() { - productPortal.navigateTo(); - WaitUtils.waitForPageToLoad(); - - assertCurrentUrlStartsWithLoginUrlOf(testRealmPage); - - testRealmLoginPageFuse.form().login("bburke@redhat.com", "password"); - assertCurrentUrlStartsWith(productPortal); - - assertThat(productPortal.getProduct1UnsecuredText(), containsString("401: Unauthorized")); - assertThat(productPortal.getProduct1SecuredText(), containsString("Product received: id=1")); - assertThat(productPortal.getProduct2SecuredText(), containsString("Product received: id=2")); - - productPortal.clickLogOutLink(); - WaitUtils.waitForPageToLoad(); - assertCurrentUrlStartsWithLoginUrlOf(testRealmPage); - } -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/common/xslt/arquillian.xsl b/testsuite/integration-arquillian/tests/other/adapters/karaf/common/xslt/arquillian.xsl deleted file mode 100644 index e1df46cde15..00000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/common/xslt/arquillian.xsl +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - true - - org.keycloak.testsuite.arquillian.karaf.CustomKarafContainer - false - ${app.server.home} - ${app.server.java.home} - - ${app.server.karaf.jvm.debug.args} - ${adapter.test.props} - - service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root - ${app.server.management.user} - ${app.server.management.password} - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/pom.xml deleted file mode 100644 index 4f8c67e7682..00000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - 4.0.0 - - - org.keycloak.testsuite - integration-arquillian-tests-adapters-karaf - 999-SNAPSHOT - - - integration-arquillian-tests-adapters-fuse61 - - Adapter Tests - Karaf - JBoss Fuse 6.1 - - - fuse61 - - admin - admin - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/src/test/java/org/keycloak/testsuite/adapter/example/Fuse61ExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/src/test/java/org/keycloak/testsuite/adapter/example/Fuse61ExampleAdapterTest.java deleted file mode 100644 index 122693fa331..00000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/src/test/java/org/keycloak/testsuite/adapter/example/Fuse61ExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-fuse61") -public class Fuse61ExampleAdapterTest extends AbstractFuseExampleAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/pom.xml deleted file mode 100644 index 8085daefe8d..00000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - 4.0.0 - - - org.keycloak.testsuite - integration-arquillian-tests-adapters-karaf - 999-SNAPSHOT - - - integration-arquillian-tests-adapters-fuse62 - - Adapter Tests - Karaf - JBoss Fuse 6.2 - - - fuse62 - - admin - admin - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/src/test/java/org/keycloak/testsuite/adapter/example/Fuse62ExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/src/test/java/org/keycloak/testsuite/adapter/example/Fuse62ExampleAdapterTest.java deleted file mode 100644 index 1a6e3048b54..00000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/src/test/java/org/keycloak/testsuite/adapter/example/Fuse62ExampleAdapterTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-fuse62") -public class Fuse62ExampleAdapterTest extends AbstractFuseExampleAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/pom.xml deleted file mode 100644 index e1bbedf3cb1..00000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - 4.0.0 - - - org.keycloak.testsuite - integration-arquillian-tests-adapters-karaf - 999-SNAPSHOT - - - integration-arquillian-tests-adapters-karaf3 - - Adapter Tests - Karaf - Karaf 3 - - - karaf3 - - karaf - karaf - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/src/test/java/org/keycloak/testsuite/adapter/example/Karaf3ExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/src/test/java/org/keycloak/testsuite/adapter/example/Karaf3ExampleAdapterTest.java deleted file mode 100644 index ce0059e477c..00000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/src/test/java/org/keycloak/testsuite/adapter/example/Karaf3ExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-karaf3") -public class Karaf3ExampleAdapterTest extends AbstractFuseExampleAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/karaf/pom.xml deleted file mode 100644 index fd669a37de8..00000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - 4.0.0 - - - org.keycloak.testsuite - integration-arquillian-tests-adapters - 999-SNAPSHOT - - - integration-arquillian-tests-adapters-karaf - - pom - - Adapter Tests - Karaf - - - ${project.parent.basedir}/common - - - 0 - 8080 - 9990 - - 8181 - - -agentlib:jdwp=transport=dt_socket,server=y,suspend=${app.server.debug.suspend},address=${app.server.host}:${app.server.debug.port} - - - - - app-server-karaf3 - - karaf3 - - - - app-server-fuse61 - - fuse61 - - - - app-server-fuse62 - - fuse62 - - - - - diff --git a/testsuite/integration-arquillian/tests/other/adapters/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/pom.xml index e661398b74c..161626b6a8c 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/pom.xml +++ b/testsuite/integration-arquillian/tests/other/adapters/pom.xml @@ -99,7 +99,6 @@ jboss - karaf was wls @@ -215,8 +214,7 @@ ${app.server.startup.timeout} ${app.server.memory.settings} ${app.server.jboss.jvm.debug.args} - ${app.server.karaf.jvm.debug.args} - + ${app.server.reverse-proxy.port.offset} ${app.server.1.port.offset} diff --git a/testsuite/integration-arquillian/tests/pom.xml b/testsuite/integration-arquillian/tests/pom.xml index 801f1545b06..927e9e59da2 100755 --- a/testsuite/integration-arquillian/tests/pom.xml +++ b/testsuite/integration-arquillian/tests/pom.xml @@ -2137,12 +2137,6 @@ zip - - org.osgi - org.osgi.enterprise - provided - - org.eclipse.microprofile.metrics diff --git a/testsuite/integration-arquillian/util/pom.xml b/testsuite/integration-arquillian/util/pom.xml index 1528e00b288..70f45fa9e26 100644 --- a/testsuite/integration-arquillian/util/pom.xml +++ b/testsuite/integration-arquillian/util/pom.xml @@ -51,30 +51,11 @@ org.jboss.shrinkwrap.resolver shrinkwrap-resolver-api-maven - - org.jboss.arquillian.container - arquillian-container-karaf-managed - org.apache.maven.resolver maven-resolver-api - - org.jboss.arquillian.container - arquillian-container-osgi - - - com.google.guava - guava - - - - - org.osgi - org.osgi.enterprise - provided - io.undertow.jastow diff --git a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/ContainerConstants.java b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/ContainerConstants.java index 31d2b7ae607..2a9a3bf7e01 100644 --- a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/ContainerConstants.java +++ b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/ContainerConstants.java @@ -35,9 +35,6 @@ public interface ContainerConstants { public static final String APP_SERVER_EAP6 = APP_SERVER_PREFIX + "eap6"; public static final String APP_SERVER_EAP6_CLUSTER = APP_SERVER_EAP6 + "-ha-node-1;" + APP_SERVER_EAP6 + "-ha-node-2"; - public static final String APP_SERVER_FUSE63 = APP_SERVER_PREFIX + "fuse63"; - public static final String APP_SERVER_FUSE7X = APP_SERVER_PREFIX + "fuse7x"; - public static final String APP_SERVER_JETTY94 = APP_SERVER_PREFIX + "jetty94"; public static final String APP_SERVER_JETTY93 = APP_SERVER_PREFIX + "jetty93"; public static final String APP_SERVER_JETTY92 = APP_SERVER_PREFIX + "jetty92"; diff --git a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/fuse/CustomFuseContainer.java b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/fuse/CustomFuseContainer.java deleted file mode 100644 index 1e677e506e0..00000000000 --- a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/fuse/CustomFuseContainer.java +++ /dev/null @@ -1,246 +0,0 @@ -package org.keycloak.testsuite.utils.arquillian.fuse; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; - -import org.jboss.arquillian.container.osgi.jmx.JMXDeployableContainer; -import org.jboss.arquillian.container.osgi.jmx.ObjectNameFactory; -import org.jboss.arquillian.container.osgi.karaf.managed.KarafManagedContainerConfiguration; -import org.jboss.arquillian.container.spi.client.container.LifecycleException; -import org.jboss.logging.Logger; -import org.osgi.jmx.framework.BundleStateMBean; -import org.osgi.jmx.framework.FrameworkMBean; -import org.osgi.jmx.framework.ServiceStateMBean; - -/** - * KarafManagedDeployableContainer - * - * @author thomas.diesler@jboss.com - */ -public class CustomFuseContainer extends JMXDeployableContainer { - - private static final Logger log = Logger.getLogger(CustomFuseContainer.class); - - private KarafManagedContainerConfiguration config; - private Process process; - - @Override - public Class getConfigurationClass() { - @SuppressWarnings("unchecked") - Class clazz = (Class) KarafManagedContainerConfiguration.class; - return clazz; - } - - @Override - public void setup(T config) { - super.setup(config); - this.config = config; - } - - @Override - public void start() throws LifecycleException { - - // Try to connect to an already running server - MBeanServerConnection mbeanServer = null; - try { - mbeanServer = getMBeanServerConnection(500, TimeUnit.MILLISECONDS); - } catch (TimeoutException ignore) { - } - - if (mbeanServer != null && !config.isAllowConnectingToRunningServer()) { - throw new LifecycleException( - "The server is already running! Managed containers does not support connecting to running server instances due to the " + - "possible harmful effect of connecting to the wrong server. Please stop server before running or change to another type of container.\n" + - "To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration"); - } - - // Start the Karaf process - if (mbeanServer == null) { - String karafHome = config.getKarafHome(); - if (karafHome == null) - throw new IllegalStateException("karafHome cannot be null"); - - File karafHomeDir = new File(karafHome).getAbsoluteFile(); - if (!karafHomeDir.isDirectory()) - throw new IllegalStateException("Not a valid Karaf home dir: " + karafHomeDir); - - String java = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java"; - log.infof("Using java: %s", java); - - List cmd = new ArrayList<>(); - cmd.add(java); - - // JavaVM args - String javaArgs = config.getJavaVmArguments(); - if (!javaArgs.contains("-Xmx")) { - javaArgs = KarafManagedContainerConfiguration.DEFAULT_JAVAVM_ARGUMENTS + " " + javaArgs; - } - cmd.addAll(Arrays.asList(javaArgs.split("\\s"))); - - // Karaf properties - cmd.add("-Dkaraf.home=" + karafHomeDir); - cmd.add("-Dkaraf.base=" + karafHomeDir); - cmd.add("-Dkaraf.etc=" + karafHomeDir + "/etc"); - cmd.add("-Dkaraf.data=" + karafHomeDir + "/data"); - cmd.add("-Dkaraf.instances=" + karafHomeDir + "/instances"); - cmd.add("-Dkaraf.restart.jvm.supported=true"); - cmd.add("-Dkaraf.startLocalConsole=false"); - cmd.add("-Dkaraf.startRemoteShell=true"); - - // Java properties - cmd.add("-Djava.io.tmpdir=" + new File(karafHomeDir, "data/tmp")); - cmd.add("-Djava.util.logging.config.file=" + new File(karafHomeDir, "etc/java.util.logging.properties")); - cmd.add("-Djava.endorsed.dirs=" + new File(karafHomeDir, "lib/endorsed")); - - // Classpath - StringBuilder classPath = new StringBuilder(); - boolean fuse7 = new File(karafHomeDir, "lib/boot/").exists(); - if (fuse7) { - log.info("Adding karaf4 libraries to classpath."); - String[] libDirs = { "lib/boot/", "lib/ext/" }; - for (String libDir : libDirs) { - File karafLibBootDir = new File(karafHomeDir, libDir); - String[] libs = karafLibBootDir.list((File dir, String name) -> name.endsWith(".jar")); - for (String lib : libs) { - String separator = classPath.length() > 0 ? File.pathSeparator : ""; - classPath.append(separator).append(new File(karafLibBootDir, lib)); - } - } - - } else { //fuse6 - log.info("Adding karaf3 libraries to classpath."); - File karafLibDir = new File(karafHomeDir, "lib"); - String[] libs = karafLibDir.list((File dir, String name) -> name.startsWith("karaf")); - for (String lib : libs) { - String separator = classPath.length() > 0 ? File.pathSeparator : ""; - classPath.append(separator).append(new File(karafHomeDir, "lib/" + lib)); - } - } - cmd.add("-classpath"); - cmd.add(classPath.toString()); - - // Main class - cmd.add("org.apache.karaf.main.Main"); - - // Output the startup command - StringBuffer cmdstr = new StringBuffer(); - for (String tok : cmd) { - cmdstr.append(tok).append(" "); - } - log.debugv("Starting Karaf with: {0}", cmdstr); - - try { - ProcessBuilder processBuilder = new ProcessBuilder(cmd); - processBuilder.directory(karafHomeDir); - processBuilder.redirectErrorStream(true); - process = processBuilder.start(); - new Thread(new ConsoleConsumer()).start(); - } catch (IOException ex) { - throw new LifecycleException("Cannot start managed Karaf container", ex); - } - - // Get the MBeanServerConnection - try { - log.debug("Geting the MBeanServerConnection"); - mbeanServer = getMBeanServerConnection(120, TimeUnit.SECONDS); - } catch (TimeoutException ex) { - destroyKarafProcess(); - throw new LifecycleException("Cannot obtain MBean server connection", ex); - } - } - - mbeanServerInstance.set(mbeanServer); - - try { - // Get the FrameworkMBean - ObjectName oname = ObjectNameFactory.create("osgi.core:type=framework,*"); - frameworkMBean = getMBeanProxy(mbeanServer, oname, FrameworkMBean.class, 30, TimeUnit.SECONDS); - - // Get the BundleStateMBean - oname = ObjectNameFactory.create("osgi.core:type=bundleState,*"); - bundleStateMBean = getMBeanProxy(mbeanServer, oname, BundleStateMBean.class, 30, TimeUnit.SECONDS); - - // Get the BundleStateMBean - oname = ObjectNameFactory.create("osgi.core:type=serviceState,*"); - serviceStateMBean = getMBeanProxy(mbeanServer, oname, ServiceStateMBean.class, 30, TimeUnit.SECONDS); - - // Install the arquillian bundle to become active - installArquillianBundle(); - - // Await the arquillian bundle to become active - awaitArquillianBundleActive(30, TimeUnit.SECONDS); - - // Await the beginning start level - Integer beginningStartLevel = config.getKarafBeginningStartLevel(); - if (beginningStartLevel != null) - awaitBeginningStartLevel(beginningStartLevel, 30, TimeUnit.SECONDS); - - // Await bootsrap complete services - awaitBootstrapCompleteServices(); - - } catch (RuntimeException rte) { - destroyKarafProcess(); - throw rte; - } catch (IOException | InterruptedException | TimeoutException | LifecycleException ex) { - destroyKarafProcess(); - throw new LifecycleException("Cannot start Karaf container", ex); - } - } - - @Override - public void stop() throws LifecycleException { - try { - super.stop(); - } catch (LifecycleException ex) { - log.info("Couldn't uninstall arquillian bundle. This should be non-blocking issue, proceeding with destroying karaf process."); - } - - destroyKarafProcess(); - } - - private void destroyKarafProcess() throws LifecycleException { - if (process != null) { - process.destroy(); - try { - process.waitFor(); - } catch (InterruptedException e) { - throw new LifecycleException("Cannot start Karaf container", e); - } - } - } - - /** - * Runnable that consumes the output of the process. If nothing consumes the output the AS will hang on some platforms - * - * @author Stuart Douglas - */ - private class ConsoleConsumer implements Runnable { - - @Override - public void run() { - final InputStream stream = process.getInputStream(); - final boolean writeOutput = config.isOutputToConsole(); - try { - byte[] buf = new byte[32]; - int num; - // Do not try reading a line cos it considers '\r' end of line - while ((num = stream.read(buf)) != -1) { - if (writeOutput) - System.out.write(buf, 0, num); - } - } catch (IOException ignored) { - } - } - } - - -} diff --git a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/fuse/KeycloakOSGiApplicationArchiveProcessor.java b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/fuse/KeycloakOSGiApplicationArchiveProcessor.java deleted file mode 100644 index 3be51adb5a3..00000000000 --- a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/fuse/KeycloakOSGiApplicationArchiveProcessor.java +++ /dev/null @@ -1,56 +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.utils.arquillian.fuse; - -import org.jboss.arquillian.container.osgi.OSGiApplicationArchiveProcessor; -import org.jboss.arquillian.test.spi.TestClass; -import org.jboss.logging.Logger; -import org.jboss.shrinkwrap.api.Archive; - -/** - * @author Marek Posolda - */ -public class KeycloakOSGiApplicationArchiveProcessor extends OSGiApplicationArchiveProcessor { - - private static final Logger log = Logger.getLogger(KeycloakOSGiApplicationArchiveProcessor.class); - - // We want to ignore OSGI for exampleAdapter tests - @Override - public void process(Archive appArchive, TestClass testClass) { - Class clazz = testClass.getJavaClass(); - boolean isExampleAdapterTest = isExampleAdapterTest(clazz); - - if (isExampleAdapterTest) { - log.infof("Ignore OSGiApplicationArchiveProcessor for test %s", clazz.getName()); - } else { - super.process(appArchive, testClass); - } - } - - public static boolean isExampleAdapterTest(Class clazz) { - Class parent = clazz; - while (true) { - parent = parent.getSuperclass(); - if (parent == null) { - return false; - } else if (parent.getName().equals("org.keycloak.testsuite.adapter.AbstractExampleAdapterTest")) { - return true; - } - } - } -} diff --git a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/fuse/FuseUtils.java b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/fuse/FuseUtils.java deleted file mode 100644 index b6f51464e46..00000000000 --- a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/fuse/FuseUtils.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright 2019 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.testsuite.utils.fuse; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.util.EnumSet; -import java.util.Set; -import org.apache.sshd.client.SshClient; -import org.apache.sshd.client.channel.ChannelExec; -import org.apache.sshd.client.channel.ClientChannelEvent; -import org.apache.sshd.client.future.ConnectFuture; -import org.apache.sshd.client.session.ClientSession; -import org.hamcrest.Matcher; -import org.jboss.arquillian.core.spi.Validate; -import org.jboss.logging.Logger; -import org.junit.Assert; -import org.keycloak.testsuite.utils.arquillian.ContainerConstants; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.anyOf; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.isEmptyString; -import static org.hamcrest.Matchers.not; - -public class FuseUtils { - - private static final Logger log = Logger.getLogger(FuseUtils.class); - private static boolean initiated = false; - - private static final String managementUser = System.getProperty("app.server.management.user", "admin"); - private static final String managementPassword = System.getProperty("app.server.management.password", "password"); - private static final String additionalFuseRepos = System.getProperty("additional.fuse.repos"); - private static final String userHome = System.getProperty("user.home"); - private static final String projectVersion = System.getProperty("project.version"); - private static final String mvnRepoLocal; - private static final String mvnLocalSettings; - - public enum Result { OK, NOT_FOUND, NO_CREDENTIALS, NO_ROLES, EMPTY }; - - static { - Validate.notNullOrEmpty(managementUser, "app.server.management.user is not set."); - Validate.notNullOrEmpty(managementPassword, "app.server.management.password is not set."); - Validate.notNullOrEmpty(additionalFuseRepos, "additional.fuse.repos is not set."); - - mvnRepoLocal = System.getProperty("maven.repo.local", userHome + "/.m2/repository"); - mvnLocalSettings = System.getProperty("maven.local.settings", userHome + "/.m2/settings.xml"); - } - - public static void setUpFuse(String appServer) throws IOException { - if (!initiated) { - switch (appServer) { - case ContainerConstants.APP_SERVER_FUSE7X : - setUpFuse7(); - break; - case ContainerConstants.APP_SERVER_FUSE63 : - setUpFuse6(); - break; - default: - throw new UnsupportedOperationException(appServer + " is not supported!"); - } - initiated = true; - } - } - - private static void setUpFuse7() throws IOException { - log.debug("Going to set up fuse server"); - - assertCommand(managementUser, managementPassword, - "config:edit org.ops4j.pax.url.mvn; " + - "config:property-set org.ops4j.pax.url.mvn.localRepository " + mvnRepoLocal + "; " + - "config:property-set org.ops4j.pax.url.mvn.settings " + mvnLocalSettings + "; " + - "config:property-append org.ops4j.pax.url.mvn.repositories " + additionalFuseRepos + "; " + - "config:update", - Result.EMPTY); - - assertCommand(managementUser, managementPassword, - "config:edit jmx.acl.org.apache.karaf.security.jmx; " + - "config:property-append list* viewer; " + - "config:property-append set* jmxAdmin; " + - "config:property-append * jmxAdmin,admin; " + - "config:update", - Result.EMPTY); - - assertCommand(managementUser, managementPassword, - "config:edit org.apache.karaf.management; " + - "config:property-set jmxRealm keycloak;" + - "config:update", - Result.EMPTY); - - assertCommand(managementUser, managementPassword, - "feature:repo-add mvn:org.keycloak/keycloak-osgi-features/" + projectVersion + "/xml/features; " + - "feature:repo-add mvn:org.keycloak.testsuite/fuse-example-keycloak-features/" + projectVersion + "/xml/features; " + - "feature:install pax-http-undertow; " + - "feature:install keycloak-jaas keycloak-pax-http-undertow; " + - "feature:install keycloak-fuse-7.0-example", - Result.OK); - - assertCommand(managementUser, managementPassword, - "config:edit --factory --alias cxf org.ops4j.pax.web.context; " + - "config:property-set bundle.symbolicName org.apache.cxf.cxf-rt-transports-http; " + - "config:property-set context.id default; " + - "config:property-set context.param.keycloak.config.resolver org.keycloak.adapters.osgi.HierarchicalPathBasedKeycloakConfigResolver; " + - "config:property-set login.config.authMethod KEYCLOAK; " + - "config:property-set security.cxf.url /cxf/customerservice/*; " + - "config:property-set security.cxf.roles \"admin, user\"; " + - "config:update", - Result.EMPTY); - - assertCommand(managementUser, managementPassword, - "system:property -p hawtio.keycloakEnabled true; " + - "system:property -p hawtio.realm keycloak; " + - "system:property -p hawtio.keycloakClientConfig ${karaf.etc}/keycloak-hawtio-client.json; " + - "system:property -p hawtio.keycloakServerConfig ${karaf.etc}/keycloak-bearer.json; " + - "system:property -p hawtio.roles admin,manager,viewer,ssh; " + - "system:property -p hawtio.rolePrincipalClasses org.keycloak.adapters.jaas.RolePrincipal,org.apache.karaf.jaas.boot.principal.RolePrincipal;", - Result.EMPTY); - - // KEYCLOAK-17873 For older version of Fuse - final boolean isOSGiBundleAvailable = checkCommand(managementUser, managementPassword, "bundle:id io.hawt.hawtio-osgi", Result.OK); - assertCommand(managementUser, managementPassword, isOSGiBundleAvailable ? "restart io.hawt.hawtio-osgi" : "restart io.hawt.hawtio-war", Result.EMPTY); - - assertCommand(managementUser, managementPassword, - "config:edit org.apache.karaf.shell; " + - "config:property-set sshRealm keycloak; " + - "config:update", - Result.EMPTY); - - log.debug("Fuse server should be ready"); - } - - private static void setUpFuse6() throws IOException { - log.debug("Going to set up fuse server"); - - assertCommand(managementUser, managementPassword, - "config:edit org.ops4j.pax.url.mvn; " + - "config:propset org.ops4j.pax.url.mvn.localRepository " + mvnRepoLocal + "; " + - "config:propset org.ops4j.pax.url.mvn.settings " + mvnLocalSettings + "; " + - "config:propappend org.ops4j.pax.url.mvn.repositories " + additionalFuseRepos + "; " + - "config:update", - Result.EMPTY); - - assertCommand(managementUser, managementPassword, - "config:edit jmx.acl.org.apache.karaf.security.jmx; " + - "config:propappend list* viewer; " + - "config:propappend set* jmxAdmin; " + - "config:propappend * jmxAdmin,admin; " + - "config:update", - Result.EMPTY); - - assertCommand(managementUser, managementPassword, - "config:edit org.apache.karaf.management; " + - "config:propset jmxRealm keycloak;" + - "config:update", - Result.EMPTY); - - assertCommand(managementUser, managementPassword, - "features:addurl mvn:org.keycloak/keycloak-osgi-features/" + projectVersion + "/xml/features; " + - "features:addurl mvn:org.keycloak.testsuite/fuse-example-keycloak-features/" + projectVersion + "/xml/features; " + - "features:install keycloak-fuse-6.3-example", - Result.OK); - - String appServerHome = System.getProperty("app.server.home"); - Validate.notNullOrEmpty(appServerHome, "app.server.home is not set."); - assertCommand(managementUser, managementPassword, - "system-property -p hawtio.roles admin,user; " + - "system-property -p hawtio.keycloakEnabled true; " + - "system-property -p hawtio.realm keycloak; " + - "system-property -p hawtio.keycloakClientConfig file://" + appServerHome + "/etc/keycloak-hawtio-client.json; " + - "system-property -p hawtio.rolePrincipalClasses org.keycloak.adapters.jaas.RolePrincipal,org.apache.karaf.jaas.boot.principal.RolePrincipal; ", - Result.EMPTY); - - String output = getCommandOutput(managementUser, managementPassword, "osgi:list | grep hawtio | grep web;"); - assertThat(output, containsString("hawtio")); - String id = output.substring(output.indexOf("[") + 1, output.indexOf("]")).trim(); - log.debug("osgi hawtio-web id: " + id); - assertCommand(managementUser, managementPassword, - "osgi:restart " + id, - Result.EMPTY); - - assertCommand(managementUser, managementPassword, - "config:edit org.apache.karaf.shell; " + - "config:propset sshRealm keycloak; " + - "config:update", - Result.EMPTY); - - log.debug("Fuse server should be ready"); - } - - public static boolean checkCommand(String user, String password, String command, Result result) throws IOException { - String output = getCommandOutput(user, password, command); - - log.debug("Check command: " + command + ", user: " + user + ", password: " + password + ", output: " + output); - return resultToMatcher(result).matches(output); - } - - public static String assertCommand(String user, String password, String command, Result result) throws IOException { - String output = getCommandOutput(user, password, command); - - log.debug("Assert command: " + command + ", user: " + user + ", password: " + password + ", output: " + output); - assertThat(output, resultToMatcher(result)); - return output; - } - - public static String getCommandOutput(String user, String password, String command) throws IOException { - if (!command.endsWith("\n")) - command += "\n"; - - try (ClientSession session = openSshChannel(user, password); - ChannelExec channel = session.createExecChannel(command); - ByteArrayOutputStream out = new ByteArrayOutputStream()) { - channel.setOut(out); - channel.setErr(out); - channel.open(); - channel.waitFor(EnumSet.of(ClientChannelEvent.CLOSED, ClientChannelEvent.EOF), 0); - - return out.toString(); - } - } - - private static ClientSession openSshChannel(String username, String password) throws IOException { - SshClient client = SshClient.setUpDefaultClient(); - client.start(); - ConnectFuture future = client.connect(username, "localhost", 8101); - future.await(); - ClientSession session = future.getSession(); - - Set ret = EnumSet.of(ClientSession.ClientSessionEvent.WAIT_AUTH); - while (ret.contains(ClientSession.ClientSessionEvent.WAIT_AUTH)) { - session.addPasswordIdentity(password); - session.auth().verify(); - ret = session.waitFor(EnumSet.of(ClientSession.ClientSessionEvent.WAIT_AUTH, ClientSession.ClientSessionEvent.CLOSED, ClientSession.ClientSessionEvent.AUTHED), 0); - } - if (ret.contains(ClientSession.ClientSessionEvent.CLOSED)) { - throw new RuntimeException("Could not open SSH channel"); - } - - return session; - } - - private static Matcher resultToMatcher(Result result) { - switch (result) { - case EMPTY: - return isEmptyString(); - case OK: - return not(anyOf( - containsString("Insufficient credentials"), - containsString("Command not found"), - containsString("Error executing command"), - containsString("Authentication failed")) - ); - case NOT_FOUND: - return containsString("Command not found"); - case NO_CREDENTIALS: - return containsString("Insufficient credentials"); - case NO_ROLES: - return containsString("Current user has no associated roles"); - default: - Assert.fail("Unexpected enum value: " + result); - return containsString("Unexpected enum value: " + result); - } - } -}