keycloak-uncached

Merge pull request #2646 from tkyjovsk/performance-tests Added

4/19/2016 3:30:26 PM

Changes

Details

diff --git a/testsuite/integration-arquillian/pom.xml b/testsuite/integration-arquillian/pom.xml
index cf8209e..5266731 100644
--- a/testsuite/integration-arquillian/pom.xml
+++ b/testsuite/integration-arquillian/pom.xml
@@ -78,6 +78,11 @@
                 <artifactId>wildfly-arquillian-container-managed</artifactId>
                 <version>${arquillian-wildfly-container.version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.wildfly</groupId>
+                <artifactId>wildfly-arquillian-container-remote</artifactId>
+                <version>${arquillian-wildfly-container.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
     
@@ -100,9 +105,9 @@
     </build>
     
     <modules>
+        <module>test-apps</module>
         <module>servers</module>
         <module>tests</module>
-        <module>test-apps</module>
     </modules>
 
 </project>
diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/common/io.xsl b/testsuite/integration-arquillian/servers/app-server/jboss/common/io.xsl
new file mode 100644
index 0000000..03d518a
--- /dev/null
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/io.xsl
@@ -0,0 +1,40 @@
+<!--
+~ 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.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xalan="http://xml.apache.org/xalan"
+                version="2.0"
+                exclude-result-prefixes="xalan">
+
+    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
+    <xsl:strip-space elements="*"/>
+
+    <xsl:param name="worker.io-threads" select="'16'"/>
+    <xsl:param name="worker.task-max-threads" select="'128'"/>
+    
+    <!--set worker threads-->
+    <xsl:template match="//*[local-name()='worker' and @name='default']">
+        <worker name="default" io-threads="{$worker.io-threads}" task-max-threads="{$worker.task-max-threads}" />
+    </xsl:template>
+
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()" />
+        </xsl:copy>
+    </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/common/mgmt-users.properties b/testsuite/integration-arquillian/servers/app-server/jboss/common/mgmt-users.properties
new file mode 100644
index 0000000..b27edaf
--- /dev/null
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/mgmt-users.properties
@@ -0,0 +1 @@
+admin=c22052286cd5d72239a90fe193737253
diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml
index 30db67f..1f47523 100644
--- a/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml
@@ -124,6 +124,61 @@
                                     </transformationSets>
                                 </configuration>
                             </execution>
+                            <execution>
+                                <id>io-worker-threads</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>transform</goal>
+                                </goals>
+                                <configuration>
+                                    <transformationSets>
+                                        <transformationSet>
+                                            <dir>${app.server.jboss.home}/standalone/configuration</dir>
+                                            <includes>
+                                                <include>standalone.xml</include>
+                                                <include>standalone-ha.xml</include>
+                                            </includes>
+                                            <stylesheet>${common.resources}/io.xsl</stylesheet>
+                                            <outputDir>${app.server.jboss.home}/standalone/configuration</outputDir>
+                                            <parameters>
+                                                <parameter>
+                                                    <name>worker.io-threads</name>
+                                                    <value>${app.server.worker.io-threads}</value>
+                                                </parameter>
+                                                <parameter>
+                                                    <name>worker.task-max-threads</name>
+                                                    <value>${app.server.worker.task-max-threads}</value>
+                                                </parameter>
+                                            </parameters>
+                                        </transformationSet>
+                                    </transformationSets>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    
+                    <plugin>
+                        <artifactId>maven-resources-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>enable-jboss-mgmt-admin</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>copy-resources</goal>
+                                </goals>
+                                <configuration>
+                                    <outputDirectory>${app.server.jboss.home}/standalone/configuration</outputDirectory>
+                                    <resources>
+                                        <resource>
+                                            <directory>${common.resources}</directory>
+                                            <includes>
+                                                <include>mgmt-users.properties</include>
+                                            </includes>
+                                        </resource>
+                                    </resources>
+                                    <overwrite>true</overwrite>
+                                </configuration>
+                            </execution>
                         </executions>
                     </plugin>
 
diff --git a/testsuite/integration-arquillian/servers/app-server/pom.xml b/testsuite/integration-arquillian/servers/app-server/pom.xml
index 9e763fb..17d9a3d 100644
--- a/testsuite/integration-arquillian/servers/app-server/pom.xml
+++ b/testsuite/integration-arquillian/servers/app-server/pom.xml
@@ -31,6 +31,8 @@
 
     <properties>
         <app.server.saml.adapter.supported>false</app.server.saml.adapter.supported>
+        <app.server.worker.io-threads>${jboss.default.worker.io-threads}</app.server.worker.io-threads>
+        <app.server.worker.task-max-threads>${jboss.default.worker.task-max-threads}</app.server.worker.task-max-threads>
     </properties>
 
     <modules>
diff --git a/testsuite/integration-arquillian/servers/auth-server/jboss/common/io.xsl b/testsuite/integration-arquillian/servers/auth-server/jboss/common/io.xsl
new file mode 100644
index 0000000..03d518a
--- /dev/null
+++ b/testsuite/integration-arquillian/servers/auth-server/jboss/common/io.xsl
@@ -0,0 +1,40 @@
+<!--
+~ 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.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xalan="http://xml.apache.org/xalan"
+                version="2.0"
+                exclude-result-prefixes="xalan">
+
+    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
+    <xsl:strip-space elements="*"/>
+
+    <xsl:param name="worker.io-threads" select="'16'"/>
+    <xsl:param name="worker.task-max-threads" select="'128'"/>
+    
+    <!--set worker threads-->
+    <xsl:template match="//*[local-name()='worker' and @name='default']">
+        <worker name="default" io-threads="{$worker.io-threads}" task-max-threads="{$worker.task-max-threads}" />
+    </xsl:template>
+
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()" />
+        </xsl:copy>
+    </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/testsuite/integration-arquillian/servers/auth-server/jboss/common/mgmt-users.properties b/testsuite/integration-arquillian/servers/auth-server/jboss/common/mgmt-users.properties
new file mode 100644
index 0000000..b27edaf
--- /dev/null
+++ b/testsuite/integration-arquillian/servers/auth-server/jboss/common/mgmt-users.properties
@@ -0,0 +1 @@
+admin=c22052286cd5d72239a90fe193737253
diff --git a/testsuite/integration-arquillian/servers/auth-server/jboss/common/mod_cluster.xsl b/testsuite/integration-arquillian/servers/auth-server/jboss/common/mod_cluster.xsl
new file mode 100644
index 0000000..c5d983d
--- /dev/null
+++ b/testsuite/integration-arquillian/servers/auth-server/jboss/common/mod_cluster.xsl
@@ -0,0 +1,37 @@
+<!--
+~ 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.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xalan="http://xml.apache.org/xalan"
+                version="2.0"
+                exclude-result-prefixes="xalan">
+
+    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
+    <xsl:strip-space elements="*"/>
+
+    <!--add socket binding-->
+    <xsl:template match="//*[local-name()='socket-binding-group' and @name='standard-sockets']/*[local-name()='socket-binding' and @name='modcluster']">
+        <socket-binding name="modcluster" interface="private" port="0" multicast-address="${{jboss.default.multicast.address:230.0.0.4}}" multicast-port="23364"/>
+    </xsl:template>
+
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()" />
+        </xsl:copy>
+    </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/testsuite/integration-arquillian/servers/auth-server/jboss/pom.xml b/testsuite/integration-arquillian/servers/auth-server/jboss/pom.xml
index a64313e..fdc4df4 100644
--- a/testsuite/integration-arquillian/servers/auth-server/jboss/pom.xml
+++ b/testsuite/integration-arquillian/servers/auth-server/jboss/pom.xml
@@ -200,9 +200,62 @@
                     <plugin>
                         <groupId>org.codehaus.mojo</groupId>
                         <artifactId>xml-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>io-worker-threads</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>transform</goal>
+                                </goals>
+                                <configuration>
+                                    <transformationSets>
+                                        <transformationSet>
+                                            <dir>${auth.server.home}/standalone/configuration</dir>
+                                            <includes>
+                                                <include>standalone.xml</include>
+                                                <include>standalone-ha.xml</include>
+                                            </includes>
+                                            <stylesheet>${common.resources}/io.xsl</stylesheet>
+                                            <outputDir>${auth.server.home}/standalone/configuration</outputDir>
+                                            <parameters>
+                                                <parameter>
+                                                    <name>worker.io-threads</name>
+                                                    <value>${auth.server.worker.io-threads}</value>
+                                                </parameter>
+                                                <parameter>
+                                                    <name>worker.task-max-threads</name>
+                                                    <value>${auth.server.worker.task-max-threads}</value>
+                                                </parameter>
+                                            </parameters>
+                                        </transformationSet>
+                                    </transformationSets>
+                                </configuration>
+                            </execution>
+                        </executions>
                     </plugin>
                     <plugin>
                         <artifactId>maven-resources-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>enable-jboss-mgmt-admin</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>copy-resources</goal>
+                                </goals>
+                                <configuration>
+                                    <outputDirectory>${auth.server.home}/standalone/configuration</outputDirectory>
+                                    <resources>
+                                        <resource>
+                                            <directory>${common.resources}</directory>
+                                            <includes>
+                                                <include>mgmt-users.properties</include>
+                                            </includes>
+                                        </resource>
+                                    </resources>
+                                    <overwrite>true</overwrite>
+                                </configuration>
+                            </execution>
+                        </executions>
                     </plugin>
                     <plugin>
                         <artifactId>maven-assembly-plugin</artifactId>
@@ -577,6 +630,25 @@
                                         </transformationSets>
                                     </configuration>
                                 </execution>
+                                <execution>
+                                    <id>mod-cluster-configuration</id>
+                                    <phase>process-resources</phase>
+                                    <goals>
+                                        <goal>transform</goal>
+                                    </goals>
+                                    <configuration>
+                                        <transformationSets>
+                                            <transformationSet>
+                                                <dir>${auth.server.home}/standalone/configuration</dir>
+                                                <includes>
+                                                    <include>standalone-ha.xml</include>
+                                                </includes>
+                                                <stylesheet>${common.resources}/mod_cluster.xsl</stylesheet>
+                                                <outputDir>${auth.server.home}/standalone/configuration</outputDir>
+                                            </transformationSet>
+                                        </transformationSets>
+                                    </configuration>
+                                </execution>
                             </executions>
                         </plugin>
                     </plugins>
diff --git a/testsuite/integration-arquillian/servers/auth-server/pom.xml b/testsuite/integration-arquillian/servers/auth-server/pom.xml
index a3328bd..a10cee0 100644
--- a/testsuite/integration-arquillian/servers/auth-server/pom.xml
+++ b/testsuite/integration-arquillian/servers/auth-server/pom.xml
@@ -29,6 +29,11 @@
     <packaging>pom</packaging>
     <name>Auth Server</name>
 
+    <properties>
+        <auth.server.worker.io-threads>${jboss.default.worker.io-threads}</auth.server.worker.io-threads>
+        <auth.server.worker.task-max-threads>${jboss.default.worker.task-max-threads}</auth.server.worker.task-max-threads>
+    </properties>
+
     <modules>
         <module>services</module>
         <module>jboss</module>
diff --git a/testsuite/integration-arquillian/servers/pom.xml b/testsuite/integration-arquillian/servers/pom.xml
index c800f62..288ef46 100644
--- a/testsuite/integration-arquillian/servers/pom.xml
+++ b/testsuite/integration-arquillian/servers/pom.xml
@@ -47,6 +47,8 @@
         <!--<fuse62.version>6.2.0.redhat-133</fuse62.version>-->
         <fuse62.version>6.2.1.redhat-084</fuse62.version>
         
+        <jboss.default.worker.io-threads>16</jboss.default.worker.io-threads>
+        <jboss.default.worker.task-max-threads>128</jboss.default.worker.task-max-threads>
     </properties>
 
     <modules>
diff --git a/testsuite/integration-arquillian/servers/wildfly-balancer/pom.xml b/testsuite/integration-arquillian/servers/wildfly-balancer/pom.xml
index 262299c..a84f20c 100644
--- a/testsuite/integration-arquillian/servers/wildfly-balancer/pom.xml
+++ b/testsuite/integration-arquillian/servers/wildfly-balancer/pom.xml
@@ -31,6 +31,8 @@
     
     <properties>
         <wildfly.balancer.home>${project.build.directory}/unpacked/wildfly-${wildfly.version}</wildfly.balancer.home>
+        <wildfly.balancer.worker.io-threads>${jboss.default.worker.io-threads}</wildfly.balancer.worker.io-threads>
+        <wildfly.balancer.worker.task-max-threads>${jboss.default.worker.task-max-threads}</wildfly.balancer.worker.task-max-threads>
     </properties>
     
     <build>
@@ -71,6 +73,35 @@
                 <artifactId>xml-maven-plugin</artifactId>
                 <executions>
                     <execution>
+                        <id>io-worker-threads</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>transform</goal>
+                        </goals>
+                        <configuration>
+                            <transformationSets>
+                                <transformationSet>
+                                    <dir>${wildfly.balancer.home}/standalone/configuration</dir>
+                                    <includes>
+                                        <include>standalone.xml</include>
+                                    </includes>
+                                    <stylesheet>src/main/xslt/io.xsl</stylesheet>
+                                    <outputDir>${wildfly.balancer.home}/standalone/configuration</outputDir>
+                                    <parameters>
+                                        <parameter>
+                                            <name>worker.io-threads</name>
+                                            <value>${wildfly.balancer.worker.io-threads}</value>
+                                        </parameter>
+                                        <parameter>
+                                            <name>worker.task-max-threads</name>
+                                            <value>${wildfly.balancer.worker.task-max-threads}</value>
+                                        </parameter>
+                                    </parameters>
+                                </transformationSet>
+                            </transformationSets>
+                        </configuration>
+                    </execution>
+                    <execution>
                         <id>configure-mod-cluster</id>
                         <phase>process-resources</phase>
                         <goals>
diff --git a/testsuite/integration-arquillian/servers/wildfly-balancer/src/main/xslt/io.xsl b/testsuite/integration-arquillian/servers/wildfly-balancer/src/main/xslt/io.xsl
new file mode 100644
index 0000000..03d518a
--- /dev/null
+++ b/testsuite/integration-arquillian/servers/wildfly-balancer/src/main/xslt/io.xsl
@@ -0,0 +1,40 @@
+<!--
+~ 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.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xalan="http://xml.apache.org/xalan"
+                version="2.0"
+                exclude-result-prefixes="xalan">
+
+    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
+    <xsl:strip-space elements="*"/>
+
+    <xsl:param name="worker.io-threads" select="'16'"/>
+    <xsl:param name="worker.task-max-threads" select="'128'"/>
+    
+    <!--set worker threads-->
+    <xsl:template match="//*[local-name()='worker' and @name='default']">
+        <worker name="default" io-threads="{$worker.io-threads}" task-max-threads="{$worker.task-max-threads}" />
+    </xsl:template>
+
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()" />
+        </xsl:copy>
+    </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/testsuite/integration-arquillian/servers/wildfly-balancer/src/main/xslt/mod_cluster.xsl b/testsuite/integration-arquillian/servers/wildfly-balancer/src/main/xslt/mod_cluster.xsl
index 2079fc9..1885354 100644
--- a/testsuite/integration-arquillian/servers/wildfly-balancer/src/main/xslt/mod_cluster.xsl
+++ b/testsuite/integration-arquillian/servers/wildfly-balancer/src/main/xslt/mod_cluster.xsl
@@ -17,18 +17,14 @@
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:xalan="http://xml.apache.org/xalan"
-                xmlns:s="urn:jboss:domain:4.0"
-                xmlns:u="urn:jboss:domain:undertow:3.0"
                 version="2.0"
-                exclude-result-prefixes="xalan j u">
-
-    <xsl:param name="config"/>
+                exclude-result-prefixes="xalan">
 
     <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
     <xsl:strip-space elements="*"/>
 
     <!--enable mod_cluster extension-->
-    <xsl:template match="//s:extensions">
+    <xsl:template match="//*[local-name()='extensions']">
         <xsl:copy>
             <xsl:apply-templates select="node()|@*"/>
             <extension module="org.jboss.as.modcluster"/>
@@ -36,7 +32,7 @@
     </xsl:template>
 
     <!--add filter-ref-->
-    <xsl:template match="//u:server[@name='default-server']/u:host[@name='default-host']">
+    <xsl:template match="//*[local-name()='server' and @name='default-server']/*[local-name()='host' and @name='default-host']">
         <xsl:copy>
             <xsl:apply-templates select="node()|@*"/>
             <filter-ref name="modcluster"/>
@@ -44,23 +40,34 @@
     </xsl:template>
     
     <!--add filter-->
-    <xsl:template match="//u:filters">
+    <xsl:template match="//*[local-name()='filters']">
         <xsl:copy>
             <xsl:apply-templates select="node()|@*"/>
             <mod-cluster 
                 name="modcluster" 
                 advertise-socket-binding="modcluster" 
+                advertise-frequency="${{modcluster.advertise-frequency:2000}}"
                 management-socket-binding="http"
                 enable-http2="true"
             />
         </xsl:copy>
     </xsl:template>
+    
+    <!--add private interface -->
+    <xsl:template match="/*[local-name()='server']/*[local-name()='interfaces']">
+        <xsl:copy>
+            <xsl:apply-templates select="node()|@*"/>
+            <interface name="private">
+                <inet-address value="${{jboss.bind.address.private:127.0.0.1}}"/>
+            </interface>
+        </xsl:copy>
+    </xsl:template>
 
     <!--add socket binding-->
-    <xsl:template match="//s:socket-binding-group[@name='standard-sockets']">
+    <xsl:template match="//*[local-name()='socket-binding-group' and @name='standard-sockets']">
         <xsl:copy>
             <xsl:apply-templates select="node()|@*"/>
-            <socket-binding name="modcluster" port="${{modcluster.port:23364}}" multicast-address="${{modcluster.multicast-address:224.0.1.105}}"/>
+            <socket-binding name="modcluster" interface="private" port="23364" multicast-address="${{jboss.default.multicast.address:230.0.0.4}}"/>
         </xsl:copy>
     </xsl:template>
 
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 ea64fe2..75d5510 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
@@ -51,13 +51,15 @@ public class AppServerTestEnricher {
     }
 
     public static String getAppServerContextRoot(int clusterPortOffset) {
+        String host = System.getProperty("app.server.host", "localhost");
         int httpPort = Integer.parseInt(System.getProperty("app.server.http.port")); // property must be set
         int httpsPort = Integer.parseInt(System.getProperty("app.server.https.port")); // property must be set
+
         boolean sslRequired = Boolean.parseBoolean(System.getProperty("app.server.ssl.required"));
+        String scheme = sslRequired ? "https" : "http";
+        int port = sslRequired ? httpsPort : httpPort;
 
-        return sslRequired
-                ? "https://localhost:" + (httpsPort + clusterPortOffset)
-                : "http://localhost:" + (httpPort + clusterPortOffset);
+        return String.format("%s://%s:%s", scheme, host, port + clusterPortOffset);
     }
 
     public void updateTestContextWithAppServerInfo(@Observes(precedence = 1) BeforeClass event) {
diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java
index a7238c3..841f903 100644
--- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java
+++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java
@@ -81,13 +81,15 @@ public class AuthServerTestEnricher {
     }
 
     public static String getAuthServerContextRoot(int clusterPortOffset) {
+        String host = System.getProperty("auth.server.host", "localhost");
         int httpPort = Integer.parseInt(System.getProperty("auth.server.http.port")); // property must be set
         int httpsPort = Integer.parseInt(System.getProperty("auth.server.https.port")); // property must be set
+
         boolean sslRequired = Boolean.parseBoolean(System.getProperty("auth.server.ssl.required"));
+        String scheme = sslRequired ? "https" : "http";
+        int port = sslRequired ? httpsPort : httpPort;
 
-        return sslRequired
-                ? "https://localhost:" + (httpsPort + clusterPortOffset)
-                : "http://localhost:" + (httpPort + clusterPortOffset);
+        return String.format("%s://%s:%s", scheme, host, port + clusterPortOffset);
     }
 
     public void initializeSuiteContext(@Observes(precedence = 2) BeforeSuite event) {
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml
index f1188a1..bb603be 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml
@@ -135,6 +135,18 @@
         </configuration>
     </container>
     
+    <container qualifier="auth-server-remote" mode="suite" >
+        <configuration>
+            <property name="enabled">${auth.server.remote}</property>
+            <property name="adapterImplClass">org.jboss.as.arquillian.container.remote.RemoteDeployableContainer</property>
+
+            <property name="managementAddress">${auth.server.host}</property>
+            <property name="managementPort">${auth.server.management.port}</property>
+            <property name="username">admin</property>
+            <property name="password">admin</property>
+        </configuration>
+    </container>
+    
     <!-- PREVIOUS VERSIONS OF KEYCLOAK FOR MIGRATION TESTS -->
     
     <container qualifier="auth-server-jboss-kc16" mode="manual" >
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/pom.xml
index 42780cf..5b2a9cd 100644
--- a/testsuite/integration-arquillian/tests/other/adapters/jboss/pom.xml
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/pom.xml
@@ -36,6 +36,7 @@
     <properties>
         <common.resources>${project.parent.basedir}/common</common.resources>
         <adapter.libs.home>${app.server.home}/modules/system/add-ons/keycloak</adapter.libs.home>
+        <app.server.type>managed</app.server.type>
     </properties>
 
     <build>
@@ -85,7 +86,8 @@
             <dependencies>
                 <dependency>
                     <groupId>org.wildfly</groupId>
-                    <artifactId>wildfly-arquillian-container-managed</artifactId>
+                    <artifactId>wildfly-arquillian-container-${app.server.type}</artifactId>
+                    <version>${arquillian-wildfly-container.version}</version>
                 </dependency>                
             </dependencies>            
         </profile>
@@ -135,4 +137,4 @@
         
     </profiles>
     
-</project>
\ No newline at end of file
+</project>
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/pom.xml
new file mode 100644
index 0000000..03ee852
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/pom.xml
@@ -0,0 +1,169 @@
+<?xml version="1.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.
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.keycloak.testsuite</groupId>
+        <artifactId>integration-arquillian-tests-adapters-jboss</artifactId>
+        <version>2.0.0.CR1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>integration-arquillian-tests-adapters-remote</artifactId>
+
+    <name>Adapter Tests - JBoss - Remote</name>
+    
+    <properties>
+        <app.server>remote</app.server>
+        <app.server.type>remote</app.server.type>
+        <app.server.skip.unpack>true</app.server.skip.unpack>
+        <app.server.arquillian.xsl>src/test/resources/xslt/arquillian.xsl</app.server.arquillian.xsl>
+        
+        <exclude.htmlunit>**/performance/htmlunit/**/*Test.java</exclude.htmlunit>
+        <exclude.httpclient>**/performance/httpclient/**/*Test.java</exclude.httpclient>
+        
+        <logging.loginlogout>INFO</logging.loginlogout>
+    </properties>
+    
+    <dependencies>
+        <dependency> 
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId> 
+            <version>2.4</version> 
+        </dependency> 
+    </dependencies>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-app-profile-jee-quickstart</id>
+                        <phase>generate-test-resources</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.keycloak.quickstart</groupId>
+                                    <artifactId>keycloak-quickstart-app-profile-jee</artifactId>        
+                                    <version>0.5-SNAPSHOT</version>
+                                    <type>war</type>
+                                </artifactItem>
+                            </artifactItems>
+                            <outputDirectory>${examples.home}</outputDirectory>
+                            <overWriteIfNewer>true</overWriteIfNewer>
+                        </configuration>
+                    </execution>                            
+                </executions>
+            </plugin>            
+            <plugin>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>enforce</goal>
+                        </goals>
+                        <configuration>
+                            <rules>
+                                <requireActiveProfile>
+                                    <profiles>auth-server-remote</profiles>
+                                    <!--
+                                        NOTE: Running adapter test against remote app-server 
+                                        also requires remote mode for the auth-server.
+                                        
+                                        There are problems when `wildfly-arquillian-container-remote` is on classpath 
+                                        together with `wildfly-arquillian-container-managed`.
+                                    --> 
+                                </requireActiveProfile>
+                            </rules>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>${exclude.htmlunit}</exclude>
+                        <exclude>${exclude.httpclient}</exclude>
+                    </excludes>
+                    <systemPropertyVariables>
+                        <logging.loginlogout>${logging.loginlogout}</logging.loginlogout>
+                    </systemPropertyVariables>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    
+    <profiles>
+        <profile>
+            <id>auth-server-remote</id>
+            <!--dummy profile for enforcer-->
+        </profile>
+        <profile>
+            <id>no-offset</id>
+            <properties>
+                <app.server.port.offset>0</app.server.port.offset>
+                <app.server.http.port>8080</app.server.http.port>
+                <app.server.https.port>8443</app.server.https.port>
+                <app.server.management.port>9990</app.server.management.port>
+                <app.server.management.port.jmx>9999</app.server.management.port.jmx>
+            </properties>
+        </profile>
+        <profile>
+            <id>htmlunit</id>
+            <properties>
+                <exclude.htmlunit>-</exclude.htmlunit>
+            </properties>
+        </profile>
+        <profile>
+            <id>httpclient</id>
+            <properties>
+                <exclude.httpclient>-</exclude.httpclient>
+            </properties>
+        </profile>
+        <profile>
+            <id>debug</id>
+            <properties>
+                <logging.loginlogout>TRACE</logging.loginlogout>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <systemPropertyVariables>
+                                <warmup.load>1</warmup.load>
+                                <warmup.duration>10</warmup.duration>
+                                <max.iterations>0</max.iterations>
+                                <sleep.between.repeats>30</sleep.between.repeats>
+                            </systemPropertyVariables>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+    
+</project>
\ No newline at end of file
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/README.md b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/README.md
new file mode 100644
index 0000000..a9bd7fd
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/README.md
@@ -0,0 +1,2 @@
+# 
+
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/main/java/org/keycloak/testsuite/performance/page/AppProfileJEE.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/main/java/org/keycloak/testsuite/performance/page/AppProfileJEE.java
new file mode 100644
index 0000000..799c8a9
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/main/java/org/keycloak/testsuite/performance/page/AppProfileJEE.java
@@ -0,0 +1,28 @@
+package org.keycloak.testsuite.performance.page;
+
+import java.net.URL;
+import org.jboss.arquillian.container.test.api.OperateOnDeployment;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.keycloak.testsuite.page.AbstractPageWithInjectedUrl;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public class AppProfileJEE extends AbstractPageWithInjectedUrl {
+    
+    public static final String DEPLOYMENT_NAME = "app-profile-jee";
+
+    @ArquillianResource
+    @OperateOnDeployment(DEPLOYMENT_NAME)
+    private URL url;
+
+    @Override
+    public URL getInjectedUrl() {
+        //EAP6 URL fix
+        URL fixedUrl = createInjectedURL(DEPLOYMENT_NAME);
+        return fixedUrl != null ? fixedUrl : url;
+    }
+    
+    
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/htmlunit/HtmlUnitLoginLogoutPerfTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/htmlunit/HtmlUnitLoginLogoutPerfTest.java
new file mode 100644
index 0000000..b279098
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/htmlunit/HtmlUnitLoginLogoutPerfTest.java
@@ -0,0 +1,162 @@
+package org.keycloak.testsuite.performance.htmlunit;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.graphene.page.Page;
+import org.jboss.logging.Logger;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Before;
+import org.keycloak.representations.idm.RealmRepresentation;
+import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
+import org.keycloak.testsuite.performance.page.AppProfileJEE;
+import org.openqa.selenium.By;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.AVERAGE_LOGIN_TIME_LIMIT;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.AVERAGE_LOGOUT_TIME_LIMIT;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.LOGIN_REQUEST_TIME;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.LOGOUT_REQUEST_TIME;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.ACCESS_REQUEST_TIME;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.LOGIN_VERIFY_REQUEST_TIME;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.LOGOUT_VERIFY_REQUEST_TIME;
+import org.keycloak.testsuite.performance.PerformanceTest;
+import static org.junit.Assert.assertTrue;
+import org.keycloak.testsuite.performance.OperationTimeoutException;
+import static org.keycloak.testsuite.util.IOUtil.loadRealm;
+import org.openqa.selenium.TimeoutException;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+@AppServerContainer("app-server-remote")
+public class HtmlUnitLoginLogoutPerfTest extends HtmlUnitPerformanceTest {
+
+    private static final Logger LOG = Logger.getLogger(HtmlUnitLoginLogoutPerfTest.class);
+
+    private static final String EXAMPLES = "Examples";
+
+    private String unsecuredUrl;
+    private String securedUrl;
+    private String username;
+    private String password;
+    private String loginPageUrl;
+
+    @Page
+    protected AppProfileJEE appProfileJEEPage;
+
+    protected static WebArchive warDeployment(String filename) throws IOException {
+        return ShrinkWrap.createFromZipFile(WebArchive.class,
+                new File(EXAMPLES_HOME + "/" + filename + ".war"))
+                .addAsWebInfResource(jbossDeploymentStructure, JBOSS_DEPLOYMENT_STRUCTURE_XML);
+    }
+
+    @Deployment(name = AppProfileJEE.DEPLOYMENT_NAME)
+    private static WebArchive appProfileJEE() throws IOException {
+        return warDeployment("keycloak-quickstart-app-profile-jee-0.5-SNAPSHOT");
+    }
+
+    @Override
+    public void setDefaultPageUriParameters() {
+        super.setDefaultPageUriParameters();
+        testRealmPage.setAuthRealm(EXAMPLES);
+    }
+
+    @Override
+    public void addAdapterTestRealms(List<RealmRepresentation> testRealms) {
+        testRealms.add(loadRealm("/examples-realm.json"));
+    }
+
+    @Before
+    public void beforeLoginLogoutTest() {
+        unsecuredUrl = appProfileJEEPage + "/index.jsp";
+        securedUrl = appProfileJEEPage + "/profile.jsp";
+        username = "secure-user";
+        password = "password";
+        loginPageUrl = testRealmLoginPage.toString();
+    }
+
+    @Override
+    public PerformanceTest.Runnable newRunnable() {
+        return new Runnable();
+    }
+
+    @Override
+    protected boolean isLatestResultsWithinLimits() {
+        return getLatestResults().get(LOGIN_REQUEST_TIME).getAverage() < AVERAGE_LOGIN_TIME_LIMIT
+                && getLatestResults().get(LOGOUT_REQUEST_TIME).getAverage() < AVERAGE_LOGOUT_TIME_LIMIT;
+    }
+
+    public class Runnable extends HtmlUnitPerformanceTest.Runnable {
+
+        @Override
+        public void performanceScenario() throws Exception {
+            LOG.debug(String.format("Starting login-logout scenario #%s", getRepeatCounter()));
+            driver.manage().deleteAllCookies();
+
+            // ACCESS
+            LOG.trace(String.format("Accessing secured URL: %s", securedUrl));
+            try {
+                timer.reset();
+                driver.get(securedUrl);
+                assertTrue(driver.getCurrentUrl().startsWith(loginPageUrl));
+            } catch (TimeoutException ex) {
+                throw new OperationTimeoutException(ACCESS_REQUEST_TIME, ex);
+            }
+            metrics.addValue(ACCESS_REQUEST_TIME, timer.getElapsedTime());
+
+            // LOGIN
+            LOG.trace("Logging in");
+            try {
+                driver.findElement(By.id("username")).clear();
+                driver.findElement(By.id("username")).sendKeys(username);
+                driver.findElement(By.id("password")).clear();
+                driver.findElement(By.id("password")).sendKeys(password);
+                timer.reset();
+                driver.findElement(By.name("login")).click();
+                assertTrue(driver.getCurrentUrl().equals(securedUrl));
+            } catch (TimeoutException ex) {
+                throw new OperationTimeoutException(LOGIN_REQUEST_TIME, ex);
+            }
+            metrics.addValue(LOGIN_REQUEST_TIME, timer.getElapsedTime());
+
+            // VERIFY LOGIN
+            LOG.trace("Verifying login");
+            try {
+                timer.reset();
+                driver.get(securedUrl);
+                assertTrue(driver.getCurrentUrl().equals(securedUrl));
+            } catch (TimeoutException ex) {
+                throw new OperationTimeoutException(LOGIN_VERIFY_REQUEST_TIME, ex);
+            }
+            metrics.addValue(LOGIN_VERIFY_REQUEST_TIME, timer.getElapsedTime());
+
+            // LOGOUT
+            LOG.trace("Logging out");
+            try {
+                timer.reset();
+                driver.findElement(By.xpath("//button[text()='Logout']")).click();
+                assertTrue(driver.getCurrentUrl().startsWith(unsecuredUrl));
+            } catch (TimeoutException ex) {
+                throw new OperationTimeoutException(LOGOUT_REQUEST_TIME, ex);
+            }
+            metrics.addValue(LOGOUT_REQUEST_TIME, timer.getElapsedTime());
+
+            // VERIFY LOGOUT
+            LOG.trace("Verifying logout");
+            try {
+                timer.reset();
+                driver.get(securedUrl);
+                assertTrue(driver.getCurrentUrl().startsWith(loginPageUrl));
+            } catch (TimeoutException ex) {
+                throw new OperationTimeoutException(LOGOUT_VERIFY_REQUEST_TIME, ex);
+            }
+            metrics.addValue(LOGOUT_VERIFY_REQUEST_TIME, timer.getElapsedTime());
+
+            LOG.trace("Logged out");
+        }
+
+    }
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/htmlunit/HtmlUnitPerformanceTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/htmlunit/HtmlUnitPerformanceTest.java
new file mode 100644
index 0000000..ae9dd50
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/htmlunit/HtmlUnitPerformanceTest.java
@@ -0,0 +1,36 @@
+package org.keycloak.testsuite.performance.htmlunit;
+
+import com.gargoylesoftware.htmlunit.WebClient;
+import org.keycloak.testsuite.performance.PerformanceTest;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public abstract class HtmlUnitPerformanceTest extends PerformanceTest {
+
+    public abstract class Runnable extends PerformanceTest.Runnable {
+
+        protected HtmlUnitDriver driver;
+
+        public Runnable() {
+            driver = new HtmlUnitDriver(true, false);
+        }
+
+        public final class HtmlUnitDriver extends org.openqa.selenium.htmlunit.HtmlUnitDriver {
+
+            public HtmlUnitDriver(boolean javaScriptEnabled, boolean cssEnabled) {
+                getWebClient().getOptions().setJavaScriptEnabled(javaScriptEnabled);
+                getWebClient().getOptions().setCssEnabled(cssEnabled);
+            }
+
+            @Override
+            public WebClient getWebClient() {
+                return super.getWebClient();
+            }
+
+        }
+
+    }
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/httpclient/HttpClientLoginLogoutPerfTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/httpclient/HttpClientLoginLogoutPerfTest.java
new file mode 100644
index 0000000..2a6e301
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/httpclient/HttpClientLoginLogoutPerfTest.java
@@ -0,0 +1,236 @@
+package org.keycloak.testsuite.performance.httpclient;
+
+import java.io.File;
+import java.io.IOException;
+import static java.net.HttpURLConnection.HTTP_OK;
+import java.net.SocketException;
+import java.net.SocketTimeoutException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.apache.http.Header;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.graphene.page.Page;
+import org.jboss.logging.Logger;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Before;
+import org.keycloak.representations.idm.RealmRepresentation;
+import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
+import org.keycloak.testsuite.performance.page.AppProfileJEE;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.AVERAGE_LOGIN_TIME_LIMIT;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.AVERAGE_LOGOUT_TIME_LIMIT;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.LOGIN_REQUEST_TIME;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.LOGOUT_REQUEST_TIME;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.ACCESS_REQUEST_TIME;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.LOGIN_VERIFY_REQUEST_TIME;
+import static org.keycloak.testsuite.performance.LoginLogoutParameters.LOGOUT_VERIFY_REQUEST_TIME;
+import org.keycloak.testsuite.performance.PerformanceTest;
+import org.keycloak.testsuite.performance.OperationTimeoutException;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.keycloak.testsuite.util.IOUtil.loadRealm;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+@AppServerContainer("app-server-remote")
+public class HttpClientLoginLogoutPerfTest extends HttpClientPerformanceTest {
+
+    private static final Logger LOG = Logger.getLogger(HttpClientLoginLogoutPerfTest.class);
+
+    private static final String EXAMPLES = "Examples";
+
+    private String securedUrl;
+    private String logoutUrl;
+    private String username;
+    private String password;
+    private String loginPageUrl;
+
+    @Page
+    protected AppProfileJEE appProfileJEEPage;
+
+    protected static WebArchive warDeployment(String filename) throws IOException {
+        return ShrinkWrap.createFromZipFile(WebArchive.class,
+                new File(EXAMPLES_HOME + "/" + filename + ".war"))
+                .addAsWebInfResource(jbossDeploymentStructure, JBOSS_DEPLOYMENT_STRUCTURE_XML);
+    }
+
+    @Deployment(name = AppProfileJEE.DEPLOYMENT_NAME)
+    private static WebArchive appProfileJEE() throws IOException {
+        return warDeployment("keycloak-quickstart-app-profile-jee-0.5-SNAPSHOT");
+    }
+
+    @Override
+    public void setDefaultPageUriParameters() {
+        super.setDefaultPageUriParameters();
+        testRealmPage.setAuthRealm(EXAMPLES);
+    }
+
+    @Override
+    public void addAdapterTestRealms(List<RealmRepresentation> testRealms) {
+        testRealms.add(loadRealm("/examples-realm.json"));
+    }
+
+    @Before
+    public void beforeLoginLogoutTest() {
+        securedUrl = appProfileJEEPage + "/profile.jsp";
+        logoutUrl = appProfileJEEPage + "/index.jsp?logout=true";
+        username = "secure-user";
+        password = "password";
+        loginPageUrl = testRealmLoginPage.toString();
+    }
+
+    @Override
+    public PerformanceTest.Runnable newRunnable() {
+        return new Runnable();
+    }
+
+    @Override
+    protected boolean isLatestResultsWithinLimits() {
+        return isLatestTimeoutsWithinLimits()
+                && getLatestResults().get(LOGIN_REQUEST_TIME).getAverage() < AVERAGE_LOGIN_TIME_LIMIT
+                && getLatestResults().get(LOGOUT_REQUEST_TIME).getAverage() < AVERAGE_LOGOUT_TIME_LIMIT;
+    }
+
+    public class Runnable extends HttpClientPerformanceTest.Runnable {
+
+        @Override
+        public void performanceScenario() throws IOException, OperationTimeoutException {
+            LOG.debug(String.format("Starting login-logout scenario #%s", getRepeatCounter()));
+            context.getCookieStore().clear();
+
+            // ACCESS
+            String pageContent;
+            final HttpGet getSecuredPageRequest = new HttpGet(securedUrl);
+            LOG.trace(String.format("Accessing secured URL: %s", getSecuredPageRequest));
+            LOG.trace(getSecuredPageRequest);
+            timer.reset();
+            try (CloseableHttpResponse r = client.execute(getSecuredPageRequest, context)) {
+                assertEquals(HTTP_OK, r.getStatusLine().getStatusCode());
+                logRedirects();
+                assertEquals(1, context.getRedirectLocations().size());
+                assertTrue(getLastRedirect().toASCIIString().startsWith(loginPageUrl));
+                pageContent = EntityUtils.toString(r.getEntity());
+            } catch (SocketException ex) {
+                throw new OperationTimeoutException(ACCESS_REQUEST_TIME, ex);
+            } catch (SocketTimeoutException ex) {
+                throw new OperationTimeoutException(ACCESS_REQUEST_TIME, ex.bytesTransferred, ex);
+            }
+            metrics.addValue(ACCESS_REQUEST_TIME, timer.getElapsedTime());
+
+            // LOGIN
+            final HttpPost loginRequest = new HttpPost(getLoginUrlFromPage(pageContent));
+            List<NameValuePair> credentials = new ArrayList<>();
+            credentials.add(new BasicNameValuePair("username", username));
+            credentials.add(new BasicNameValuePair("password", password));
+            loginRequest.setEntity(new UrlEncodedFormEntity(credentials));
+
+            LOG.trace("Logging in");
+            LOG.trace(loginRequest);
+            timer.reset();
+            try (CloseableHttpResponse r = client.execute(loginRequest, context)) {
+                assertEquals(HTTP_OK, r.getStatusLine().getStatusCode());
+                logRedirects();
+                assertEquals(2, context.getRedirectLocations().size());
+                assertTrue(getLastRedirect().toASCIIString().equals(securedUrl));
+            } catch (SocketException ex) {
+                throw new OperationTimeoutException(LOGIN_REQUEST_TIME, ex);
+            } catch (SocketTimeoutException ex) {
+                throw new OperationTimeoutException(LOGIN_REQUEST_TIME, ex.bytesTransferred, ex);
+            }
+            metrics.addValue(LOGIN_REQUEST_TIME, timer.getElapsedTime());
+
+            // VERIFY LOGIN
+            LOG.trace("Verifying login");
+            LOG.trace(getSecuredPageRequest);
+            timer.reset();
+            try (CloseableHttpResponse r = client.execute(getSecuredPageRequest, context)) {
+                assertEquals(HTTP_OK, r.getStatusLine().getStatusCode());
+                logRedirects();
+                assertEquals(0, context.getRedirectLocations().size());
+            } catch (SocketException ex) {
+                throw new OperationTimeoutException(LOGIN_VERIFY_REQUEST_TIME, ex);
+            } catch (SocketTimeoutException ex) {
+                throw new OperationTimeoutException(LOGIN_VERIFY_REQUEST_TIME, ex.bytesTransferred, ex);
+            }
+            metrics.addValue(LOGIN_VERIFY_REQUEST_TIME, timer.getElapsedTime());
+
+            // LOGOUT
+            final HttpGet logoutRequest = new HttpGet(logoutUrl);
+            LOG.trace("Logging out");
+            LOG.trace(logoutRequest);
+            timer.reset();
+            try (CloseableHttpResponse r = client.execute(logoutRequest, context)) {
+                assertEquals(HTTP_OK, r.getStatusLine().getStatusCode());
+                logRedirects();
+                assertEquals(0, context.getRedirectLocations().size());
+            } catch (SocketException ex) {
+                throw new OperationTimeoutException(LOGOUT_REQUEST_TIME, ex);
+            } catch (SocketTimeoutException ex) {
+                throw new OperationTimeoutException(LOGOUT_REQUEST_TIME, ex.bytesTransferred, ex);
+            }
+            metrics.addValue(LOGOUT_REQUEST_TIME, timer.getElapsedTime());
+
+            // VERIFY LOGOUT
+            LOG.trace("Verifying logout");
+            LOG.trace(getSecuredPageRequest);
+            timer.reset();
+            try (CloseableHttpResponse r = client.execute(getSecuredPageRequest, context)) {
+                assertEquals(HTTP_OK, r.getStatusLine().getStatusCode());
+                logRedirects();
+                assertEquals(1, context.getRedirectLocations().size());
+                assertTrue(getLastRedirect().toASCIIString().startsWith(loginPageUrl));
+            } catch (SocketException ex) {
+                throw new OperationTimeoutException(LOGOUT_VERIFY_REQUEST_TIME, ex);
+            } catch (SocketTimeoutException ex) {
+                throw new OperationTimeoutException(LOGOUT_VERIFY_REQUEST_TIME, ex.bytesTransferred, ex);
+            }
+            metrics.addValue(LOGOUT_VERIFY_REQUEST_TIME, timer.getElapsedTime());
+
+            LOG.trace("Logged out");
+
+        }
+
+        private URI getLastRedirect() {
+            return context.getRedirectLocations().get(context.getRedirectLocations().size() - 1);
+        }
+
+        private void logRedirects() {
+            int i = 0;
+            for (URI uri : context.getRedirectLocations()) {
+                LOG.trace(String.format("--> REDIRECT %s: %s", ++i, uri.toASCIIString()));
+            }
+        }
+
+        public String getRedirectLocation(CloseableHttpResponse r) {
+            Header locationHeader = r.getFirstHeader("Location");
+            assertNotNull(locationHeader);
+            return locationHeader.getValue();
+        }
+
+        private String getLoginUrlFromPage(String content) {
+            String formActionRegex = "<form[^>]+action\\s*=\\s*['\"]([^'\"]+)['\"][^>]*>";
+            Pattern p = Pattern.compile(formActionRegex);
+            Matcher m = p.matcher(content);
+            if (m.find()) {
+                return m.group(1);
+            } else {
+                throw new IllegalStateException("Login url counldn't be parsed form page.");
+            }
+        }
+
+    }
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/httpclient/HttpClientPerformanceTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/httpclient/HttpClientPerformanceTest.java
new file mode 100644
index 0000000..d9aafaf
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/httpclient/HttpClientPerformanceTest.java
@@ -0,0 +1,112 @@
+package org.keycloak.testsuite.performance.httpclient;
+
+import java.io.IOException;
+import org.apache.http.client.config.CookieSpecs;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.HttpDelete;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpHead;
+import org.apache.http.client.methods.HttpOptions;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.protocol.HttpClientContext;
+import org.apache.http.config.SocketConfig;
+import org.apache.http.impl.client.BasicCookieStore;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.DefaultRedirectStrategy;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.junit.After;
+import org.junit.Before;
+import org.keycloak.testsuite.performance.PerformanceTest;
+import static org.keycloak.testsuite.performance.PerformanceTest.MAX_THREADS;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public abstract class HttpClientPerformanceTest extends PerformanceTest {
+
+    protected CloseableHttpClient client;
+
+    public static final Integer HTTP_CLIENT_SOCKET_TIMEOUT = Integer.parseInt(System.getProperty("httpclient.socket.timeout", "10000"));
+    public static final Integer HTTP_CLIENT_CONNECT_TIMEOUT = Integer.parseInt(System.getProperty("httpclient.connect.timeout", "10000"));
+    public static final Integer HTTP_CLIENT_CONNECTION_REQUEST_TIMEOUT = Integer.parseInt(System.getProperty("httpclient.connection-request.timeout", "10000"));
+
+    @Before
+    public void initializeClient() {
+        PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager();
+        connectionManager.setMaxTotal(Math.max(1, MAX_THREADS / 10));
+        connectionManager.setDefaultMaxPerRoute(connectionManager.getMaxTotal());
+        connectionManager.setValidateAfterInactivity(10000);
+        connectionManager.setDefaultSocketConfig(getDefaultSocketConfig());
+
+        client = HttpClients.custom()
+                .setConnectionManager(connectionManager)
+                .setDefaultCookieStore(new BasicCookieStore())
+                .setDefaultRequestConfig(getDefaultRequestConfig())
+                .setRedirectStrategy(new CustomRedirectStrategy())
+                .build();
+    }
+
+    protected SocketConfig getDefaultSocketConfig() {
+        return SocketConfig.copy(SocketConfig.DEFAULT)
+                .setSoTimeout(HTTP_CLIENT_SOCKET_TIMEOUT).build();
+    }
+
+    protected RequestConfig getDefaultRequestConfig() {
+        return RequestConfig.custom()
+                .setSocketTimeout(HTTP_CLIENT_SOCKET_TIMEOUT)
+                .setConnectTimeout(HTTP_CLIENT_CONNECT_TIMEOUT)
+                .setConnectionRequestTimeout(HTTP_CLIENT_CONNECTION_REQUEST_TIMEOUT)
+                .setCookieSpec(CookieSpecs.DEFAULT)
+                .setRedirectsEnabled(true)
+                .setRelativeRedirectsAllowed(true)
+                .setCircularRedirectsAllowed(false)
+                .setMaxRedirects(2)
+                .build();
+    }
+
+    public class CustomRedirectStrategy extends DefaultRedirectStrategy {
+
+        private final String[] REDIRECT_METHODS;
+
+        public CustomRedirectStrategy() {
+            this.REDIRECT_METHODS = new String[]{
+                HttpGet.METHOD_NAME,
+                HttpPost.METHOD_NAME,
+                HttpHead.METHOD_NAME,
+                HttpDelete.METHOD_NAME,
+                HttpOptions.METHOD_NAME
+            };
+        }
+
+        @Override
+        protected boolean isRedirectable(String method) {
+            for (final String m : REDIRECT_METHODS) {
+                if (m.equalsIgnoreCase(method)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+    }
+
+    @After
+    public void closeClient() throws IOException {
+        client.close();
+    }
+
+
+    public abstract class Runnable extends PerformanceTest.Runnable {
+
+        protected HttpClientContext context;
+
+        public Runnable() {
+            this.context = HttpClientContext.create();
+            this.context.setCookieStore(new BasicCookieStore());
+        }
+
+    }
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/LoginLogoutParameters.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/LoginLogoutParameters.java
new file mode 100644
index 0000000..0ca09d2
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/LoginLogoutParameters.java
@@ -0,0 +1,18 @@
+package org.keycloak.testsuite.performance;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public class LoginLogoutParameters {
+
+    public static final Integer AVERAGE_LOGIN_TIME_LIMIT = Integer.parseInt(System.getProperty("average.login.time.limit", "500"));
+    public static final Integer AVERAGE_LOGOUT_TIME_LIMIT = Integer.parseInt(System.getProperty("average.logout.time.limit", "500"));
+
+    public static final String ACCESS_REQUEST_TIME = "ACCESS_REQUEST";
+    public static final String LOGIN_REQUEST_TIME = "LOGIN_REQUEST";
+    public static final String LOGIN_VERIFY_REQUEST_TIME = "LOGIN_VERIFY_REQUEST";
+    public static final String LOGOUT_REQUEST_TIME = "LOGOUT_REQUEST";
+    public static final String LOGOUT_VERIFY_REQUEST_TIME = "LOGOUT_VERIFY_REQUEST";
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/ComputedMetric.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/ComputedMetric.java
new file mode 100644
index 0000000..69c063b
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/ComputedMetric.java
@@ -0,0 +1,12 @@
+package org.keycloak.testsuite.performance.metrics;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public interface ComputedMetric extends Metric {
+    
+    public void reset();
+    public void addValue(long value);
+    
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/ComputedMetrics.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/ComputedMetrics.java
new file mode 100644
index 0000000..d4d9cf0
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/ComputedMetrics.java
@@ -0,0 +1,13 @@
+package org.keycloak.testsuite.performance.metrics;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public interface ComputedMetrics extends Metrics<ComputedMetric> {
+
+    public void reset();
+    public void addValue(String metric, long value);
+    public Metrics computeMetrics();
+    
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/ArrayListMetric.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/ArrayListMetric.java
new file mode 100644
index 0000000..b6419a5
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/ArrayListMetric.java
@@ -0,0 +1,58 @@
+package org.keycloak.testsuite.performance.metrics.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import org.keycloak.testsuite.performance.metrics.ComputedMetric;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public class ArrayListMetric extends ArrayList<Long> implements ComputedMetric {
+
+    @Override
+    public void reset() {
+        clear();
+    }
+
+    @Override
+    public void addValue(long value) {
+        add(value);
+    }
+
+    @Override
+    public long getCount() {
+        return size();
+    }
+
+    @Override
+    public long getMin() {
+        return Collections.min(this);
+    }
+
+    @Override
+    public long getMax() {
+        return Collections.max(this);
+    }
+
+    @Override
+    public double getAverage() {
+        long sum = 0;
+        for (long l : this) {
+            sum += l;
+        }
+        return isEmpty() ? 0 : sum / size();
+    }
+
+    @Override
+    public double getStandardDeviation() {
+        double average = getAverage();
+        long sumSquare = 0;
+        for (long l : this) {
+            sumSquare += l * l;
+        }
+        return isEmpty() ? 0
+                : Math.sqrt(sumSquare / size() - (average * average));
+    }
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/MovingAverageMetric.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/MovingAverageMetric.java
new file mode 100644
index 0000000..7291db4
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/MovingAverageMetric.java
@@ -0,0 +1,73 @@
+package org.keycloak.testsuite.performance.metrics.impl;
+
+import java.math.BigDecimal;
+import org.keycloak.testsuite.performance.metrics.ComputedMetric;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public final class MovingAverageMetric implements ComputedMetric {
+
+    private BigDecimal sum;
+    private BigDecimal sumSquare;
+    private long count;
+    private long min;
+    private long max;
+
+    public MovingAverageMetric() {
+        reset();
+    }
+
+    @Override
+    public synchronized void reset() {
+        this.sum = new BigDecimal(0);
+        this.sumSquare = new BigDecimal(0);
+        count = 0;
+        min = Long.MAX_VALUE;
+        max = 0;
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public long getMin() {
+        return min;
+    }
+
+    @Override
+    public long getMax() {
+        return max;
+    }
+
+    @Override
+    public synchronized double getAverage() {
+        return count == 0 ? 0
+                : sum.longValue() / count;
+    }
+
+    @Override
+    public synchronized double getStandardDeviation() {
+        double average = getAverage();
+        return count == 0 ? 0
+                : Math.sqrt(sumSquare.longValue() / count - (average * average));
+    }
+
+    @Override
+    public synchronized void addValue(long value) {
+        sum = sum.add(new BigDecimal(value));
+        sumSquare = sumSquare.add(new BigDecimal(value * value));
+        min = Math.min(min, value);
+        max = Math.max(max, value);
+        count++;
+    }
+
+    @Override
+    public String toString() {
+        return Double.toString(getAverage());
+    }
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/Result.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/Result.java
new file mode 100644
index 0000000..35d0c95
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/Result.java
@@ -0,0 +1,70 @@
+package org.keycloak.testsuite.performance.metrics.impl;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
+import org.keycloak.testsuite.performance.metrics.Metric;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public class Result implements Metric {
+
+    private final long count;
+    private final long min;
+    private final long max;
+    private final double average;
+    private final double standardDeviation;
+
+    public Result(long count, long min, long max, double average, double standardDeviation) {
+        this.count = count;
+        this.min = min;
+        this.max = max;
+        this.average = average;
+        this.standardDeviation = standardDeviation;
+    }
+
+    public Result(Metric metric) {
+        this(
+                metric.getCount(),
+                metric.getMin(),
+                metric.getMax(),
+                metric.getAverage(),
+                metric.getStandardDeviation());
+    }
+
+    @Override
+    public long getCount() {
+        return count;
+    }
+
+    @Override
+    public long getMin() {
+        return min;
+    }
+
+    @Override
+    public long getMax() {
+        return max;
+    }
+
+    @Override
+    public double getAverage() {
+        return average;
+    }
+
+    @Override
+    public double getStandardDeviation() {
+        return standardDeviation;
+    }
+
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
+    }
+
+    public String toLogString() {
+        return count + " " + min + " " + max + " " + average + " " + standardDeviation;
+    }
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/Results.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/Results.java
new file mode 100644
index 0000000..8d4a53e
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/Results.java
@@ -0,0 +1,23 @@
+package org.keycloak.testsuite.performance.metrics.impl;
+
+import java.util.TreeMap;
+import org.keycloak.testsuite.performance.metrics.ComputedMetrics;
+import org.keycloak.testsuite.performance.metrics.Metrics;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public class Results extends TreeMap<String, Result> implements Metrics<Result> {
+
+    public Results(ComputedMetrics metrics) {
+        for (String metric : metrics.keySet()) {
+            put(metric, new Result(metrics.get(metric)));
+        }
+    }
+
+    public String getHeader() {
+        return "# Operation Count Min Max Average Standard-Deviation";
+    }
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/ResultsWithThroughput.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/ResultsWithThroughput.java
new file mode 100644
index 0000000..140de6f
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/impl/ResultsWithThroughput.java
@@ -0,0 +1,48 @@
+package org.keycloak.testsuite.performance.metrics.impl;
+
+import org.jboss.logging.Logger;
+import java.util.HashMap;
+import java.util.Map;
+import org.keycloak.testsuite.performance.metrics.ComputedMetrics;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public class ResultsWithThroughput extends Results {
+
+    public static final Logger LOG = Logger.getLogger(ResultsWithThroughput.class);
+    private final Map<String, Double> throughput;
+
+    public ResultsWithThroughput(ComputedMetrics metrics, long durationMillis) {
+        super(metrics);
+        throughput = new HashMap<>();
+        for (String metric : keySet()) {
+            throughput.put(metric, (double) get(metric).getCount() / durationMillis * 1000);
+        }
+    }
+
+    public Map<String, Double> getThroughput() {
+        return throughput;
+    }
+
+    @Override
+    public String toString() {
+        return "Results: " + super.toString() + "\n"
+                + "Throughput: " + getThroughput();
+    }
+
+    @Override
+    public String getHeader() {
+        return super.getHeader() + " Throughput";
+
+    }
+
+    public void logResults() {
+        LOG.info(getHeader());
+        for (String metric : keySet()) {
+            LOG.info(metric + " " + get(metric).toLogString() + " " + getThroughput().get(metric));
+        }
+    }
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/Metric.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/Metric.java
new file mode 100644
index 0000000..b2a6809
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/Metric.java
@@ -0,0 +1,15 @@
+package org.keycloak.testsuite.performance.metrics;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public interface Metric {
+    
+    public long getCount();
+    public long getMin();
+    public long getMax();
+    public double getAverage();
+    public double getStandardDeviation();
+    
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/Metrics.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/Metrics.java
new file mode 100644
index 0000000..b893dc9
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/metrics/Metrics.java
@@ -0,0 +1,12 @@
+package org.keycloak.testsuite.performance.metrics;
+
+import java.util.Map;
+
+/**
+ *
+ * @author tkyjovsk
+ * @param <T>
+ */
+public interface Metrics<T extends Metric> extends Map<String, T> {
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/OperationTimeoutException.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/OperationTimeoutException.java
new file mode 100644
index 0000000..deb5026
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/OperationTimeoutException.java
@@ -0,0 +1,30 @@
+package org.keycloak.testsuite.performance;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public class OperationTimeoutException extends Exception {
+
+    private final String metric;
+    private final long value;
+
+    public OperationTimeoutException(String metric, Throwable cause) {
+        this(metric, 0, cause);
+    }
+
+    public OperationTimeoutException(String metric, long value, Throwable cause) {
+        super(cause);
+        this.metric = metric;
+        this.value = value;
+    }
+
+    public String getMetric() {
+        return metric;
+    }
+
+    public long getValue() {
+        return value;
+    }
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/PerformanceTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/PerformanceTest.java
new file mode 100644
index 0000000..a4278e1
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/PerformanceTest.java
@@ -0,0 +1,215 @@
+package org.keycloak.testsuite.performance;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import org.jboss.logging.Logger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.keycloak.testsuite.adapter.AbstractExampleAdapterTest;
+import org.keycloak.testsuite.performance.metrics.impl.Results;
+import org.keycloak.testsuite.performance.metrics.impl.ResultsWithThroughput;
+import static org.keycloak.testsuite.util.WaitUtils.pause;
+
+/**
+ * PerformanceTest.
+ *
+ * @author tkyjovsk
+ */
+public abstract class PerformanceTest extends AbstractExampleAdapterTest {
+
+    private final Logger LOG = Logger.getLogger(PerformanceTest.class);
+
+    public static final Integer WARMUP_LOAD = Integer.parseInt(System.getProperty("warmup.load", "5"));
+    public static final Integer WARMUP_DURATION = Integer.parseInt(System.getProperty("warmup.duration", "30"));
+
+    public static final Integer INITIAL_LOAD = Integer.parseInt(System.getProperty("initial.load", "10")); // load for the first iteration
+    public static final Integer LOAD_INCREASE = Integer.parseInt(System.getProperty("load.increase", "10")); // how many threads to add before each iteration
+    public static final Integer LOAD_INCREASE_RATE = Integer.parseInt(System.getProperty("load.increase.rate", "2")); // how fast to add the new threads per second
+
+    public static final Integer MEASUREMENT_DURATION = Integer.parseInt(System.getProperty("measurement.duration", "20")); // duration of one measurement iteration
+
+    public static final Integer MAX_ITERATIONS = Integer.parseInt(System.getProperty("max.iterations", "10"));
+    public static final Integer MAX_THREADS = Integer.parseInt(System.getProperty("max.threads", "1000"));
+
+    public static final Integer SLEEP_BETWEEN_REPEATS = Integer.parseInt(System.getProperty("sleep.between.repeats", "0"));
+
+    private final double AVERAGE_TIMEOUT_PERCENTAGE_LIMIT = Double.parseDouble(System.getProperty("average.timeout.percentage.limit", "0.01"));
+
+    private int currentLoad;
+
+    private ExecutorService executorService;
+
+    protected PerformanceTestMetrics metrics = new PerformanceTestMetrics();
+    protected PerformanceTestMetrics timeouts = new PerformanceTestMetrics();
+
+    protected List<ResultsWithThroughput> resultsList = new ArrayList<>();
+    protected List<ResultsWithThroughput> timeoutResultsList = new ArrayList<>();
+
+    @Before
+    public void before() {
+        if (WARMUP_LOAD > INITIAL_LOAD) {
+            throw new IllegalArgumentException("'warmup.load' cannot be larger than 'initial.load'");
+        }
+
+        executorService = Executors.newFixedThreadPool(MAX_THREADS);
+        currentLoad = 0;
+
+        metrics.clear();
+    }
+
+    @After
+    public void after() throws IOException, InterruptedException {
+        executorService.shutdown();
+        LOG.info("Waiting for threadpool termination.");
+        executorService.awaitTermination(10, TimeUnit.SECONDS);
+    }
+
+    @Test
+    public void test() {
+
+        increaseLoadBy(WARMUP_LOAD); // increase to warmup load
+        warmup();
+
+        for (int i = 0; i < MAX_ITERATIONS; i++) {
+
+            int loadIncrease = (i == 0)
+                    ? INITIAL_LOAD - WARMUP_LOAD // increase from warmup to initial load
+                    : LOAD_INCREASE; // increase load between iterations
+
+            increaseLoadBy(loadIncrease);
+            measurePerformance();
+
+            if (!isThereEnoughThreadsForNextIteration(LOAD_INCREASE)) {
+                LOG.warn("Threadpool capacity reached. Stopping the test.");
+                break;
+            }
+            if (!isLatestResultsWithinLimits()) {
+                LOG.warn("The latest measurement surpassed expected limit. Stopping the test.");
+                break;
+            }
+        }
+
+    }
+
+    private void warmup() {
+        LOG.info("Warming up for " + WARMUP_DURATION + " s");
+        pauseWithErrorChecking(WARMUP_DURATION * 1000);
+    }
+
+    private boolean isThereEnoughThreadsForNextIteration(int loadIncrease) {
+        return currentLoad + loadIncrease <= MAX_THREADS;
+    }
+
+    private void increaseLoadBy(int loadIncrease) {
+        if (loadIncrease < 0) {
+            throw new IllegalArgumentException("Cannot increase load by a negative number (" + loadIncrease + ").");
+        }
+        if (!isThereEnoughThreadsForNextIteration(loadIncrease)) {
+            throw new IllegalArgumentException("Cannot increase load beyond threadpool capacity (" + MAX_THREADS + ").");
+        }
+        if (loadIncrease > 0) {
+            LOG.info(String.format("Increasing load from %s to %s.", currentLoad, currentLoad + loadIncrease));
+            for (int t = 0; t < loadIncrease; t++) {
+                executorService.submit(newRunnable());
+                currentLoad++;
+                pauseWithErrorChecking(1000 / LOAD_INCREASE_RATE);
+            }
+        }
+    }
+
+    private void measurePerformance() {
+        LOG.info("Measuring performance");
+        LOG.info("Iteration: " + (resultsList.size() + 1));
+        LOG.info("Duration: " + MEASUREMENT_DURATION + " s");
+        LOG.info("Load: " + currentLoad);
+
+        metrics.reset();
+        pauseWithErrorChecking(MEASUREMENT_DURATION * 1000);
+        resultsList.add(metrics.computeMetrics());
+        timeoutResultsList.add(timeouts.computeMetrics());
+
+        getLatestResults().logResults(); // to file
+        LOG.info("Timeouts: " + getLatestTimeoutResults());
+    }
+
+    protected ResultsWithThroughput getLatestResults() {
+        return resultsList.isEmpty() ? null : resultsList.get(resultsList.size() - 1);
+    }
+
+    protected Results getLatestTimeoutResults() {
+        return timeoutResultsList.isEmpty() ? null : timeoutResultsList.get(timeoutResultsList.size() - 1);
+    }
+
+    private Throwable error = null;
+
+    public synchronized Throwable getError() {
+        return error;
+    }
+
+    public synchronized void setError(Throwable error) {
+        this.error = error;
+    }
+
+    protected void pauseWithErrorChecking(long millis) {
+        pauseWithErrorChecking(millis, 1000);
+    }
+
+    protected void pauseWithErrorChecking(long millis, long checkIntervals) {
+        long count = millis / checkIntervals;
+        long remainder = millis % checkIntervals;
+        for (int i = 0; i < count + 1; i++) { // repeat 'count' times + once for remainder
+            if (i < count || remainder > 0) { // on last iteration check if any remainder
+                pause(checkIntervals);
+                if (getError() != null) {
+                    throw new RuntimeException("PerformanceTestRunnable threw an exception. Stopping the test.", getError());
+                }
+            }
+        }
+    }
+
+    protected abstract boolean isLatestResultsWithinLimits();
+
+    protected boolean isLatestTimeoutsWithinLimits() {
+        boolean socketTimeoutsWithinLimits = true;
+        for (String metric : getLatestResults().keySet()) {
+            long timemoutCount = getLatestTimeoutResults().containsKey(metric) ? getLatestTimeoutResults().get(metric).getCount() : 0;
+            double timeoutPercentage = (double) timemoutCount / getLatestResults().get(metric).getCount();
+            socketTimeoutsWithinLimits = socketTimeoutsWithinLimits && timeoutPercentage < AVERAGE_TIMEOUT_PERCENTAGE_LIMIT;
+        }
+        return socketTimeoutsWithinLimits;
+    }
+
+    protected abstract Runnable newRunnable();
+
+    public abstract class Runnable extends RepeatRunnable {
+
+        protected final Timer timer;
+
+        public Runnable() {
+            super(SLEEP_BETWEEN_REPEATS * 1000);
+            this.timer = new Timer();
+        }
+
+        @Override
+        public void repeat() {
+            try {
+                performanceScenario();
+            } catch (OperationTimeoutException ex) {
+                timeouts.addValue(ex.getMetric(), ex.getValue());
+                LOG.debug(String.format("Operatin %s timed out. Cause: %s.", ex.getMetric(), ex.getCause()));
+            } catch (AssertionError | Exception ex) {
+                setError(ex);
+                throw new RuntimeException(ex);
+            }
+        }
+
+        public abstract void performanceScenario() throws Exception;
+
+    }
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/PerformanceTestMetrics.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/PerformanceTestMetrics.java
new file mode 100644
index 0000000..1ebaea3
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/PerformanceTestMetrics.java
@@ -0,0 +1,51 @@
+package org.keycloak.testsuite.performance;
+
+import java.util.concurrent.ConcurrentHashMap;
+import org.keycloak.testsuite.performance.metrics.ComputedMetric;
+import org.keycloak.testsuite.performance.metrics.ComputedMetrics;
+import org.keycloak.testsuite.performance.metrics.impl.ArrayListMetric;
+import org.keycloak.testsuite.performance.metrics.impl.MovingAverageMetric;
+import org.keycloak.testsuite.performance.metrics.impl.ResultsWithThroughput;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public class PerformanceTestMetrics extends ConcurrentHashMap<String,ComputedMetric> implements ComputedMetrics {
+
+    public static final String METRIC_MOVING_AVERAGE = "MovingAverage";
+    public static final String METRIC_ARRAY_LIST = "ArrayList";
+    public static final String METRIC = System.getProperty("metric", METRIC_MOVING_AVERAGE);
+
+    Timer timer = new Timer();
+    
+    @Override
+    public void reset() {
+        clear();
+        timer.reset();
+    }
+
+    private ComputedMetric getOrCreate(String metric) {
+        ComputedMetric m = get(metric);
+        if (m == null) {
+            if (METRIC_ARRAY_LIST.equals(metric)) {
+                m = new ArrayListMetric();
+            } else {
+                m = new MovingAverageMetric();
+            }
+            put(metric, m);
+        }
+        return m;
+    }
+
+    @Override
+    public void addValue(String metric, long value) {
+        getOrCreate(metric).addValue(value);
+    }
+
+    @Override
+    public ResultsWithThroughput computeMetrics() {
+        return new ResultsWithThroughput(this, timer.getElapsedTime());
+    }
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/RepeatRunnable.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/RepeatRunnable.java
new file mode 100644
index 0000000..f62d196
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/RepeatRunnable.java
@@ -0,0 +1,42 @@
+package org.keycloak.testsuite.performance;
+
+import static org.keycloak.testsuite.util.WaitUtils.pause;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public abstract class RepeatRunnable implements Runnable {
+
+    private long sleepBetweenRepeatsMillis;
+    private long repeatCounter;
+
+    public RepeatRunnable() {
+        this(0);
+        this.repeatCounter = 0;
+    }
+
+    public RepeatRunnable(long sleepBetweenRepeatsMillis) {
+        this.sleepBetweenRepeatsMillis = sleepBetweenRepeatsMillis;
+    }
+
+    public void setSleepBetweenRepeatsMillis(long sleepBetweenRepeatsMillis) {
+        this.sleepBetweenRepeatsMillis = sleepBetweenRepeatsMillis;
+    }
+
+    public long getRepeatCounter() {
+        return repeatCounter;
+    }
+
+    @Override
+    public void run() {
+        while (true) {
+            repeat();
+            repeatCounter++;
+            pause(sleepBetweenRepeatsMillis);
+        }
+    }
+
+    public abstract void repeat();
+
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/Timer.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/Timer.java
new file mode 100644
index 0000000..8edb326
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/performance/Timer.java
@@ -0,0 +1,26 @@
+package org.keycloak.testsuite.performance;
+
+import java.util.Date;
+
+/**
+ *
+ * @author tkyjovsk
+ */
+public final class Timer {
+ 
+    private long time;
+
+    public Timer() {
+        reset();
+    }
+
+    public long reset() {
+        time = new Date().getTime();
+        return time;
+    }
+
+    public long getElapsedTime() {
+        return new Date().getTime() - time;
+    }
+    
+}
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/resources/examples-realm.json b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/resources/examples-realm.json
new file mode 100644
index 0000000..1f7d5fa
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/resources/examples-realm.json
@@ -0,0 +1,1795 @@
+{
+  "id" : "Examples",
+  "realm" : "Examples",
+  "notBefore" : 0,
+  "revokeRefreshToken" : false,
+  "accessTokenLifespan" : 300,
+  "accessTokenLifespanForImplicitFlow" : 900,
+  "ssoSessionIdleTimeout" : 1800,
+  "ssoSessionMaxLifespan" : 36000,
+  "offlineSessionIdleTimeout" : 2592000,
+  "accessCodeLifespan" : 60,
+  "accessCodeLifespanUserAction" : 300,
+  "accessCodeLifespanLogin" : 1800,
+  "enabled" : true,
+  "sslRequired" : "external",
+  "registrationAllowed" : false,
+  "registrationEmailAsUsername" : false,
+  "rememberMe" : false,
+  "verifyEmail" : false,
+  "resetPasswordAllowed" : false,
+  "editUsernameAllowed" : false,
+  "bruteForceProtected" : false,
+  "maxFailureWaitSeconds" : 900,
+  "minimumQuickLoginWaitSeconds" : 60,
+  "waitIncrementSeconds" : 60,
+  "quickLoginCheckMilliSeconds" : 1000,
+  "maxDeltaTimeSeconds" : 43200,
+  "failureFactor" : 30,
+  "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",
+  "roles" : {
+    "realm" : [ {
+      "id" : "f540ac12-b9e7-45c3-9be8-d469f1051b16",
+      "name" : "offline_access",
+      "description" : "${role_offline-access}",
+      "scopeParamRequired" : true,
+      "composite" : false
+    }, {
+      "id" : "7d14d261-4590-4f10-8830-e9f7bca923d9",
+      "name" : "user",
+      "scopeParamRequired" : false,
+      "composite" : false
+    }, {
+      "id" : "2897aa90-8c9e-49ef-b273-7074333a45b9",
+      "name" : "admin",
+      "scopeParamRequired" : false,
+      "composite" : false
+    } ],
+    "client" : {
+      "realm-management" : [ {
+        "id" : "f11b2b13-d6b5-401d-9a5a-da841cc24b78",
+        "name" : "manage-events",
+        "description" : "${role_manage-events}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "63278de8-8686-4a25-97f5-bc9ca505edd9",
+        "name" : "view-clients",
+        "description" : "${role_view-clients}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "4a152ca7-7efc-4ce5-b3bd-1cae29838710",
+        "name" : "view-realm",
+        "description" : "${role_view-realm}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "109166ed-30cf-4500-beb9-9c7bc06aa67a",
+        "name" : "view-users",
+        "description" : "${role_view-users}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "e7067af6-c3f1-4439-a33d-108ec0ac99bc",
+        "name" : "realm-admin",
+        "description" : "${role_realm-admin}",
+        "scopeParamRequired" : false,
+        "composite" : true,
+        "composites" : {
+          "client" : {
+            "realm-management" : [ "view-events", "manage-identity-providers", "impersonation", "view-clients", "manage-events", "view-realm", "view-identity-providers", "manage-users", "manage-clients", "create-client", "view-users", "manage-realm" ]
+          }
+        }
+      }, {
+        "id" : "2aaf70b6-a1a4-4a61-ad43-04f4c2a254e1",
+        "name" : "manage-identity-providers",
+        "description" : "${role_manage-identity-providers}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "73a11338-48f4-4421-acfc-730fe3f3a799",
+        "name" : "view-events",
+        "description" : "${role_view-events}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "6a8d7a84-fcc9-4a80-b948-78eeb62d1ee5",
+        "name" : "impersonation",
+        "description" : "${role_impersonation}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "d2ccaa4a-953c-4c51-9d0f-323e0e2adaf4",
+        "name" : "view-identity-providers",
+        "description" : "${role_view-identity-providers}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "e6bd5ddb-8b12-47ae-8750-199b09e14fd9",
+        "name" : "manage-users",
+        "description" : "${role_manage-users}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "c8af8ff4-c3e9-4a3d-9b01-ffd1cd81353f",
+        "name" : "manage-clients",
+        "description" : "${role_manage-clients}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "cd192455-0ac7-41f8-a375-c41d9c20967e",
+        "name" : "create-client",
+        "description" : "${role_create-client}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "cdf3138b-91e4-4993-9577-ae0b948e836f",
+        "name" : "manage-realm",
+        "description" : "${role_manage-realm}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      } ],
+      "app-jee" : [ ],
+      "security-admin-console" : [ ],
+      "service-jaxrs" : [ ],
+      "app-profile-jee-saml" : [ ],
+      "app-profile-jee" : [ ],
+      "admin-cli" : [ ],
+      "app-html5" : [ ],
+      "broker" : [ {
+        "id" : "5320e8f7-9c24-4881-99d4-47d05534f166",
+        "name" : "read-token",
+        "description" : "${role_read-token}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      } ],
+      "account" : [ {
+        "id" : "f24a5945-7751-4f5f-8d2b-733f83b89ca2",
+        "name" : "view-profile",
+        "description" : "${role_view-profile}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "4c29db3b-cd54-425f-918b-d62fd6256f49",
+        "name" : "manage-account",
+        "description" : "${role_manage-account}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      } ],
+      "app-profile-html5" : [ ]
+    }
+  },
+  "groups" : [ ],
+  "defaultRoles" : [ "offline_access" ],
+  "requiredCredentials" : [ "password" ],
+  "otpPolicyType" : "totp",
+  "otpPolicyAlgorithm" : "HmacSHA1",
+  "otpPolicyInitialCounter" : 0,
+  "otpPolicyDigits" : 6,
+  "otpPolicyLookAheadWindow" : 1,
+  "otpPolicyPeriod" : 30,
+  "users" : [ {
+    "id" : "5c961fa6-c93f-4d95-b620-3abf74730b10",
+    "createdTimestamp" : 1449782544215,
+    "username" : "admin-user",
+    "enabled" : true,
+    "totp" : false,
+    "emailVerified" : false,
+    "firstName" : "Admin",
+    "lastName" : "User",
+    "email" : "admin@user.com",
+    "credentials" : [ {
+      "type" : "password",
+      "hashedSaltedValue" : "nP2DTe9zXzvuzn4deQhmEqA7eKNs14tdMSaZgfdCHBmWm7mX5DHK/7C6rXjx7BZnE3uzDXKDjZsb2eQFixw9QA==",
+      "salt" : "uP98vzC7rZadMl1oB1YESg==",
+      "hashIterations" : 1,
+      "counter" : 0,
+      "digits" : 0
+    } ],
+    "requiredActions" : [ ],
+    "realmRoles" : [ "offline_access", "user", "admin" ],
+    "clientRoles" : {
+      "account" : [ "view-profile", "manage-account" ]
+    },
+    "groups" : [ ]
+  }, {
+    "id" : "5a5e3de6-8bbb-4a6f-b2f4-df2a39f46e4e",
+    "createdTimestamp" : 1449782197314,
+    "username" : "secure-user",
+    "enabled" : true,
+    "totp" : false,
+    "emailVerified" : false,
+    "firstName" : "Secure",
+    "lastName" : "User",
+    "email" : "secure@user.com",
+    "credentials" : [ {
+      "type" : "password",
+      "hashedSaltedValue" : "Fu+o7j8wZZE4XyR6hRxAX0v3GM8Lzrt4bHVjSCpY86o/RP5tAhBMZsLEM8iZ97eOazKTzdofj2v8qnjpOIldJg==",
+      "salt" : "306EQU1PC5oVl/+j9XAqrg==",
+      "hashIterations" : 1,
+      "counter" : 0,
+      "digits" : 0
+    } ],
+    "requiredActions" : [ ],
+    "realmRoles" : [ "offline_access", "user" ],
+    "clientRoles" : {
+      "account" : [ "view-profile", "manage-account" ]
+    },
+    "groups" : [ ]
+  } ],
+  "clientScopeMappings" : {
+    "realm-management" : [ {
+      "client" : "security-admin-console",
+      "roles" : [ "realm-admin" ]
+    }, {
+      "client" : "admin-cli",
+      "roles" : [ "realm-admin" ]
+    } ]
+  },
+  "clients" : [ {
+    "id" : "2c0a2e2b-e58a-41c5-811c-8047b3059b5c",
+    "clientId" : "realm-management",
+    "name" : "${client_realm-management}",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "79a77b77-0958-4a75-a5d0-a7f88d2376cb",
+    "redirectUris" : [ ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : true,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "attributes" : { },
+    "fullScopeAllowed" : false,
+    "nodeReRegistrationTimeout" : 0,
+    "protocolMappers" : [ {
+      "id" : "f851fdbd-0f76-4a45-ac91-66a27ceaa514",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "f0787470-6265-47b4-8b18-ae9338eb2e43",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "039f4448-386c-4f3f-b691-ff71a96736d5",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "ec6f41d5-8f12-4f32-b069-1160a64fc09f",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "8f080912-609b-4cae-b892-7ceedd962293",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "8dd11379-330d-4a15-ac2c-af9f3ed4c1d7",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    } ]
+  }, {
+    "id" : "f74c463c-f56c-4c10-add5-6c40a9dce522",
+    "clientId" : "app-jee",
+    "name" : "app-jee",
+    "description" : "app-jee",
+    "rootUrl" : "http://localhost:8080",
+    "adminUrl" : "/app-jee/",
+    "baseUrl" : "http://localhost:8080/app-jee/",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "7dfad209-79a0-4103-856c-d021ab7a052b",
+    "redirectUris" : [ "/app-jee/*" ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "protocol" : "openid-connect",
+    "attributes" : {
+      "saml.assertion.signature" : "false",
+      "saml.force.post.binding" : "false",
+      "saml.multivalued.roles" : "false",
+      "saml.signature.algorithm" : "RSA_SHA256",
+      "saml.encrypt" : "false",
+      "saml_force_name_id_format" : "false",
+      "saml.client.signature" : "false",
+      "saml.authnstatement" : "true",
+      "saml_name_id_format" : "username",
+      "saml.server.signature" : "false",
+      "saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
+    },
+    "fullScopeAllowed" : true,
+    "nodeReRegistrationTimeout" : -1,
+    "protocolMappers" : [ {
+      "id" : "57b5cf15-7f2b-41f8-bd1f-0af62cc370cb",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "bd6ada89-d446-40e3-99d5-5f22abce773c",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "918d97f3-e3aa-4793-b353-9ba68ce893f0",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "1c6943e0-ac48-4b81-8e7e-b71219a94fe3",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "c0285e8f-a09d-4fac-88ff-8444f27c6002",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "403b483e-82c5-4bd9-b9ea-d09e9e80022f",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    } ]
+  }, {
+    "id" : "d2a31747-475f-41a2-9e75-fe1e4c03dd94",
+    "clientId" : "security-admin-console",
+    "name" : "${client_security-admin-console}",
+    "baseUrl" : "/auth/admin/Examples/console/index.html",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "4c9ce312-f07a-461a-8cdc-2f2cf96062d1",
+    "redirectUris" : [ "/auth/admin/Examples/console/*" ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : true,
+    "frontchannelLogout" : false,
+    "attributes" : { },
+    "fullScopeAllowed" : false,
+    "nodeReRegistrationTimeout" : 0,
+    "protocolMappers" : [ {
+      "id" : "355f43b3-4750-4409-8a48-489bb5e314d6",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "5a686b95-9b95-467d-a3b9-b7abf85484fe",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "abf9e75c-d465-464f-b945-1cfd2313f4ee",
+      "name" : "locale",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-attribute-mapper",
+      "consentRequired" : false,
+      "consentText" : "${locale}",
+      "config" : {
+        "user.attribute" : "locale",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "locale",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "dcf71134-ddcd-4215-b395-c0c6457c1e7d",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "dc4cdda7-ea73-42fa-b4b4-f91141dfd4db",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "ee8ae69b-d107-4b50-a522-14eafe993e40",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "53040785-a874-48b0-b6c5-3f73378ff993",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    } ]
+  }, {
+    "id" : "60e7cc2e-0884-43a1-8ff5-7e86e199488b",
+    "clientId" : "service-jaxrs",
+    "name" : "service-jaxrs",
+    "description" : "service-jaxrs",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "23ee787b-e9fe-473b-aa53-ccaf1d98edaa",
+    "redirectUris" : [ ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : true,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "protocol" : "openid-connect",
+    "attributes" : {
+      "saml.assertion.signature" : "false",
+      "saml.force.post.binding" : "false",
+      "saml.multivalued.roles" : "false",
+      "saml.signature.algorithm" : "RSA_SHA256",
+      "saml.encrypt" : "false",
+      "saml_force_name_id_format" : "false",
+      "saml.client.signature" : "false",
+      "saml.authnstatement" : "true",
+      "saml_name_id_format" : "username",
+      "saml.server.signature" : "false",
+      "saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
+    },
+    "fullScopeAllowed" : true,
+    "nodeReRegistrationTimeout" : -1,
+    "protocolMappers" : [ {
+      "id" : "15515c6f-189d-4e1f-ae1c-255610c1217b",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "ef6db9ea-d9f2-4eb4-8efc-67b593adea56",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "1692f65c-59f9-44f6-876f-cfa06b6d08dc",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "0d42629e-ffec-4acf-93e7-30f02576f965",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "c57e082a-43b7-42db-b9fb-61c8b80c82f6",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "a0b948fe-c404-4e45-a1a4-cb2c64cc4f8c",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    } ]
+  }, {
+    "id" : "b1b260e2-108c-4adb-9732-8a0e0d692459",
+    "clientId" : "app-profile-jee-saml",
+    "name" : "app-profile-jee-saml",
+    "description" : "app-profile-jee-saml",
+    "rootUrl" : "http://localhost:8080",
+    "adminUrl" : "http://localhost:8080/app-profile-jee-saml/",
+    "baseUrl" : "http://localhost:8080/app-profile-jee-saml/",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "171ee9fe-92bf-4080-8055-addfb6cc6d43",
+    "redirectUris" : [ ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "protocol" : "saml",
+    "attributes" : {
+      "saml.assertion.signature" : "false",
+      "saml.force.post.binding" : "false",
+      "saml.multivalued.roles" : "false",
+      "saml.signature.algorithm" : "RSA_SHA256",
+      "saml.encrypt" : "false",
+      "saml_force_name_id_format" : "false",
+      "saml.client.signature" : "false",
+      "saml.authnstatement" : "true",
+      "saml_name_id_format" : "username",
+      "saml.server.signature" : "false",
+      "saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
+    },
+    "fullScopeAllowed" : true,
+    "nodeReRegistrationTimeout" : -1,
+    "protocolMappers" : [ {
+      "id" : "f86b2e20-af97-4f3c-b427-3615fc4cfa3c",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "984fbaff-98ff-4893-8102-eef611b3d454",
+      "name" : "X500 surname",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-user-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "attribute.nameformat" : "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
+        "user.attribute" : "lastName",
+        "friendly.name" : "surname",
+        "attribute.name" : "urn:oid:2.5.4.4"
+      }
+    }, {
+      "id" : "0ddd2206-0fbf-4e21-bffc-ec0d73eb7725",
+      "name" : "X500 email",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-user-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "attribute.nameformat" : "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
+        "user.attribute" : "email",
+        "friendly.name" : "email",
+        "attribute.name" : "urn:oid:1.2.840.113549.1.9.1"
+      }
+    }, {
+      "id" : "acc82bfd-9033-4c2e-95e6-49017ae88a59",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "89ed44c1-7cf0-44f9-b098-d01b00d975b0",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "568b6670-1a5e-4996-8df8-733d0e52751d",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "591ddc4c-1482-4fd1-a9ff-826f4a4aee87",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "6f9bb8ee-e8a5-45ae-a5b5-4900453afe3c",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "79edf0eb-5ee6-4877-82c9-8bafe093bbb8",
+      "name" : "X500 givenName",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-user-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "attribute.nameformat" : "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
+        "user.attribute" : "firstName",
+        "friendly.name" : "givenName",
+        "attribute.name" : "urn:oid:2.5.4.42"
+      }
+    } ]
+  }, {
+    "id" : "534efc58-fca1-4c17-b99d-5a80723111e5",
+    "clientId" : "app-profile-jee",
+    "name" : "app-profile-jee",
+    "description" : "app-profile-jee",
+    "rootUrl" : "http://localhost:8080",
+    "adminUrl" : "/app-profile-jee/",
+    "baseUrl" : "http://localhost:8080/app-profile-jee/",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "4f36f31a-be9d-4f92-b982-425301bac5df",
+    "redirectUris" : [ "/app-profile-jee/*" ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "protocol" : "openid-connect",
+    "attributes" : {
+      "saml.assertion.signature" : "false",
+      "saml.force.post.binding" : "false",
+      "saml.multivalued.roles" : "false",
+      "saml.signature.algorithm" : "RSA_SHA256",
+      "saml.encrypt" : "false",
+      "saml_force_name_id_format" : "false",
+      "saml.client.signature" : "false",
+      "saml.authnstatement" : "true",
+      "saml_name_id_format" : "username",
+      "saml.server.signature" : "false",
+      "saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
+    },
+    "fullScopeAllowed" : true,
+    "nodeReRegistrationTimeout" : -1,
+    "protocolMappers" : [ {
+      "id" : "c9f8b614-ea9b-44f6-93f0-ce220ad6ddfe",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "56a03f82-87a9-4833-9549-d78d5b6f2103",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "f474ef62-f007-46a5-8962-8b1481bfb860",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "b541572f-436a-4408-bb85-d8b631601e47",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "306b0092-011a-49b4-a281-9242d10f97b6",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "c8b5e83d-4f44-4ba9-a536-ffceefa7b957",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    } ]
+  }, {
+    "id" : "201c1be5-776b-469a-879f-b709d8524ec1",
+    "clientId" : "admin-cli",
+    "name" : "${client_admin-cli}",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "fbe821af-b7ac-42af-b3af-9ba5b6c57bf4",
+    "redirectUris" : [ ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : false,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : true,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : true,
+    "frontchannelLogout" : false,
+    "attributes" : { },
+    "fullScopeAllowed" : false,
+    "nodeReRegistrationTimeout" : 0,
+    "protocolMappers" : [ {
+      "id" : "317718b2-3201-47f0-82c9-d2f7975fbe2e",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "6877e1b9-8cb1-4074-b600-95542c894c7e",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "e2f5fafb-6b11-42a6-a795-26f447c87a60",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "51aaed4e-254f-49eb-81d7-2dc591e0d46b",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "97ef8e04-cdb7-456e-b2e7-a9072c7af941",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "c1f3947d-fb60-48d7-88f4-93665325a0e4",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    } ]
+  }, {
+    "id" : "36526376-011d-49e9-8f17-88e7ebdcc975",
+    "clientId" : "app-html5",
+    "name" : "app-html5",
+    "description" : "app-html5",
+    "rootUrl" : "http://localhost:8080",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "c3d0b5c9-adbd-4948-9416-86d5cd66b714",
+    "redirectUris" : [ "/*" ],
+    "webOrigins" : [ "+" ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "protocol" : "openid-connect",
+    "attributes" : {
+      "saml.assertion.signature" : "false",
+      "saml.force.post.binding" : "false",
+      "saml.multivalued.roles" : "false",
+      "saml.signature.algorithm" : "RSA_SHA256",
+      "saml.encrypt" : "false",
+      "saml_force_name_id_format" : "false",
+      "saml.client.signature" : "false",
+      "saml.authnstatement" : "true",
+      "saml_name_id_format" : "username",
+      "saml.server.signature" : "false",
+      "saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
+    },
+    "fullScopeAllowed" : true,
+    "nodeReRegistrationTimeout" : -1,
+    "protocolMappers" : [ {
+      "id" : "6a34552a-e325-4890-8a11-ba1052a4c1f4",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "2e89927d-d26f-45c3-b2e4-792e7d047dd8",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "4a243cca-f719-4cfa-bcd3-95cd8c03eabd",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "66a9cc11-ea38-4506-a8e7-e8dfbc9a1cbd",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "6c659824-9beb-4dc1-a19a-6839d0b827a9",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "86f85aec-692e-40f7-933d-2bb60619c43e",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    } ]
+  }, {
+    "id" : "ee300a81-4085-4513-987b-70d1dfbb3677",
+    "clientId" : "broker",
+    "name" : "${client_broker}",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "dc5ff222-409b-4516-bdfb-b9dcad78f1be",
+    "redirectUris" : [ ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "attributes" : { },
+    "fullScopeAllowed" : false,
+    "nodeReRegistrationTimeout" : 0,
+    "protocolMappers" : [ {
+      "id" : "48bacfc9-0b3e-46f1-a17a-eee78bb756ce",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "1d0a728a-d9dc-4604-bac3-8ead48a9cb08",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "dc0af336-ed8f-4c81-8c6c-298bddcb46bf",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "a902457d-53c4-4d18-9ff4-e5e850816eec",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "ed4b6bf5-b6e7-4842-9c28-5479808a60ca",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "4aa2c376-1530-432a-89dc-d5761545bdcd",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    } ]
+  }, {
+    "id" : "095faf3a-958e-427e-940e-0c546daa2335",
+    "clientId" : "account",
+    "name" : "${client_account}",
+    "baseUrl" : "/auth/realms/Examples/account",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "16685ec3-779d-4c15-9024-4d5a41e6f8b5",
+    "defaultRoles" : [ "view-profile", "manage-account" ],
+    "redirectUris" : [ "/auth/realms/Examples/account/*" ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "attributes" : { },
+    "fullScopeAllowed" : false,
+    "nodeReRegistrationTimeout" : 0,
+    "protocolMappers" : [ {
+      "id" : "2ee2fbea-ccb5-4113-b89f-14ef742aec8b",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "c19af2b3-8cf3-4a88-93fb-15a7c977560c",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "46dca0b5-7246-4745-91e8-c87e4f9b8d49",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "c1df7e2d-e052-4836-a323-969e114ac95f",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "65a4fee1-3641-4aa3-ac76-8829c7fc410f",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "2b7287cf-9345-4950-8c7c-13539cfd958c",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    } ]
+  }, {
+    "id" : "afb55cf7-28ca-4b01-80ce-39b36aef0109",
+    "clientId" : "app-profile-html5",
+    "name" : "app-profile-html5",
+    "description" : "app-profile-html5",
+    "rootUrl" : "http://localhost:8080/app-profile-html5",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "2a1879d3-c873-4705-aee9-70c7249991eb",
+    "redirectUris" : [ "/*" ],
+    "webOrigins" : [ "+" ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : true,
+    "frontchannelLogout" : false,
+    "protocol" : "openid-connect",
+    "attributes" : {
+      "saml.assertion.signature" : "false",
+      "saml.force.post.binding" : "false",
+      "saml.multivalued.roles" : "false",
+      "saml.signature.algorithm" : "RSA_SHA256",
+      "saml.encrypt" : "false",
+      "saml_force_name_id_format" : "false",
+      "saml.client.signature" : "false",
+      "saml.authnstatement" : "true",
+      "saml_name_id_format" : "username",
+      "saml.server.signature" : "false",
+      "saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
+    },
+    "fullScopeAllowed" : true,
+    "nodeReRegistrationTimeout" : -1,
+    "protocolMappers" : [ {
+      "id" : "3e17ba98-4974-4361-9333-f69b5f1658cb",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "f7408fb9-f658-48be-97fd-00a1ef64ba13",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "8be7ab55-cac3-4ec7-b3b8-0a78aa89b42f",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "d46942f2-b378-4b64-83b1-e68860277ef7",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "f80e03ec-f30a-4eeb-9825-16f49313c18b",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "1a4e1d8e-7555-4363-b909-9467bd49bb7d",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    } ]
+  } ],
+  "browserSecurityHeaders" : {
+    "contentSecurityPolicy" : "frame-src 'self'",
+    "xFrameOptions" : "SAMEORIGIN"
+  },
+  "smtpServer" : { },
+  "eventsEnabled" : false,
+  "eventsListeners" : [ "jboss-logging" ],
+  "enabledEventTypes" : [ ],
+  "adminEventsEnabled" : false,
+  "adminEventsDetailsEnabled" : false,
+  "identityFederationEnabled" : false,
+  "internationalizationEnabled" : false,
+  "supportedLocales" : [ ],
+  "authenticationFlows" : [ {
+    "alias" : "Handle Existing Account",
+    "description" : "Handle what to do if there is existing account with same email/username like authenticated identity provider",
+    "providerId" : "basic-flow",
+    "topLevel" : false,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "idp-confirm-link",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "idp-email-verification",
+      "autheticatorFlow" : false,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    }, {
+      "flowAlias" : "Verify Existing Account by Re-authentication",
+      "autheticatorFlow" : true,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 30
+    } ]
+  }, {
+    "alias" : "Verify Existing Account by Re-authentication",
+    "description" : "Reauthentication of existing account",
+    "providerId" : "basic-flow",
+    "topLevel" : false,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "idp-username-password-form",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "auth-otp-form",
+      "autheticatorFlow" : false,
+      "requirement" : "OPTIONAL",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    } ]
+  }, {
+    "alias" : "browser",
+    "description" : "browser based authentication",
+    "providerId" : "basic-flow",
+    "topLevel" : true,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "auth-cookie",
+      "autheticatorFlow" : false,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "auth-spnego",
+      "autheticatorFlow" : false,
+      "requirement" : "DISABLED",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    }, {
+      "flowAlias" : "forms",
+      "autheticatorFlow" : true,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 30
+    } ]
+  }, {
+    "alias" : "clients",
+    "description" : "Base authentication for clients",
+    "providerId" : "client-flow",
+    "topLevel" : true,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "client-secret",
+      "autheticatorFlow" : false,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "client-jwt",
+      "autheticatorFlow" : false,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    } ]
+  }, {
+    "alias" : "direct grant",
+    "description" : "OpenID Connect Resource Owner Grant",
+    "providerId" : "basic-flow",
+    "topLevel" : true,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "direct-grant-validate-username",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "direct-grant-validate-password",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    }, {
+      "authenticator" : "direct-grant-validate-otp",
+      "autheticatorFlow" : false,
+      "requirement" : "OPTIONAL",
+      "userSetupAllowed" : false,
+      "priority" : 30
+    } ]
+  }, {
+    "alias" : "first broker login",
+    "description" : "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account",
+    "providerId" : "basic-flow",
+    "topLevel" : true,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticatorConfig" : "review profile config",
+      "authenticator" : "idp-review-profile",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticatorConfig" : "create unique user config",
+      "authenticator" : "idp-create-user-if-unique",
+      "autheticatorFlow" : false,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    }, {
+      "flowAlias" : "Handle Existing Account",
+      "autheticatorFlow" : true,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 30
+    } ]
+  }, {
+    "alias" : "forms",
+    "description" : "Username, password, otp and other auth forms.",
+    "providerId" : "basic-flow",
+    "topLevel" : false,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "auth-username-password-form",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "auth-otp-form",
+      "autheticatorFlow" : false,
+      "requirement" : "OPTIONAL",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    } ]
+  }, {
+    "alias" : "registration",
+    "description" : "registration flow",
+    "providerId" : "basic-flow",
+    "topLevel" : true,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "registration-page-form",
+      "flowAlias" : "registration form",
+      "autheticatorFlow" : true,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    } ]
+  }, {
+    "alias" : "registration form",
+    "description" : "registration form",
+    "providerId" : "form-flow",
+    "topLevel" : false,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "registration-user-creation",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    }, {
+      "authenticator" : "registration-profile-action",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 40
+    }, {
+      "authenticator" : "registration-password-action",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 50
+    }, {
+      "authenticator" : "registration-recaptcha-action",
+      "autheticatorFlow" : false,
+      "requirement" : "DISABLED",
+      "userSetupAllowed" : false,
+      "priority" : 60
+    } ]
+  }, {
+    "alias" : "reset credentials",
+    "description" : "Reset credentials for a user if they forgot their password or something",
+    "providerId" : "basic-flow",
+    "topLevel" : true,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "reset-credentials-choose-user",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "reset-credential-email",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    }, {
+      "authenticator" : "reset-password",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 30
+    }, {
+      "authenticator" : "reset-otp",
+      "autheticatorFlow" : false,
+      "requirement" : "OPTIONAL",
+      "userSetupAllowed" : false,
+      "priority" : 40
+    } ]
+  } ],
+  "authenticatorConfig" : [ {
+    "alias" : "create unique user config",
+    "config" : {
+      "require.password.update.after.registration" : "false"
+    }
+  }, {
+    "alias" : "review profile config",
+    "config" : {
+      "update.profile.on.first.login" : "missing"
+    }
+  } ],
+  "requiredActions" : [ {
+    "alias" : "CONFIGURE_TOTP",
+    "name" : "Configure Totp",
+    "providerId" : "CONFIGURE_TOTP",
+    "enabled" : true,
+    "defaultAction" : false,
+    "config" : { }
+  }, {
+    "alias" : "UPDATE_PASSWORD",
+    "name" : "Update Password",
+    "providerId" : "UPDATE_PASSWORD",
+    "enabled" : true,
+    "defaultAction" : false,
+    "config" : { }
+  }, {
+    "alias" : "UPDATE_PROFILE",
+    "name" : "Update Profile",
+    "providerId" : "UPDATE_PROFILE",
+    "enabled" : true,
+    "defaultAction" : false,
+    "config" : { }
+  }, {
+    "alias" : "VERIFY_EMAIL",
+    "name" : "Verify Email",
+    "providerId" : "VERIFY_EMAIL",
+    "enabled" : true,
+    "defaultAction" : false,
+    "config" : { }
+  }, {
+    "alias" : "terms_and_conditions",
+    "name" : "Terms and Conditions",
+    "providerId" : "terms_and_conditions",
+    "enabled" : false,
+    "defaultAction" : false,
+    "config" : { }
+  } ],
+  "browserFlow" : "browser",
+  "registrationFlow" : "registration",
+  "directGrantFlow" : "direct grant",
+  "resetCredentialsFlow" : "reset credentials",
+  "clientAuthenticationFlow" : "clients"
+}
\ No newline at end of file
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/resources/examples-realm-bak.json b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/resources/examples-realm-bak.json
new file mode 100644
index 0000000..e13a53d
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/resources/examples-realm-bak.json
@@ -0,0 +1,1797 @@
+{
+  "id" : "Examples",
+  "realm" : "Examples",
+  "notBefore" : 0,
+  "revokeRefreshToken" : false,
+  "accessTokenLifespan" : 300,
+  "accessTokenLifespanForImplicitFlow" : 900,
+  "ssoSessionIdleTimeout" : 1800,
+  "ssoSessionMaxLifespan" : 36000,
+  "offlineSessionIdleTimeout" : 2592000,
+  "accessCodeLifespan" : 60,
+  "accessCodeLifespanUserAction" : 300,
+  "accessCodeLifespanLogin" : 1800,
+  "enabled" : true,
+  "sslRequired" : "external",
+  "registrationAllowed" : false,
+  "registrationEmailAsUsername" : false,
+  "rememberMe" : false,
+  "verifyEmail" : false,
+  "resetPasswordAllowed" : false,
+  "editUsernameAllowed" : false,
+  "bruteForceProtected" : false,
+  "maxFailureWaitSeconds" : 900,
+  "minimumQuickLoginWaitSeconds" : 60,
+  "waitIncrementSeconds" : 60,
+  "quickLoginCheckMilliSeconds" : 1000,
+  "maxDeltaTimeSeconds" : 43200,
+  "failureFactor" : 30,
+  "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",
+  "certificate" : "MIICnzCCAYcCBgFRjbxGhzANBgkqhkiG9w0BAQsFADATMREwDwYDVQQDDAhFeGFtcGxlczAeFw0xNTEyMTAyMTEwMDVaFw0yNTEyMTAyMTExNDVaMBMxETAPBgNVBAMMCEV4YW1wbGVzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiGMvmVFV6yC5RquGBTErkVCS73seRqsiyB25OG5F2y36dt8RVHcmnA0jbEcSuhfTLcQIjFCY1X8NfOzQlrAEB+E41jS0Bfr0DfyhCuRb/cJ4SHKY35dKKFILn3QvHmcv6vhO5qnAGK80blWGP4CQFtbONUOMu6ZGyjirtFHCj/TNr7lAwlTSaD5ukOdt9apRkdP1xwupELdu7MXeJ4ik4+Axe4B2u6pixpIypIrY6eVt+JEPzFSB7cPQoUmE3FgW1i1Oxu+2iPJQ38ze9xr6xFTNJDQPv3unBZGR46svyX8D1Mo3pm+QgR6Z5JQNwGBS9qXkdjnI+O/N4q8+/S4s/QIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQABi0R5bquA8uk2dJnRJp4+GC7vSma+CMYJ7DldTq/U6iGG1umBnzue2aWi+PPfxGtIOzWzUA536RwvZByQrVIvHNA9XpmBumBl7RpCxRcTjoa4JDATN0QPHJW0/jWa9tCNENADhykeHxUtdhCefVzUKhm8eLxmCnkVHMtvkLi20aPFzgyxSq3hAPRj/DV0zpql7VDLWYr6oQ3AjyVKuYvC/VRf79goFz3Z5F9J20kK8hqOWUZzHFMASKcHIE2IuewPVNk+cRLRAYcuxkAvEXJgskp9/8BdmjYyNtcWQuRcEDSO4lFiQ04hR1P4MnEw9IKpKEb6igxXcdS1fx5doEPJ",
+  "codeSecret" : "f18b75ce-66a2-4510-9245-1980efdd1cc4",
+  "roles" : {
+    "realm" : [ {
+      "id" : "f540ac12-b9e7-45c3-9be8-d469f1051b16",
+      "name" : "offline_access",
+      "description" : "${role_offline-access}",
+      "scopeParamRequired" : true,
+      "composite" : false
+    }, {
+      "id" : "7d14d261-4590-4f10-8830-e9f7bca923d9",
+      "name" : "user",
+      "scopeParamRequired" : false,
+      "composite" : false
+    }, {
+      "id" : "2897aa90-8c9e-49ef-b273-7074333a45b9",
+      "name" : "admin",
+      "scopeParamRequired" : false,
+      "composite" : false
+    } ],
+    "client" : {
+      "realm-management" : [ {
+        "id" : "f11b2b13-d6b5-401d-9a5a-da841cc24b78",
+        "name" : "manage-events",
+        "description" : "${role_manage-events}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "63278de8-8686-4a25-97f5-bc9ca505edd9",
+        "name" : "view-clients",
+        "description" : "${role_view-clients}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "4a152ca7-7efc-4ce5-b3bd-1cae29838710",
+        "name" : "view-realm",
+        "description" : "${role_view-realm}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "109166ed-30cf-4500-beb9-9c7bc06aa67a",
+        "name" : "view-users",
+        "description" : "${role_view-users}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "e7067af6-c3f1-4439-a33d-108ec0ac99bc",
+        "name" : "realm-admin",
+        "description" : "${role_realm-admin}",
+        "scopeParamRequired" : false,
+        "composite" : true,
+        "composites" : {
+          "client" : {
+            "realm-management" : [ "view-events", "manage-identity-providers", "impersonation", "view-clients", "manage-events", "view-realm", "view-identity-providers", "manage-users", "manage-clients", "create-client", "view-users", "manage-realm" ]
+          }
+        }
+      }, {
+        "id" : "2aaf70b6-a1a4-4a61-ad43-04f4c2a254e1",
+        "name" : "manage-identity-providers",
+        "description" : "${role_manage-identity-providers}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "73a11338-48f4-4421-acfc-730fe3f3a799",
+        "name" : "view-events",
+        "description" : "${role_view-events}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "6a8d7a84-fcc9-4a80-b948-78eeb62d1ee5",
+        "name" : "impersonation",
+        "description" : "${role_impersonation}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "d2ccaa4a-953c-4c51-9d0f-323e0e2adaf4",
+        "name" : "view-identity-providers",
+        "description" : "${role_view-identity-providers}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "e6bd5ddb-8b12-47ae-8750-199b09e14fd9",
+        "name" : "manage-users",
+        "description" : "${role_manage-users}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "c8af8ff4-c3e9-4a3d-9b01-ffd1cd81353f",
+        "name" : "manage-clients",
+        "description" : "${role_manage-clients}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "cd192455-0ac7-41f8-a375-c41d9c20967e",
+        "name" : "create-client",
+        "description" : "${role_create-client}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "cdf3138b-91e4-4993-9577-ae0b948e836f",
+        "name" : "manage-realm",
+        "description" : "${role_manage-realm}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      } ],
+      "app-jee" : [ ],
+      "security-admin-console" : [ ],
+      "service-jaxrs" : [ ],
+      "app-profile-jee-saml" : [ ],
+      "app-profile-jee" : [ ],
+      "admin-cli" : [ ],
+      "app-html5" : [ ],
+      "broker" : [ {
+        "id" : "5320e8f7-9c24-4881-99d4-47d05534f166",
+        "name" : "read-token",
+        "description" : "${role_read-token}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      } ],
+      "account" : [ {
+        "id" : "f24a5945-7751-4f5f-8d2b-733f83b89ca2",
+        "name" : "view-profile",
+        "description" : "${role_view-profile}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      }, {
+        "id" : "4c29db3b-cd54-425f-918b-d62fd6256f49",
+        "name" : "manage-account",
+        "description" : "${role_manage-account}",
+        "scopeParamRequired" : false,
+        "composite" : false
+      } ],
+      "app-profile-html5" : [ ]
+    }
+  },
+  "groups" : [ ],
+  "defaultRoles" : [ "offline_access" ],
+  "requiredCredentials" : [ "password" ],
+  "otpPolicyType" : "totp",
+  "otpPolicyAlgorithm" : "HmacSHA1",
+  "otpPolicyInitialCounter" : 0,
+  "otpPolicyDigits" : 6,
+  "otpPolicyLookAheadWindow" : 1,
+  "otpPolicyPeriod" : 30,
+  "users" : [ {
+    "id" : "5c961fa6-c93f-4d95-b620-3abf74730b10",
+    "createdTimestamp" : 1449782544215,
+    "username" : "admin-user",
+    "enabled" : true,
+    "totp" : false,
+    "emailVerified" : false,
+    "firstName" : "Admin",
+    "lastName" : "User",
+    "email" : "admin@user.com",
+    "credentials" : [ {
+      "type" : "password",
+      "hashedSaltedValue" : "nP2DTe9zXzvuzn4deQhmEqA7eKNs14tdMSaZgfdCHBmWm7mX5DHK/7C6rXjx7BZnE3uzDXKDjZsb2eQFixw9QA==",
+      "salt" : "uP98vzC7rZadMl1oB1YESg==",
+      "hashIterations" : 1,
+      "counter" : 0,
+      "digits" : 0
+    } ],
+    "requiredActions" : [ ],
+    "realmRoles" : [ "offline_access", "user", "admin" ],
+    "clientRoles" : {
+      "account" : [ "view-profile", "manage-account" ]
+    },
+    "groups" : [ ]
+  }, {
+    "id" : "5a5e3de6-8bbb-4a6f-b2f4-df2a39f46e4e",
+    "createdTimestamp" : 1449782197314,
+    "username" : "secure-user",
+    "enabled" : true,
+    "totp" : false,
+    "emailVerified" : false,
+    "firstName" : "Secure",
+    "lastName" : "User",
+    "email" : "secure@user.com",
+    "credentials" : [ {
+      "type" : "password",
+      "hashedSaltedValue" : "Fu+o7j8wZZE4XyR6hRxAX0v3GM8Lzrt4bHVjSCpY86o/RP5tAhBMZsLEM8iZ97eOazKTzdofj2v8qnjpOIldJg==",
+      "salt" : "306EQU1PC5oVl/+j9XAqrg==",
+      "hashIterations" : 1,
+      "counter" : 0,
+      "digits" : 0
+    } ],
+    "requiredActions" : [ ],
+    "realmRoles" : [ "offline_access", "user" ],
+    "clientRoles" : {
+      "account" : [ "view-profile", "manage-account" ]
+    },
+    "groups" : [ ]
+  } ],
+  "clientScopeMappings" : {
+    "realm-management" : [ {
+      "client" : "security-admin-console",
+      "roles" : [ "realm-admin" ]
+    }, {
+      "client" : "admin-cli",
+      "roles" : [ "realm-admin" ]
+    } ]
+  },
+  "clients" : [ {
+    "id" : "2c0a2e2b-e58a-41c5-811c-8047b3059b5c",
+    "clientId" : "realm-management",
+    "name" : "${client_realm-management}",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "79a77b77-0958-4a75-a5d0-a7f88d2376cb",
+    "redirectUris" : [ ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : true,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "attributes" : { },
+    "fullScopeAllowed" : false,
+    "nodeReRegistrationTimeout" : 0,
+    "protocolMappers" : [ {
+      "id" : "f851fdbd-0f76-4a45-ac91-66a27ceaa514",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "f0787470-6265-47b4-8b18-ae9338eb2e43",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "039f4448-386c-4f3f-b691-ff71a96736d5",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "ec6f41d5-8f12-4f32-b069-1160a64fc09f",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "8f080912-609b-4cae-b892-7ceedd962293",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "8dd11379-330d-4a15-ac2c-af9f3ed4c1d7",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    } ]
+  }, {
+    "id" : "f74c463c-f56c-4c10-add5-6c40a9dce522",
+    "clientId" : "app-jee",
+    "name" : "app-jee",
+    "description" : "app-jee",
+    "rootUrl" : "http://localhost:8080",
+    "adminUrl" : "/app-jee/",
+    "baseUrl" : "http://localhost:8080/app-jee/",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "7dfad209-79a0-4103-856c-d021ab7a052b",
+    "redirectUris" : [ "/app-jee/*" ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "protocol" : "openid-connect",
+    "attributes" : {
+      "saml.assertion.signature" : "false",
+      "saml.force.post.binding" : "false",
+      "saml.multivalued.roles" : "false",
+      "saml.signature.algorithm" : "RSA_SHA256",
+      "saml.encrypt" : "false",
+      "saml_force_name_id_format" : "false",
+      "saml.client.signature" : "false",
+      "saml.authnstatement" : "true",
+      "saml_name_id_format" : "username",
+      "saml.server.signature" : "false",
+      "saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
+    },
+    "fullScopeAllowed" : true,
+    "nodeReRegistrationTimeout" : -1,
+    "protocolMappers" : [ {
+      "id" : "57b5cf15-7f2b-41f8-bd1f-0af62cc370cb",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "bd6ada89-d446-40e3-99d5-5f22abce773c",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "918d97f3-e3aa-4793-b353-9ba68ce893f0",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "1c6943e0-ac48-4b81-8e7e-b71219a94fe3",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "c0285e8f-a09d-4fac-88ff-8444f27c6002",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "403b483e-82c5-4bd9-b9ea-d09e9e80022f",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    } ]
+  }, {
+    "id" : "d2a31747-475f-41a2-9e75-fe1e4c03dd94",
+    "clientId" : "security-admin-console",
+    "name" : "${client_security-admin-console}",
+    "baseUrl" : "/auth/admin/Examples/console/index.html",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "4c9ce312-f07a-461a-8cdc-2f2cf96062d1",
+    "redirectUris" : [ "/auth/admin/Examples/console/*" ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : true,
+    "frontchannelLogout" : false,
+    "attributes" : { },
+    "fullScopeAllowed" : false,
+    "nodeReRegistrationTimeout" : 0,
+    "protocolMappers" : [ {
+      "id" : "355f43b3-4750-4409-8a48-489bb5e314d6",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "5a686b95-9b95-467d-a3b9-b7abf85484fe",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "abf9e75c-d465-464f-b945-1cfd2313f4ee",
+      "name" : "locale",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-attribute-mapper",
+      "consentRequired" : false,
+      "consentText" : "${locale}",
+      "config" : {
+        "user.attribute" : "locale",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "locale",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "dcf71134-ddcd-4215-b395-c0c6457c1e7d",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "dc4cdda7-ea73-42fa-b4b4-f91141dfd4db",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "ee8ae69b-d107-4b50-a522-14eafe993e40",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "53040785-a874-48b0-b6c5-3f73378ff993",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    } ]
+  }, {
+    "id" : "60e7cc2e-0884-43a1-8ff5-7e86e199488b",
+    "clientId" : "service-jaxrs",
+    "name" : "service-jaxrs",
+    "description" : "service-jaxrs",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "23ee787b-e9fe-473b-aa53-ccaf1d98edaa",
+    "redirectUris" : [ ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : true,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "protocol" : "openid-connect",
+    "attributes" : {
+      "saml.assertion.signature" : "false",
+      "saml.force.post.binding" : "false",
+      "saml.multivalued.roles" : "false",
+      "saml.signature.algorithm" : "RSA_SHA256",
+      "saml.encrypt" : "false",
+      "saml_force_name_id_format" : "false",
+      "saml.client.signature" : "false",
+      "saml.authnstatement" : "true",
+      "saml_name_id_format" : "username",
+      "saml.server.signature" : "false",
+      "saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
+    },
+    "fullScopeAllowed" : true,
+    "nodeReRegistrationTimeout" : -1,
+    "protocolMappers" : [ {
+      "id" : "15515c6f-189d-4e1f-ae1c-255610c1217b",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "ef6db9ea-d9f2-4eb4-8efc-67b593adea56",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "1692f65c-59f9-44f6-876f-cfa06b6d08dc",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "0d42629e-ffec-4acf-93e7-30f02576f965",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "c57e082a-43b7-42db-b9fb-61c8b80c82f6",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "a0b948fe-c404-4e45-a1a4-cb2c64cc4f8c",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    } ]
+  }, {
+    "id" : "b1b260e2-108c-4adb-9732-8a0e0d692459",
+    "clientId" : "app-profile-jee-saml",
+    "name" : "app-profile-jee-saml",
+    "description" : "app-profile-jee-saml",
+    "rootUrl" : "http://localhost:8080",
+    "adminUrl" : "http://localhost:8080/app-profile-jee-saml/",
+    "baseUrl" : "http://localhost:8080/app-profile-jee-saml/",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "171ee9fe-92bf-4080-8055-addfb6cc6d43",
+    "redirectUris" : [ ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "protocol" : "saml",
+    "attributes" : {
+      "saml.assertion.signature" : "false",
+      "saml.force.post.binding" : "false",
+      "saml.multivalued.roles" : "false",
+      "saml.signature.algorithm" : "RSA_SHA256",
+      "saml.encrypt" : "false",
+      "saml_force_name_id_format" : "false",
+      "saml.client.signature" : "false",
+      "saml.authnstatement" : "true",
+      "saml_name_id_format" : "username",
+      "saml.server.signature" : "false",
+      "saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
+    },
+    "fullScopeAllowed" : true,
+    "nodeReRegistrationTimeout" : -1,
+    "protocolMappers" : [ {
+      "id" : "f86b2e20-af97-4f3c-b427-3615fc4cfa3c",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "984fbaff-98ff-4893-8102-eef611b3d454",
+      "name" : "X500 surname",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-user-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "attribute.nameformat" : "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
+        "user.attribute" : "lastName",
+        "friendly.name" : "surname",
+        "attribute.name" : "urn:oid:2.5.4.4"
+      }
+    }, {
+      "id" : "0ddd2206-0fbf-4e21-bffc-ec0d73eb7725",
+      "name" : "X500 email",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-user-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "attribute.nameformat" : "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
+        "user.attribute" : "email",
+        "friendly.name" : "email",
+        "attribute.name" : "urn:oid:1.2.840.113549.1.9.1"
+      }
+    }, {
+      "id" : "acc82bfd-9033-4c2e-95e6-49017ae88a59",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "89ed44c1-7cf0-44f9-b098-d01b00d975b0",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "568b6670-1a5e-4996-8df8-733d0e52751d",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "591ddc4c-1482-4fd1-a9ff-826f4a4aee87",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "6f9bb8ee-e8a5-45ae-a5b5-4900453afe3c",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "79edf0eb-5ee6-4877-82c9-8bafe093bbb8",
+      "name" : "X500 givenName",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-user-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "attribute.nameformat" : "urn:oasis:names:tc:SAML:2.0:attrname-format:uri",
+        "user.attribute" : "firstName",
+        "friendly.name" : "givenName",
+        "attribute.name" : "urn:oid:2.5.4.42"
+      }
+    } ]
+  }, {
+    "id" : "534efc58-fca1-4c17-b99d-5a80723111e5",
+    "clientId" : "app-profile-jee",
+    "name" : "app-profile-jee",
+    "description" : "app-profile-jee",
+    "rootUrl" : "http://localhost:8080",
+    "adminUrl" : "/app-profile-jee/",
+    "baseUrl" : "http://localhost:8080/app-profile-jee/",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "4f36f31a-be9d-4f92-b982-425301bac5df",
+    "redirectUris" : [ "/app-profile-jee/*" ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "protocol" : "openid-connect",
+    "attributes" : {
+      "saml.assertion.signature" : "false",
+      "saml.force.post.binding" : "false",
+      "saml.multivalued.roles" : "false",
+      "saml.signature.algorithm" : "RSA_SHA256",
+      "saml.encrypt" : "false",
+      "saml_force_name_id_format" : "false",
+      "saml.client.signature" : "false",
+      "saml.authnstatement" : "true",
+      "saml_name_id_format" : "username",
+      "saml.server.signature" : "false",
+      "saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
+    },
+    "fullScopeAllowed" : true,
+    "nodeReRegistrationTimeout" : -1,
+    "protocolMappers" : [ {
+      "id" : "c9f8b614-ea9b-44f6-93f0-ce220ad6ddfe",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "56a03f82-87a9-4833-9549-d78d5b6f2103",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "f474ef62-f007-46a5-8962-8b1481bfb860",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "b541572f-436a-4408-bb85-d8b631601e47",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "306b0092-011a-49b4-a281-9242d10f97b6",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "c8b5e83d-4f44-4ba9-a536-ffceefa7b957",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    } ]
+  }, {
+    "id" : "201c1be5-776b-469a-879f-b709d8524ec1",
+    "clientId" : "admin-cli",
+    "name" : "${client_admin-cli}",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "fbe821af-b7ac-42af-b3af-9ba5b6c57bf4",
+    "redirectUris" : [ ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : false,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : true,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : true,
+    "frontchannelLogout" : false,
+    "attributes" : { },
+    "fullScopeAllowed" : false,
+    "nodeReRegistrationTimeout" : 0,
+    "protocolMappers" : [ {
+      "id" : "317718b2-3201-47f0-82c9-d2f7975fbe2e",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "6877e1b9-8cb1-4074-b600-95542c894c7e",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "e2f5fafb-6b11-42a6-a795-26f447c87a60",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "51aaed4e-254f-49eb-81d7-2dc591e0d46b",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "97ef8e04-cdb7-456e-b2e7-a9072c7af941",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "c1f3947d-fb60-48d7-88f4-93665325a0e4",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    } ]
+  }, {
+    "id" : "36526376-011d-49e9-8f17-88e7ebdcc975",
+    "clientId" : "app-html5",
+    "name" : "app-html5",
+    "description" : "app-html5",
+    "rootUrl" : "http://localhost:8080",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "c3d0b5c9-adbd-4948-9416-86d5cd66b714",
+    "redirectUris" : [ "/*" ],
+    "webOrigins" : [ "+" ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "protocol" : "openid-connect",
+    "attributes" : {
+      "saml.assertion.signature" : "false",
+      "saml.force.post.binding" : "false",
+      "saml.multivalued.roles" : "false",
+      "saml.signature.algorithm" : "RSA_SHA256",
+      "saml.encrypt" : "false",
+      "saml_force_name_id_format" : "false",
+      "saml.client.signature" : "false",
+      "saml.authnstatement" : "true",
+      "saml_name_id_format" : "username",
+      "saml.server.signature" : "false",
+      "saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
+    },
+    "fullScopeAllowed" : true,
+    "nodeReRegistrationTimeout" : -1,
+    "protocolMappers" : [ {
+      "id" : "6a34552a-e325-4890-8a11-ba1052a4c1f4",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "2e89927d-d26f-45c3-b2e4-792e7d047dd8",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "4a243cca-f719-4cfa-bcd3-95cd8c03eabd",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "66a9cc11-ea38-4506-a8e7-e8dfbc9a1cbd",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "6c659824-9beb-4dc1-a19a-6839d0b827a9",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "86f85aec-692e-40f7-933d-2bb60619c43e",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    } ]
+  }, {
+    "id" : "ee300a81-4085-4513-987b-70d1dfbb3677",
+    "clientId" : "broker",
+    "name" : "${client_broker}",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "dc5ff222-409b-4516-bdfb-b9dcad78f1be",
+    "redirectUris" : [ ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "attributes" : { },
+    "fullScopeAllowed" : false,
+    "nodeReRegistrationTimeout" : 0,
+    "protocolMappers" : [ {
+      "id" : "48bacfc9-0b3e-46f1-a17a-eee78bb756ce",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "1d0a728a-d9dc-4604-bac3-8ead48a9cb08",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "dc0af336-ed8f-4c81-8c6c-298bddcb46bf",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "a902457d-53c4-4d18-9ff4-e5e850816eec",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "ed4b6bf5-b6e7-4842-9c28-5479808a60ca",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "4aa2c376-1530-432a-89dc-d5761545bdcd",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    } ]
+  }, {
+    "id" : "095faf3a-958e-427e-940e-0c546daa2335",
+    "clientId" : "account",
+    "name" : "${client_account}",
+    "baseUrl" : "/auth/realms/Examples/account",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "16685ec3-779d-4c15-9024-4d5a41e6f8b5",
+    "defaultRoles" : [ "view-profile", "manage-account" ],
+    "redirectUris" : [ "/auth/realms/Examples/account/*" ],
+    "webOrigins" : [ ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : false,
+    "frontchannelLogout" : false,
+    "attributes" : { },
+    "fullScopeAllowed" : false,
+    "nodeReRegistrationTimeout" : 0,
+    "protocolMappers" : [ {
+      "id" : "2ee2fbea-ccb5-4113-b89f-14ef742aec8b",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "c19af2b3-8cf3-4a88-93fb-15a7c977560c",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "46dca0b5-7246-4745-91e8-c87e4f9b8d49",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "c1df7e2d-e052-4836-a323-969e114ac95f",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "65a4fee1-3641-4aa3-ac76-8829c7fc410f",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "2b7287cf-9345-4950-8c7c-13539cfd958c",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    } ]
+  }, {
+    "id" : "afb55cf7-28ca-4b01-80ce-39b36aef0109",
+    "clientId" : "app-profile-html5",
+    "name" : "app-profile-html5",
+    "description" : "app-profile-html5",
+    "rootUrl" : "http://localhost:8080/app-profile-html5",
+    "surrogateAuthRequired" : false,
+    "enabled" : true,
+    "clientAuthenticatorType" : "client-secret",
+    "secret" : "2a1879d3-c873-4705-aee9-70c7249991eb",
+    "redirectUris" : [ "/*" ],
+    "webOrigins" : [ "+" ],
+    "notBefore" : 0,
+    "bearerOnly" : false,
+    "consentRequired" : false,
+    "standardFlowEnabled" : true,
+    "implicitFlowEnabled" : false,
+    "directAccessGrantsEnabled" : false,
+    "serviceAccountsEnabled" : false,
+    "publicClient" : true,
+    "frontchannelLogout" : false,
+    "protocol" : "openid-connect",
+    "attributes" : {
+      "saml.assertion.signature" : "false",
+      "saml.force.post.binding" : "false",
+      "saml.multivalued.roles" : "false",
+      "saml.signature.algorithm" : "RSA_SHA256",
+      "saml.encrypt" : "false",
+      "saml_force_name_id_format" : "false",
+      "saml.client.signature" : "false",
+      "saml.authnstatement" : "true",
+      "saml_name_id_format" : "username",
+      "saml.server.signature" : "false",
+      "saml_signature_canonicalization_method" : "http://www.w3.org/2001/10/xml-exc-c14n#"
+    },
+    "fullScopeAllowed" : true,
+    "nodeReRegistrationTimeout" : -1,
+    "protocolMappers" : [ {
+      "id" : "3e17ba98-4974-4361-9333-f69b5f1658cb",
+      "name" : "full name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-full-name-mapper",
+      "consentRequired" : true,
+      "consentText" : "${fullName}",
+      "config" : {
+        "id.token.claim" : "true",
+        "access.token.claim" : "true"
+      }
+    }, {
+      "id" : "f7408fb9-f658-48be-97fd-00a1ef64ba13",
+      "name" : "role list",
+      "protocol" : "saml",
+      "protocolMapper" : "saml-role-list-mapper",
+      "consentRequired" : false,
+      "config" : {
+        "single" : "false",
+        "attribute.nameformat" : "Basic",
+        "attribute.name" : "Role"
+      }
+    }, {
+      "id" : "8be7ab55-cac3-4ec7-b3b8-0a78aa89b42f",
+      "name" : "username",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${username}",
+      "config" : {
+        "user.attribute" : "username",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "preferred_username",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "d46942f2-b378-4b64-83b1-e68860277ef7",
+      "name" : "email",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${email}",
+      "config" : {
+        "user.attribute" : "email",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "email",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "f80e03ec-f30a-4eeb-9825-16f49313c18b",
+      "name" : "given name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${givenName}",
+      "config" : {
+        "user.attribute" : "firstName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "given_name",
+        "jsonType.label" : "String"
+      }
+    }, {
+      "id" : "1a4e1d8e-7555-4363-b909-9467bd49bb7d",
+      "name" : "family name",
+      "protocol" : "openid-connect",
+      "protocolMapper" : "oidc-usermodel-property-mapper",
+      "consentRequired" : true,
+      "consentText" : "${familyName}",
+      "config" : {
+        "user.attribute" : "lastName",
+        "id.token.claim" : "true",
+        "access.token.claim" : "true",
+        "claim.name" : "family_name",
+        "jsonType.label" : "String"
+      }
+    } ]
+  } ],
+  "browserSecurityHeaders" : {
+    "contentSecurityPolicy" : "frame-src 'self'",
+    "xFrameOptions" : "SAMEORIGIN"
+  },
+  "smtpServer" : { },
+  "eventsEnabled" : false,
+  "eventsListeners" : [ "jboss-logging" ],
+  "enabledEventTypes" : [ ],
+  "adminEventsEnabled" : false,
+  "adminEventsDetailsEnabled" : false,
+  "identityFederationEnabled" : false,
+  "internationalizationEnabled" : false,
+  "supportedLocales" : [ ],
+  "authenticationFlows" : [ {
+    "alias" : "Handle Existing Account",
+    "description" : "Handle what to do if there is existing account with same email/username like authenticated identity provider",
+    "providerId" : "basic-flow",
+    "topLevel" : false,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "idp-confirm-link",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "idp-email-verification",
+      "autheticatorFlow" : false,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    }, {
+      "flowAlias" : "Verify Existing Account by Re-authentication",
+      "autheticatorFlow" : true,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 30
+    } ]
+  }, {
+    "alias" : "Verify Existing Account by Re-authentication",
+    "description" : "Reauthentication of existing account",
+    "providerId" : "basic-flow",
+    "topLevel" : false,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "idp-username-password-form",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "auth-otp-form",
+      "autheticatorFlow" : false,
+      "requirement" : "OPTIONAL",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    } ]
+  }, {
+    "alias" : "browser",
+    "description" : "browser based authentication",
+    "providerId" : "basic-flow",
+    "topLevel" : true,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "auth-cookie",
+      "autheticatorFlow" : false,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "auth-spnego",
+      "autheticatorFlow" : false,
+      "requirement" : "DISABLED",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    }, {
+      "flowAlias" : "forms",
+      "autheticatorFlow" : true,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 30
+    } ]
+  }, {
+    "alias" : "clients",
+    "description" : "Base authentication for clients",
+    "providerId" : "client-flow",
+    "topLevel" : true,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "client-secret",
+      "autheticatorFlow" : false,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "client-jwt",
+      "autheticatorFlow" : false,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    } ]
+  }, {
+    "alias" : "direct grant",
+    "description" : "OpenID Connect Resource Owner Grant",
+    "providerId" : "basic-flow",
+    "topLevel" : true,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "direct-grant-validate-username",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "direct-grant-validate-password",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    }, {
+      "authenticator" : "direct-grant-validate-otp",
+      "autheticatorFlow" : false,
+      "requirement" : "OPTIONAL",
+      "userSetupAllowed" : false,
+      "priority" : 30
+    } ]
+  }, {
+    "alias" : "first broker login",
+    "description" : "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account",
+    "providerId" : "basic-flow",
+    "topLevel" : true,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticatorConfig" : "review profile config",
+      "authenticator" : "idp-review-profile",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticatorConfig" : "create unique user config",
+      "authenticator" : "idp-create-user-if-unique",
+      "autheticatorFlow" : false,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    }, {
+      "flowAlias" : "Handle Existing Account",
+      "autheticatorFlow" : true,
+      "requirement" : "ALTERNATIVE",
+      "userSetupAllowed" : false,
+      "priority" : 30
+    } ]
+  }, {
+    "alias" : "forms",
+    "description" : "Username, password, otp and other auth forms.",
+    "providerId" : "basic-flow",
+    "topLevel" : false,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "auth-username-password-form",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "auth-otp-form",
+      "autheticatorFlow" : false,
+      "requirement" : "OPTIONAL",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    } ]
+  }, {
+    "alias" : "registration",
+    "description" : "registration flow",
+    "providerId" : "basic-flow",
+    "topLevel" : true,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "registration-page-form",
+      "flowAlias" : "registration form",
+      "autheticatorFlow" : true,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    } ]
+  }, {
+    "alias" : "registration form",
+    "description" : "registration form",
+    "providerId" : "form-flow",
+    "topLevel" : false,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "registration-user-creation",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    }, {
+      "authenticator" : "registration-profile-action",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 40
+    }, {
+      "authenticator" : "registration-password-action",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 50
+    }, {
+      "authenticator" : "registration-recaptcha-action",
+      "autheticatorFlow" : false,
+      "requirement" : "DISABLED",
+      "userSetupAllowed" : false,
+      "priority" : 60
+    } ]
+  }, {
+    "alias" : "reset credentials",
+    "description" : "Reset credentials for a user if they forgot their password or something",
+    "providerId" : "basic-flow",
+    "topLevel" : true,
+    "builtIn" : true,
+    "authenticationExecutions" : [ {
+      "authenticator" : "reset-credentials-choose-user",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 10
+    }, {
+      "authenticator" : "reset-credential-email",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 20
+    }, {
+      "authenticator" : "reset-password",
+      "autheticatorFlow" : false,
+      "requirement" : "REQUIRED",
+      "userSetupAllowed" : false,
+      "priority" : 30
+    }, {
+      "authenticator" : "reset-otp",
+      "autheticatorFlow" : false,
+      "requirement" : "OPTIONAL",
+      "userSetupAllowed" : false,
+      "priority" : 40
+    } ]
+  } ],
+  "authenticatorConfig" : [ {
+    "alias" : "create unique user config",
+    "config" : {
+      "require.password.update.after.registration" : "false"
+    }
+  }, {
+    "alias" : "review profile config",
+    "config" : {
+      "update.profile.on.first.login" : "missing"
+    }
+  } ],
+  "requiredActions" : [ {
+    "alias" : "CONFIGURE_TOTP",
+    "name" : "Configure Totp",
+    "providerId" : "CONFIGURE_TOTP",
+    "enabled" : true,
+    "defaultAction" : false,
+    "config" : { }
+  }, {
+    "alias" : "UPDATE_PASSWORD",
+    "name" : "Update Password",
+    "providerId" : "UPDATE_PASSWORD",
+    "enabled" : true,
+    "defaultAction" : false,
+    "config" : { }
+  }, {
+    "alias" : "UPDATE_PROFILE",
+    "name" : "Update Profile",
+    "providerId" : "UPDATE_PROFILE",
+    "enabled" : true,
+    "defaultAction" : false,
+    "config" : { }
+  }, {
+    "alias" : "VERIFY_EMAIL",
+    "name" : "Verify Email",
+    "providerId" : "VERIFY_EMAIL",
+    "enabled" : true,
+    "defaultAction" : false,
+    "config" : { }
+  }, {
+    "alias" : "terms_and_conditions",
+    "name" : "Terms and Conditions",
+    "providerId" : "terms_and_conditions",
+    "enabled" : false,
+    "defaultAction" : false,
+    "config" : { }
+  } ],
+  "browserFlow" : "browser",
+  "registrationFlow" : "registration",
+  "directGrantFlow" : "direct grant",
+  "resetCredentialsFlow" : "reset credentials",
+  "clientAuthenticationFlow" : "clients"
+}
\ No newline at end of file
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/resources/log4j.properties b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/resources/log4j.properties
new file mode 100644
index 0000000..7c833ee
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/resources/log4j.properties
@@ -0,0 +1,30 @@
+log4j.rootLogger=INFO, DEFAULT
+
+# TEST RUN
+
+log4j.appender.DEFAULT=org.apache.log4j.ConsoleAppender
+log4j.appender.DEFAULT.layout=org.apache.log4j.PatternLayout
+log4j.appender.DEFAULT.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] [%t] %m%n
+
+log4j.logger.org.keycloak=OFF
+log4j.logger.org.keycloak.testsuite=INFO
+
+# HtmlUnit
+log4j.logger.org.keycloak.testsuite.performance.htmlunit.HtmlUnitLoginLogoutPerfTest=${logging.loginlogout}
+log4j.logger.com.gargoylesoftware.htmlunit=OFF
+
+# HttpClient
+log4j.logger.org.keycloak.testsuite.performance.httpclient.HttpClientLoginLogoutPerfTest=${logging.loginlogout}
+log4j.logger.org.keycloak.testsuite.performance.httpclient.HttpClientPerformanceTest$CustomRedirectStrategy=OFF
+
+
+# RESULTS 
+
+log4j.appender.RESULTS=org.apache.log4j.FileAppender
+log4j.appender.RESULTS.file=target/results.log
+log4j.appender.RESULTS.immediateFlush=true
+log4j.appender.RESULTS.append=true
+log4j.appender.RESULTS.layout=org.apache.log4j.PatternLayout
+log4j.appender.RESULTS.layout.ConversionPattern=%d{HHmmss} %m%n
+
+log4j.logger.org.keycloak.testsuite.performance.metrics.impl.ResultsWithThroughput=INFO, RESULTS
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/resources/xslt/arquillian.xsl b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/resources/xslt/arquillian.xsl
new file mode 100644
index 0000000..9da9341
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/resources/xslt/arquillian.xsl
@@ -0,0 +1,51 @@
+<!--
+~ 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.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xalan="http://xml.apache.org/xalan"
+                xmlns:a="http://jboss.org/schema/arquillian"
+                version="2.0"
+                exclude-result-prefixes="xalan a">
+
+    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
+    <xsl:strip-space elements="*"/>
+
+    <xsl:template match="/a:arquillian">
+        <xsl:copy>
+            <xsl:apply-templates select="node()|@*"/>
+            
+            <container qualifier="app-server-remote" mode="${{app.server.mode}}" >
+                <configuration>
+                    <property name="adapterImplClass">org.jboss.as.arquillian.container.remote.RemoteDeployableContainer</property>
+
+                    <property name="managementAddress">${app.server.host}</property>
+                    <property name="managementPort">${app.server.management.port}</property>
+                    <property name="username">admin</property>
+                    <property name="password">admin</property>
+                </configuration>
+            </container>
+            
+        </xsl:copy>
+    </xsl:template>
+
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()" />
+        </xsl:copy>
+    </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/testsuite/integration-arquillian/tests/other/adapters/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/pom.xml
index 4189dad..97f3679 100644
--- a/testsuite/integration-arquillian/tests/other/adapters/pom.xml
+++ b/testsuite/integration-arquillian/tests/other/adapters/pom.xml
@@ -42,6 +42,7 @@
         
         <app.server.mode>manual</app.server.mode>
         
+        <app.server.host>localhost</app.server.host>
         <app.server.port.offset>200</app.server.port.offset>
         <app.server.http.port>8280</app.server.http.port>
         <app.server.https.port>8643</app.server.https.port>
@@ -143,6 +144,7 @@
                             
                                 <app.server.mode>${app.server.mode}</app.server.mode>
                             
+                                <app.server.host>${app.server.host}</app.server.host>
                                 <app.server.port.offset>${app.server.port.offset}</app.server.port.offset>
                                 <app.server.http.port>${app.server.http.port}</app.server.http.port>
                                 <app.server.https.port>${app.server.https.port}</app.server.https.port>
diff --git a/testsuite/integration-arquillian/tests/pom.xml b/testsuite/integration-arquillian/tests/pom.xml
index 4d53e74..cf7a3d4 100755
--- a/testsuite/integration-arquillian/tests/pom.xml
+++ b/testsuite/integration-arquillian/tests/pom.xml
@@ -46,6 +46,7 @@
         <auth.server.home>${containers.home}/${auth.server.container}</auth.server.home>
         <auth.server.config.dir>${auth.server.home}</auth.server.config.dir>
 
+        <auth.server.host>localhost</auth.server.host>
         <auth.server.port.offset>100</auth.server.port.offset>
         <auth.server.http.port>8180</auth.server.http.port>
         <auth.server.events.http.port>8089</auth.server.events.http.port>
@@ -60,6 +61,8 @@
         <auth.server.jboss.skip.unpack>${auth.server.undertow}</auth.server.jboss.skip.unpack>
         <auth.server.jboss.startup.timeout>300</auth.server.jboss.startup.timeout>
 
+        <auth.server.remote>false</auth.server.remote>
+    
         <adapter.test.props/>
         <examples.home>${project.build.directory}/examples</examples.home>
 
@@ -142,6 +145,7 @@
                             <auth.server.home>${auth.server.home}</auth.server.home>
                             <auth.server.java.home>${auth.server.java.home}</auth.server.java.home>
 
+                            <auth.server.host>${auth.server.host}</auth.server.host>
                             <auth.server.port.offset>${auth.server.port.offset}</auth.server.port.offset>
                             <auth.server.http.port>${auth.server.http.port}</auth.server.http.port>
                             <auth.server.events.http.port>${auth.server.events.http.port}</auth.server.events.http.port>
@@ -154,6 +158,8 @@
                             <frontend.console.output>${frontend.console.output}</frontend.console.output>
                             <backends.console.output>${backend.console.output}</backends.console.output>
 
+                            <auth.server.remote>${auth.server.remote}</auth.server.remote>
+
                             <adapter.test.props>${adapter.test.props}</adapter.test.props>
 
                             <testsuite.constants>${testsuite.constants}</testsuite.constants>
@@ -177,6 +183,23 @@
     <profiles>
 
         <profile>
+            <id>auth-server-remote</id>
+            <properties>
+                <auth.server>remote</auth.server>
+                <auth.server.remote>true</auth.server.remote>
+                <auth.server.undertow>false</auth.server.undertow>
+                <auth.server.jboss.skip.unpack>true</auth.server.jboss.skip.unpack>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>org.wildfly</groupId>
+                    <artifactId>wildfly-arquillian-container-remote</artifactId>
+                    <version>${arquillian-wildfly-container.version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
+            
+        <profile>
             <id>auth-server-wildfly</id>
             <properties>
                 <auth.server>wildfly</auth.server>
@@ -866,6 +889,17 @@
             </build>
         </profile>
 
+        <profile>
+            <id>no-offset</id>
+            <properties>
+                <auth.server.port.offset>0</auth.server.port.offset>
+                <auth.server.http.port>8080</auth.server.http.port>
+                <auth.server.https.port>8443</auth.server.https.port>
+                <auth.server.management.port>9990</auth.server.management.port>
+                <auth.server.management.port.jmx>9999</auth.server.management.port.jmx>
+            </properties>
+        </profile>
+        
     </profiles>
     
 </project>