From 092562fb9442ff5328455f1065d32e5a1bc95c00 Mon Sep 17 00:00:00 2001 From: Stan Silvert Date: Fri, 17 Jul 2015 12:23:10 -0400 Subject: [PATCH] KEYCLOAK-1414 Add CLI script for installing JBoss/WildFly/EAP adapters. --- .../as7-eap6-adapter/as7-adapter-zip/assembly.xml | 6 ++++++ .../as7-eap6-adapter/eap6-adapter-zip/assembly.xml | 6 ++++++ distribution/adapters/shared-cli/adapter-install.cli | 4 ++++ .../wf8-adapter/wf8-adapter-zip/assembly.xml | 6 ++++++ .../wf9-adapter/wf9-adapter-zip/assembly.xml | 6 ++++++ docbook/reference/en/en-US/modules/jboss-adapter.xml | 12 ++++++++++-- 6 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 distribution/adapters/shared-cli/adapter-install.cli diff --git a/distribution/adapters/as7-eap6-adapter/as7-adapter-zip/assembly.xml b/distribution/adapters/as7-eap6-adapter/as7-adapter-zip/assembly.xml index 094e4268d4..59ae243e0c 100755 --- a/distribution/adapters/as7-eap6-adapter/as7-adapter-zip/assembly.xml +++ b/distribution/adapters/as7-eap6-adapter/as7-adapter-zip/assembly.xml @@ -27,4 +27,10 @@ modules + + + ../../shared-cli/adapter-install.cli + bin + + diff --git a/distribution/adapters/as7-eap6-adapter/eap6-adapter-zip/assembly.xml b/distribution/adapters/as7-eap6-adapter/eap6-adapter-zip/assembly.xml index 4e29b1b9c3..0f6c462771 100755 --- a/distribution/adapters/as7-eap6-adapter/eap6-adapter-zip/assembly.xml +++ b/distribution/adapters/as7-eap6-adapter/eap6-adapter-zip/assembly.xml @@ -27,4 +27,10 @@ modules/system/layers/base + + + ../../shared-cli/adapter-install.cli + bin + + diff --git a/distribution/adapters/shared-cli/adapter-install.cli b/distribution/adapters/shared-cli/adapter-install.cli new file mode 100644 index 0000000000..b4a396ba7a --- /dev/null +++ b/distribution/adapters/shared-cli/adapter-install.cli @@ -0,0 +1,4 @@ +/subsystem=security/security-domain=keycloak/:add +/subsystem=security/security-domain=keycloak/authentication=classic/:add(login-modules=[{ "code" => "org.keycloak.adapters.jboss.KeycloakLoginModule","flag" => "required"}]) +/extension=org.keycloak.keycloak-adapter-subsystem/:add(module=org.keycloak.keycloak-adapter-subsystem) +/subsystem=keycloak:add \ No newline at end of file diff --git a/distribution/adapters/wf8-adapter/wf8-adapter-zip/assembly.xml b/distribution/adapters/wf8-adapter/wf8-adapter-zip/assembly.xml index 3f5d8878d9..da4e127bc4 100755 --- a/distribution/adapters/wf8-adapter/wf8-adapter-zip/assembly.xml +++ b/distribution/adapters/wf8-adapter/wf8-adapter-zip/assembly.xml @@ -28,4 +28,10 @@ modules/system/layers/base + + + ../../shared-cli/adapter-install.cli + bin + + diff --git a/distribution/adapters/wf9-adapter/wf9-adapter-zip/assembly.xml b/distribution/adapters/wf9-adapter/wf9-adapter-zip/assembly.xml index e81d4e4e0f..764b76dbba 100755 --- a/distribution/adapters/wf9-adapter/wf9-adapter-zip/assembly.xml +++ b/distribution/adapters/wf9-adapter/wf9-adapter-zip/assembly.xml @@ -27,4 +27,10 @@ modules/system/layers/base + + + ../../shared-cli/adapter-install.cli + bin + + diff --git a/docbook/reference/en/en-US/modules/jboss-adapter.xml b/docbook/reference/en/en-US/modules/jboss-adapter.xml index 08949b4ca5..e3b1c913d1 100755 --- a/docbook/reference/en/en-US/modules/jboss-adapter.xml +++ b/docbook/reference/en/en-US/modules/jboss-adapter.xml @@ -48,6 +48,15 @@ $ unzip keycloak-as7-adapter-dist.zip After adding the Keycloak modules, you must then enable the Keycloak Subsystem within your app server's server configuration: domain.xml or standalone.xml. + + There is a CLI script that will help you modify your server configuration. Start the server and run the script + from the server's bin directory: + +$ cd $JBOSS_HOME/bin +$ jboss-cli.sh -c --file=adapter-install.cli + + The script will add the extension, subsystem, and optional security-domain as described below. + @@ -65,8 +74,7 @@ $ unzip keycloak-as7-adapter-dist.zip - Finally, you must specify a shared keycloak security domain. - This security domain should be used with EJBs and other components when you need the security context created + The keycloak security domain should be used with EJBs and other components when you need the security context created in the secured web tier to be propagated to the EJBs (other EE component) you are invoking. Otherwise this configuration is optional.