keycloak-aplcache

Details

diff --git a/distribution/subsystem-war/src/main/webapp/WEB-INF/web.xml b/distribution/subsystem-war/src/main/webapp/WEB-INF/web.xml
index 4257449..164f6be 100755
--- a/distribution/subsystem-war/src/main/webapp/WEB-INF/web.xml
+++ b/distribution/subsystem-war/src/main/webapp/WEB-INF/web.xml
@@ -35,11 +35,6 @@
         <url-pattern>/*</url-pattern>
     </filter-mapping>
 
-    <filter-mapping>
-        <filter-name>Keycloak Client Connection Filter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
-
     <servlet-mapping>
         <servlet-name>Keycloak REST Interface</servlet-name>
         <url-pattern>/*</url-pattern>
diff --git a/examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/ProductImpl.java b/examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/ProductImpl.java
new file mode 100644
index 0000000..d413644
--- /dev/null
+++ b/examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/ProductImpl.java
@@ -0,0 +1,27 @@
+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<String> productId, Holder<String> 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/examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/ObjectFactory.java b/examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/ObjectFactory.java
index dd2e74d..b712c5e 100644
--- a/examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/ObjectFactory.java
+++ b/examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/types/ObjectFactory.java
@@ -30,27 +30,27 @@ public class ObjectFactory {
     }
 
     /**
-     * Create an instance of {@link GetPersonResponse }
+     * Create an instance of {@link GetProductResponse }
      *
      */
-    public GetPersonResponse createGetPersonResponse() {
-        return new GetPersonResponse();
+    public GetProductResponse createGetProductResponse() {
+        return new GetProductResponse();
     }
 
     /**
-     * Create an instance of {@link GetPerson }
+     * Create an instance of {@link GetProduct }
      *
      */
-    public GetPerson createGetPerson() {
-        return new GetPerson();
+    public GetProduct createGetProduct() {
+        return new GetProduct();
     }
 
     /**
-     * Create an instance of {@link UnknownPersonFault }
+     * Create an instance of {@link UnknownProductFault }
      *
      */
-    public UnknownPersonFault createUnknownPersonFault() {
-        return new UnknownPersonFault();
+    public UnknownProductFault createUnknownProductFault() {
+        return new UnknownProductFault();
     }
 
 }
diff --git a/examples/fuse/cxf-jaxws/src/main/resources/META-INF/spring/beans.xml b/examples/fuse/cxf-jaxws/src/main/resources/META-INF/spring/beans.xml
index 32a2163..29f2ca5 100644
--- a/examples/fuse/cxf-jaxws/src/main/resources/META-INF/spring/beans.xml
+++ b/examples/fuse/cxf-jaxws/src/main/resources/META-INF/spring/beans.xml
@@ -64,7 +64,7 @@
     </httpj:engine-factory>
 
     <jaxws:endpoint
-                    implementor="org.keycloak.example.ws.PersonImpl"
-                    address="http://localhost:8282/PersonServiceCF" depends-on="kc-cxf-endpoint"/>
+                    implementor="org.keycloak.example.ws.ProductImpl"
+                    address="http://localhost:8282/ProductServiceCF" depends-on="kc-cxf-endpoint"/>
 
 </beans>
\ No newline at end of file
diff --git a/examples/fuse/fuse-admin/README.md b/examples/fuse/fuse-admin/README.md
index faa2687..bae96d9 100644
--- a/examples/fuse/fuse-admin/README.md
+++ b/examples/fuse/fuse-admin/README.md
@@ -24,7 +24,7 @@ Skip this step if you installed demo already.
 sshRealm=keycloak
 ```
 
-3) Copy file from Keycloak fuse examples `examples/fuse/fuse-admin/keycloak-direct-access.json` to `$FUSE_HOME/etc/` directory. 
+3) Copy file from Keycloak fuse examples `keycloak-examples-<VERSION>/fuse/fuse-admin/keycloak-direct-access.json` to `$FUSE_HOME/etc/` directory.
 This file contains configuration of the client application, which is used by JAAS DirectAccessGrantsLoginModule from `keycloak` JAAS realm for SSH authentication.
  
 4) Start Fuse and install `keycloak` JAAS realm into Fuse. This could be done easily by installing `keycloak-jaas` feature, which has JAAS realm predefined 
@@ -36,7 +36,7 @@ features:addurl mvn:org.keycloak/keycloak-osgi-features/1.2.0.Beta1/xml/features
 features:install keycloak-jaas
 ```
 
-5) Now let's type this from your terminal:
+5) Now let's type this from your terminal to login via SSH as `admin` user:
 
 ```
 ssh -o PubkeyAuthentication=no -p 8101 admin@localhost
@@ -51,11 +51,10 @@ JMX authentication with keycloak credentials on JBoss Fuse 6.1
 This may be needed in case if you really want to use jconsole or other external tool to perform remote connection to JMX through RMI. Otherwise it may 
 be better to use just hawt.io/jolokia as jolokia agent is installed in hawt.io by default.
  
-1) In file `$FUSE_HOME/etc/org.apache.karaf.management.cfg` you can change these 2 properties:
+1) In file `$FUSE_HOME/etc/org.apache.karaf.management.cfg` you can change this property:
 
 ```
 jmxRealm=keycloak
-jmxRole=org.keycloak.adapters.jaas.RolePrincipal:admin
 ```
 
 2) In jconsole you can fill URL like:
@@ -71,20 +70,15 @@ may be still able to access MBeans remotely via HTTP (Hawtio). So make sure to p
 really protect JMX mbeans.
 
 
-SSH and JMX on JBoss Fuse 6.2 and Apache Karaf 3.0.2
---------------------------------------------
+SSH and JMX on JBoss Fuse 6.2 and Apache Karaf 3.0.3
+----------------------------------------------------
 For SSH steps are very similar to above for 6.1. In JBoss Fuse 6.2 you may need to install `ssh` feature as it doesn't seem to be installed here by default.
 
 ```
 features:install ssh
 ```
 
-For JMX, the steps are similar like for Fuse 6.1, however there is more fine grained authorization for JMX access in Fuse 6.2 and Karaf 3. 
-You need to install just jmxRealm in `$FUSE_HOME/etc/org.apache.karaf.management.cfg` . Property `jmxRole` is no longer valid.
-
-```
-jmxRealm=keycloak
-``` 
+For JMX, the steps are similar like for Fuse 6.1, however there is more fine grained authorization for JMX access in Fuse 6.2 and Karaf 3.
 
 Actually if you login as user `admin`, you have very limited privileges without possibility to do much JMX operations as this user has just `admin` role, which is not allowed to do much in JMX.
 
diff --git a/examples/fuse/product-app-fuse/src/main/java/org/keycloak/example/ProductPortalServlet.java b/examples/fuse/product-app-fuse/src/main/java/org/keycloak/example/ProductPortalServlet.java
index 85ecc42..248e00e 100644
--- a/examples/fuse/product-app-fuse/src/main/java/org/keycloak/example/ProductPortalServlet.java
+++ b/examples/fuse/product-app-fuse/src/main/java/org/keycloak/example/ProductPortalServlet.java
@@ -19,12 +19,12 @@ import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.message.Message;
 import org.keycloak.KeycloakSecurityContext;
 import org.keycloak.constants.ServiceUrlConstants;
-import org.keycloak.example.ws.Person;
-import org.keycloak.example.ws.UnknownPersonFault;
+import org.keycloak.example.ws.Product;
+import org.keycloak.example.ws.UnknownProductFault;
 import org.keycloak.util.KeycloakUriBuilder;
 
 /**
- * Servlet for receiving informations about products from backend JAXWS service. Actually it's about "persons" not "products" :)
+ * Servlet for receiving informations about products from backend JAXWS service
  *
  * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
  */
@@ -46,26 +46,27 @@ public class ProductPortalServlet extends HttpServlet {
         out.println("<p>Goto: <a href=\"/customer-portal\">customers</a> | <a href=\"" + logoutUri + "\">logout</a> | <a href=\"" + acctUri + "\">manage acct</a></p>");
         out.println("Servlet User Principal <b>" + req.getUserPrincipal() + "</b> made this request.");
 
-        String unsecuredWsClientResponse = sendWsReq(req, false);
-        String securedWsClientResponse = sendWsReq(req, true);
+        String unsecuredWsClientResponse = sendWsReq(req, "1", false);
+        String securedWsClientResponse = sendWsReq(req, "1", true);
+        String securedWsClient2Response = sendWsReq(req, "2", true);
 
-        out.println("<p>Person with ID 1 - unsecured request: <b>" + unsecuredWsClientResponse + "</b></p>");
-        out.println("<p>Person with ID 1 - secured request: <b>" + securedWsClientResponse + "</b></p>");
+        out.println("<p>Product with ID 1 - unsecured request (it should end with failure): <b>" + unsecuredWsClientResponse + "</b></p><br>");
+        out.println("<p>Product with ID 1 - secured request: <b>" + securedWsClientResponse + "</b></p><br>");
+        out.println("<p>Product with ID 2 - secured request: <b>" + securedWsClient2Response + "</b></p><br>");
         out.println("</body></html>");
         out.flush();
         out.close();
     }
 
-    private String sendWsReq(HttpServletRequest req, boolean secured) {
+    private String sendWsReq(HttpServletRequest req, String productId, boolean secured) {
         JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
-        factory.setServiceClass(Person.class);
-        factory.setAddress("http://localhost:8282/PersonServiceCF");
+        factory.setServiceClass(Product.class);
+        factory.setAddress("http://localhost:8282/ProductServiceCF");
 
-        Person simpleClient = (Person)factory.create();
-        java.lang.String _getPerson_personIdVal = "1";
-        javax.xml.ws.Holder<java.lang.String> _getPerson_personId = new javax.xml.ws.Holder<java.lang.String>(_getPerson_personIdVal);
-        javax.xml.ws.Holder<java.lang.String> _getPerson_ssn = new javax.xml.ws.Holder<java.lang.String>();
-        javax.xml.ws.Holder<java.lang.String> _getPerson_name = new javax.xml.ws.Holder<java.lang.String>();
+        Product simpleClient = (Product)factory.create();
+        java.lang.String _getProduct_productIdVal = productId;
+        javax.xml.ws.Holder<java.lang.String> _getProduct_productId = new javax.xml.ws.Holder<java.lang.String>(_getProduct_productIdVal);
+        javax.xml.ws.Holder<java.lang.String> _getProduct_name = new javax.xml.ws.Holder<java.lang.String>();
 
         // Attach Authorization header
         if (secured) {
@@ -79,12 +80,12 @@ public class ProductPortalServlet extends HttpServlet {
         }
 
         try {
-            simpleClient.getPerson(_getPerson_personId, _getPerson_ssn, _getPerson_name);
-            return String.format("Person received: id=%s, name=%s, ssn=%s", _getPerson_personId.value, _getPerson_name.value, _getPerson_ssn.value);
-        } catch (UnknownPersonFault upf) {
-            return "UnknownPersonFault has occurred. Details: " + upf.toString();
+            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 person. Reason: " + wse.getMessage();
+            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();
diff --git a/examples/fuse/README.md b/examples/fuse/README.md
index c134bbb..e4a2ea5 100644
--- a/examples/fuse/README.md
+++ b/examples/fuse/README.md
@@ -2,10 +2,10 @@ 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 Jetty8 adapter
-as both JBoss Fuse 6.1 and Apache Karaf 3 are bundled with [Jetty8](http://eclipse.org/jetty/) server under the covers and Jetty is used for running various kinds of web applications.
+as both JBoss Fuse 6 and Apache Karaf 3 are bundled with [Jetty8](http://eclipse.org/jetty/) server under the covers and Jetty is used for running various kinds of web applications.
 
 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/Karaf server. Keycloak server is supposed to run separately on Wildfly 8 or JBoss EAP 6.3.
+are applications running on separate Fuse/Karaf server. Keycloak server is supposed to run separately on Wildfly.
 
 What is supported for Fuse/Karaf is:
 * Security for classic WAR applications deployed on Fuse/Karaf with [pax-war extender](https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+War). 
@@ -13,7 +13,8 @@ What is supported for Fuse/Karaf is:
 * Security for [Apache Camel](http://camel.apache.org/) Jetty endpoints running with [camel-jetty](http://camel.apache.org/jetty.html) component.
 * Security for [Apache CXF](http://cxf.apache.org/) endpoints running on their own separate [Jetty engine](http://cxf.apache.org/docs/jetty-configuration.html). 
 Supports both securing JAX-RS and JAX-WS endpoints.
-* Security for [Apache CXF](http://cxf.apache.org/) endpoints running on default engine provided by CXF servlet on [http://localhost:8181/cxf](http://localhost:8181/cxf)
+* Security for [Apache CXF](http://cxf.apache.org/) endpoints running on default engine provided by CXF servlet on [http://localhost:8181/cxf](http://localhost:8181/cxf) . NOTE: Actually It's better and
+more secure to use the separate Jetty Engine instead of the default one. The default engine works fine, but I would recommend the separate one.
  
 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)
@@ -30,18 +31,38 @@ Running of demo consists of 2 steps. First you need to run separate Keycloak ser
 Base steps
 ----------
 
-* Run external instance of Keycloak server on WildFly 8 or JBoss EAP 6.3 . Fuse demo suppose that server is running on [http://localhost:8080/auth](http://localhost:8080/auth)
+* 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 testrealm.json on `examples/fuse/testrealm.json` . See [here](../demo-template/README.md#step-3-import-the-test-realm) 
 the details on how to import the realm
-* Then build examples, which is needed so the feature repository is added to your local maven repo:
+* Then download Keycloak examples and build Fuse example, which is needed so the feature repository is added to your local maven repo:
 
 ```
-cd examples/fuse
+unzip -q keycloak-examples-<VERSION>.zip
+cd keycloak-examples-<VERSION>/fuse
 mvn clean install
 ```
 
-Run demo applications on Apache Karaf 3.0.2
--------------------------------------------
+Running demo on JBoss Fuse 6.2
+------------------------------
+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):
+
+```
+features:addurl mvn:org.keycloak/keycloak-osgi-features/1.2.0.Beta1/xml/features
+features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.2.0.Beta1/xml/features
+features:install keycloak-fuse-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.
+
+
+Running demo on Apache Karaf 3.0.3
+----------------------------------
 
 Demo is using Apache camel and Apache CXF, which are not in standalone Karaf by default. So you will need to install feature repositories for both of them.
 Next step is to add feature repository for main set of Keycloak karaf features and for the demo. Once all feature URLs are added, you just need to install `keycloak-fuse-example` feature,
@@ -57,23 +78,18 @@ feature:repo-add mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.
 feature:install keycloak-fuse-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.
+Now you can test example applications similarly like described for "JBoss Fuse 6.2" section.
 
-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.  
 
-Running example on JBoss Fuse 6.1.0.redhat-379
-----------------------------------------------
+Running demo on JBoss Fuse 6.1.0.redhat-379
+-------------------------------------------
 
 Securing your applications on JBoss Fuse 6.1 is a bit more tricky. There is bug [https://ops4j1.jira.com/browse/PAXWEB-666](https://ops4j1.jira.com/browse/PAXWEB-666) 
 , which doesn't easily allow to secure default Jetty engine on [http://localhost:8181](http://localhost:8181) as it's not possible to inject 
 custom Jetty authenticator provided by Keycloak Jetty adapter into underlying Jetty server. Hence first step is to upgrade pax-web 
 version from default 3.0.6 to newer 3.1.2 . Then you need to "refresh" cxf feature too. Final step is to install "keycloak-fuse-example" feature. 
 
-All the steps could be performed with these commands in Fuse console (Replace Keycloak versions with the current Keycloak version number):
+All the steps could be performed with these commands in Fuse console (Replace 1.2.0.Beta1 with the actual version number of Keycloak you are using):
                                                                                                                                                                                    
 ```
 features:uninstall pax-war
@@ -84,7 +100,7 @@ features:removeurl mvn:org.ops4j.pax.web/pax-web-features/3.0.6/xml/features
 ```
 
 Now restart fuse (use `osgi:shutdown` command and start it again from command line. You can ignore startup messages after restart 
-as pax-web is not installed at the moment. Then run those commands:
+as pax-web is not installed at the moment. Then run those commands (replace 1.2.0.Beta1 with the actual version number of Keycloak you are using):
 
 ```
 features:addurl mvn:org.ops4j.pax.web/pax-web-features/3.1.2/xml/features
@@ -102,20 +118,8 @@ So last step is to install the demo now:
 features:install keycloak-fuse-example
 ```
 
-Now you can test example applications similarly like described for "Karaf" section.
-
-Running example on JBoss Fuse 6.2.0
------------------------------------
-This is snapshot version of JBoss Fuse, which is not released yet at this moment. It has pax-web bug mentioned above fix already, so just those commands are 
-sufficient to install the demo (Replace Keycloak versions with the current Keycloak version number):
-
-```
-features:addurl mvn:org.keycloak/keycloak-osgi-features/1.2.0.Beta1/xml/features
-features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.2.0.Beta1/xml/features
-features:install keycloak-fuse-example
-```
+Now you can test example applications similarly like described in "JBoss Fuse 6.2" section.
 
-Now you can test example applications similarly like described for "Karaf" section.
 
 How to secure your own applications
 -----------------------------------

pom.xml 82(+52 -30)

diff --git a/pom.xml b/pom.xml
index bb9a820..33794fa 100755
--- a/pom.xml
+++ b/pom.xml
@@ -81,12 +81,14 @@
         <greenmail.version>1.3.1b</greenmail.version>
         <xmlsec.version>1.5.1</xmlsec.version>
 
+        <enforcer.plugin.version>1.4</enforcer.plugin.version>
         <jboss.as.plugin.version>7.5.Final</jboss.as.plugin.version>
         <wildfly.plugin.version>1.0.1.Final</wildfly.plugin.version>
         <minify.plugin.version>1.7.2</minify.plugin.version>
         <embedmongo.plugin.version>0.1.12</embedmongo.plugin.version>
         <jmeter.plugin.version>1.9.0</jmeter.plugin.version>
         <jmeter.analysis.plugin.version>1.0.4</jmeter.analysis.plugin.version>
+        <osgi.bundle.plugin.version>2.3.7</osgi.bundle.plugin.version>
     </properties>
 
     <url>http://keycloak.org</url>
@@ -162,16 +164,16 @@
                 <artifactId>relaxngDatatype</artifactId>
                 <version>${github.relaxng.version}</version>
             </dependency>
-        <dependency>
-            <groupId>com.sun.istack</groupId>
-            <artifactId>istack-commons-runtime</artifactId>
-            <version>${sun.istack.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.istack</groupId>
-            <artifactId>istack-commons-tools</artifactId>
-            <version>${sun.istack.version}</version>
-        </dependency>
+            <dependency>
+                <groupId>com.sun.istack</groupId>
+                <artifactId>istack-commons-runtime</artifactId>
+                <version>${sun.istack.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.sun.istack</groupId>
+                <artifactId>istack-commons-tools</artifactId>
+                <version>${sun.istack.version}</version>
+            </dependency>
             <dependency>
                 <groupId>com.sun.xml.bind.external</groupId>
                 <artifactId>rngom</artifactId>
@@ -516,16 +518,16 @@
                 <version>${mysql.version}</version>
                 <scope>test</scope>
             </dependency>
-           <dependency>
-               <groupId>org.apache.httpcomponents</groupId>
-               <artifactId>httpclient</artifactId>
-               <version>${apache.httpcomponents.version}</version>
-           </dependency>
-           <dependency>
-               <groupId>org.apache.httpcomponents</groupId>
-               <artifactId>httpcore</artifactId>
-               <version>${apache.httpcomponents.httpcore.version}</version>
-           </dependency>
+            <dependency>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpclient</artifactId>
+                <version>${apache.httpcomponents.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpcore</artifactId>
+                <version>${apache.httpcomponents.httpcore.version}</version>
+            </dependency>
             <dependency>
                 <groupId>org.apache.httpcomponents</groupId>
                 <artifactId>httpmime</artifactId>
@@ -885,7 +887,8 @@
                 <groupId>org.keycloak</groupId>
                 <artifactId>keycloak-wf9-server-subsystem</artifactId>
                 <version>${project.version}</version>
-            </dependency>            <dependency>
+            </dependency>            
+            <dependency>
                 <groupId>org.keycloak</groupId>
                 <artifactId>keycloak-subsystem</artifactId>
                 <version>${project.version}</version>
@@ -1131,12 +1134,6 @@
             </dependency>
             <dependency>
                 <groupId>org.keycloak</groupId>
-                <artifactId>keycloak-server-overlay</artifactId>
-                <version>${project.version}</version>
-                <type>zip</type>
-            </dependency>
-            <dependency>
-                <groupId>org.keycloak</groupId>
                 <artifactId>keycloak-wf8-adapter-dist</artifactId>
                 <version>${project.version}</version>
                 <type>zip</type>
@@ -1162,8 +1159,8 @@
             <dependency>
                 <groupId>org.keycloak</groupId>
                 <artifactId>keycloak-server-feature-pack</artifactId>
-                    <version>${project.version}</version>
-                    <type>zip</type>
+                <version>${project.version}</version>
+                <type>zip</type>
             </dependency>
             <dependency>
                 <groupId>org.keycloak</groupId>
@@ -1288,7 +1285,32 @@
                     <groupId>org.wildfly.build</groupId>
                     <artifactId>wildfly-server-provisioning-maven-plugin</artifactId>
                     <version>${wildfly.build-tools.version}</version>
-                </plugin>                 
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-enforcer-plugin</artifactId>
+                    <version>${enforcer.plugin.version}</version>
+                    <executions>
+                        <execution>
+                            <id>enforce-maven</id>
+                            <goals>
+                                <goal>enforce</goal>
+                            </goals>
+                            <configuration>
+                                <rules>
+                                    <requireMavenVersion>
+                                        <version>3.1.1</version>
+                                    </requireMavenVersion>
+                                </rules>    
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>maven-bundle-plugin</artifactId>
+                    <version>${osgi.bundle.plugin.version}</version>
+                </plugin>
             </plugins>
         </pluginManagement>
     </build>