diff --git a/distribution/modules/pom.xml b/distribution/modules/pom.xml index 40e03a24de..5a3dbb0bc7 100755 --- a/distribution/modules/pom.xml +++ b/distribution/modules/pom.xml @@ -1,27 +1,5 @@ - - @@ -86,7 +64,6 @@ org.wildfly.core wildfly-cli - ${wildfly.core.version} org.picketlink diff --git a/docbook/reference/en/en-US/modules/server-installation.xml b/docbook/reference/en/en-US/modules/server-installation.xml index 74e5411f51..360f57e7a9 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;/ Using CLI and CLI GUI with the Keycloak Subsystem Servers can also be added/removed or enabled/disabled at runtime using the CLI or - CLI GUI tool. These are tools that ship with WildFly and also with + CLI GUI tool. These are tools that ship with WildFly/EAP and also with the Keycloak Appliance installation. See CLI or CLI GUI documentation to learn more about how to start the tools, issue commands, and create CLI scripts. @@ -812,7 +812,7 @@ cd /keycloak/bin or ./jboss.cli.bat --gui]]> -Your Keycloak server must be running to start in --gui mode. +Your server must be running to start in --gui mode.
Basic CLI Commands @@ -842,7 +842,7 @@ The Keycloak server will be immediately deployed or undeployed, but not deleted. Uploading extra configuration using CLI 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 CLI GUI for clarity. @@ -874,6 +874,39 @@ The Keycloak server will be immediately deployed or undeployed, but not deleted.
+
+ Working with overlays + + 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. + + + +/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" + ], +} + +/subsystem=keycloak/auth-server=my-auth-server/:remove-overlay(overlay-file-path=/WEB-INF/lib/federation-properties-example.jar,redeploy=true) +{ + "outcome" => "success", +} + + + + 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 <WILDFLY_HOME>/standalone/configuration directory, it will always take precedence + over both the default and the overlay. + + +
Adding a Keycloak server in Domain Mode diff --git a/docbook/reference/en/images/add-provider-dialog.png b/docbook/reference/en/images/add-provider-dialog.png index ee1c44a38d..976e5e148d 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 c0f67661ba..1c2e51af89 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 9c52546c65..5b07227859 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 2af89df7d0..b9156e6f57 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 a53be47440..c701cf2232 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 9d36ff468a..25b632a85a 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); diff --git a/pom.xml b/pom.xml index b1d5615e08..ffeaa5eebe 100755 --- a/pom.xml +++ b/pom.xml @@ -470,6 +470,11 @@ pom ${wildfly.core.version} + + org.wildfly.core + wildfly-cli + ${wildfly.core.version} + org.wildfly.core wildfly-core-feature-pack