keycloak-uncached

Details

diff --git a/distribution/modules/pom.xml b/distribution/modules/pom.xml
index 40e03a2..5a3dbb0 100755
--- a/distribution/modules/pom.xml
+++ b/distribution/modules/pom.xml
@@ -1,27 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<!--
-~ JBoss, Home of Professional Open Source.
-~ Copyright 2010, Red Hat, Inc., and individual contributors
-~ as indicated by the @author tags. See the copyright.txt file in the
-~ distribution for a full listing of individual contributors.
-~
-~ This is free software; you can redistribute it and/or modify it
-~ under the terms of the GNU Lesser General Public License as
-~ published by the Free Software Foundation; either version 2.1 of
-~ the License, or (at your option) any later version.
-~
-~ This software is distributed in the hope that it will be useful,
-~ but WITHOUT ANY WARRANTY; without even the implied warranty of
-~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-~ Lesser General Public License for more details.
-~
-~ You should have received a copy of the GNU Lesser General Public
-~ License along with this software; if not, write to the Free
-~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
-
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -86,7 +64,6 @@
         <dependency>
             <groupId>org.wildfly.core</groupId>
             <artifactId>wildfly-cli</artifactId>
-            <version>${wildfly.core.version}</version>
         </dependency>
         <dependency>
             <groupId>org.picketlink</groupId>
diff --git a/docbook/reference/en/en-US/modules/server-installation.xml b/docbook/reference/en/en-US/modules/server-installation.xml
index 74e5411..360f57e 100755
--- a/docbook/reference/en/en-US/modules/server-installation.xml
+++ b/docbook/reference/en/en-US/modules/server-installation.xml
@@ -799,7 +799,7 @@ keycloak-war-dist-all-&project.version;/
             <title>Using CLI and CLI GUI with the Keycloak Subsystem</title>
             <para>
                 Servers can also be added/removed or enabled/disabled at runtime using the <ulink url="https://developer.jboss.org/wiki/CommandLineInterface">CLI</ulink> or 
-                <ulink url="https://developer.jboss.org/wiki/AGUIForTheCommandLineInterface">CLI GUI</ulink> tool.  These are tools that ship with WildFly and also with
+                <ulink url="https://developer.jboss.org/wiki/AGUIForTheCommandLineInterface">CLI GUI</ulink> tool.  These are tools that ship with WildFly/EAP and also with
                 the Keycloak Appliance installation.  See <ulink url="https://developer.jboss.org/wiki/CommandLineInterface">CLI</ulink> or 
                 <ulink url="https://developer.jboss.org/wiki/AGUIForTheCommandLineInterface">CLI GUI</ulink> documentation to learn more about how to start the tools,
                 issue commands, and create CLI scripts.
@@ -812,7 +812,7 @@ cd <APPLIANCE_INSTALL_DIR>/keycloak/bin
 or
 ./jboss.cli.bat --gui]]>
 </programlisting>
-<note>Your Keycloak server must be running to start in --gui mode.</note>
+<note>Your server must be running to start in --gui mode.</note>
 </para>  
             <section>
                 <title>Basic CLI Commands</title>
@@ -842,7 +842,7 @@ The Keycloak server will be immediately deployed or undeployed, but not deleted.
                 <title>Uploading extra configuration using CLI</title>
                 <para>
                     The WildFly Keycloak subsystem allows you to upload keycloak-server.json, provider jars, and theme jars to a Keycloak server instance.  The
-                    CLI operations for this are "update-server-config" and "add-provider".  You may use plain or CLI scripts for these operations.  The following
+                    CLI operations for this are "update-server-config" and "add-provider".  You may use CLI, CLI GUI, or CLI scripts for these operations.  The following
                     examples are shown using <ulink url="https://developer.jboss.org/wiki/AGUIForTheCommandLineInterface">CLI GUI</ulink> for clarity.
                 </para>
                 <para>
@@ -874,6 +874,39 @@ The Keycloak server will be immediately deployed or undeployed, but not deleted.
                     <imagedata fileref="images/add-provider-dialog.png"/>
                 </para>
             </section>
+            <section>
+                <title>Working with overlays</title>
+                <para>
+                    When you upload a provider jar, theme jar, or keycloak-server.json file, you are creating an overlay.  That is, the file is "overlayed"
+                    onto the Keycloak server at deploy time.  There are two additional operations that help you manage these overlays.  They are "list-overlays" and
+                    "remove-overlay".  Here are CLI examples of these operations.
+                </para>
+<para>
+    <programlisting>
+/subsystem=keycloak/auth-server=my-auth-server/:list-overlays
+{
+    "outcome" => "success",
+    "result" => [
+        "/WEB-INF/classes/META-INF/keycloak-server.json",
+        "/WEB-INF/lib/federation-properties-example.jar"
+    ],
+}</programlisting>
+    <programlisting>
+/subsystem=keycloak/auth-server=my-auth-server/:remove-overlay(overlay-file-path=/WEB-INF/lib/federation-properties-example.jar,redeploy=true)
+{
+    "outcome" => "success",
+}</programlisting>
+</para>
+                <para>
+                    <note>
+                        Notice in the "list-overlays" operation, the full path to the server config is 
+                        /WEB-INF/classes/META-INF/keycloak-server.json.  This is always the uploaded path for an "update-server-config" operation.
+                        If you remove this overlay, the Keycloak server will revert to its default keycloak-server.json.  If you have a 
+                        keycloak-server.json file in your &lt;WILDFLY_HOME&gt;/standalone/configuration directory, it will always take precedence
+                        over both the default and the overlay.
+                    </note>
+                </para>
+            </section>
         </section>
         <section>
             <title>Adding a Keycloak server in Domain Mode</title>
diff --git a/docbook/reference/en/images/add-provider-dialog.png b/docbook/reference/en/images/add-provider-dialog.png
index ee1c44a..976e5e1 100644
Binary files a/docbook/reference/en/images/add-provider-dialog.png and b/docbook/reference/en/images/add-provider-dialog.png differ
diff --git a/docbook/reference/en/images/add-provider-select.png b/docbook/reference/en/images/add-provider-select.png
index c0f6766..1c2e51a 100644
Binary files a/docbook/reference/en/images/add-provider-select.png and b/docbook/reference/en/images/add-provider-select.png differ
diff --git a/docbook/reference/en/images/update-server-config-dialog.png b/docbook/reference/en/images/update-server-config-dialog.png
index 9c52546..5b07227 100644
Binary files a/docbook/reference/en/images/update-server-config-dialog.png and b/docbook/reference/en/images/update-server-config-dialog.png differ
diff --git a/docbook/reference/en/images/update-server-config-select.png b/docbook/reference/en/images/update-server-config-select.png
index 2af89df..b9156e6 100644
Binary files a/docbook/reference/en/images/update-server-config-select.png and b/docbook/reference/en/images/update-server-config-select.png differ
diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/authserver/AbstractAddOverlayHandler.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/authserver/AbstractAddOverlayHandler.java
index a53be47..c701cf2 100644
--- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/authserver/AbstractAddOverlayHandler.java
+++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/authserver/AbstractAddOverlayHandler.java
@@ -25,7 +25,6 @@ import org.jboss.as.controller.ProcessType;
 import org.jboss.as.controller.SimpleAttributeDefinition;
 import org.jboss.as.controller.SimpleAttributeDefinitionBuilder;
 import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DEPLOYMENT_OVERLAY;
 import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REMOVE;
 import org.jboss.as.controller.operations.common.Util;
 import org.jboss.as.controller.registry.Resource;
@@ -106,7 +105,6 @@ public abstract class AbstractAddOverlayHandler implements OperationStepHandler 
     static void removeContent(OperationContext context, PathAddress overlayAddress, String overlayPath) {
         PathAddress contentAddress = overlayAddress.append("content", overlayPath);
         ModelNode operation = Util.createRemoveOperation(contentAddress);
-        System.out.println("operation=" + operation);
         context.addStep(operation, getHandler(context, contentAddress, REMOVE), OperationContext.Stage.MODEL);
     }
 
diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/authserver/AuthServerUtil.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/authserver/AuthServerUtil.java
index 9d36ff4..25b632a 100644
--- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/authserver/AuthServerUtil.java
+++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/authserver/AuthServerUtil.java
@@ -152,6 +152,7 @@ public class AuthServerUtil {
     }
 
     private static void addDeploymentAction(OperationContext context, String operation, String deploymentName) {
+        if (!context.isNormalServer()) return;
         PathAddress deploymentAddress = deploymentAddress(deploymentName);
         ModelNode op = Util.createOperation(operation, deploymentAddress);
         op.get(RUNTIME_NAME).set(deploymentName);

pom.xml 5(+5 -0)

diff --git a/pom.xml b/pom.xml
index b1d5615..ffeaa5e 100755
--- a/pom.xml
+++ b/pom.xml
@@ -472,6 +472,11 @@
             </dependency>
             <dependency>
                 <groupId>org.wildfly.core</groupId>
+                <artifactId>wildfly-cli</artifactId>
+                <version>${wildfly.core.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.wildfly.core</groupId>
                 <artifactId>wildfly-core-feature-pack</artifactId>
                 <type>zip</type>
                 <version>${wildfly.core.version}</version>