From c660be7bbbc8abe482f0613f9cc5e954bf26aaed Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Wed, 29 Oct 2014 14:48:10 -0400 Subject: [PATCH] tomcat7 docbook --- docbook/reference/en/en-US/master.xml | 2 + .../reference/en/en-US/modules/Overview.xml | 2 +- .../en/en-US/modules/jboss-adapter.xml | 4 +- .../en/en-US/modules/tomcat-adapter.xml | 94 +++++++++++++++++++ 4 files changed, 99 insertions(+), 3 deletions(-) create mode 100755 docbook/reference/en/en-US/modules/tomcat-adapter.xml diff --git a/docbook/reference/en/en-US/master.xml b/docbook/reference/en/en-US/master.xml index c0d39db27e..6a704151ec 100755 --- a/docbook/reference/en/en-US/master.xml +++ b/docbook/reference/en/en-US/master.xml @@ -11,6 +11,7 @@ + @@ -83,6 +84,7 @@ This one is short &AdapterConfig; &JBossAdapter; + &TomcatAdapter; &JavascriptAdapter; &InstalledApplications; &Logout; diff --git a/docbook/reference/en/en-US/modules/Overview.xml b/docbook/reference/en/en-US/modules/Overview.xml index 3361e0dbc1..9ef7451c14 100755 --- a/docbook/reference/en/en-US/modules/Overview.xml +++ b/docbook/reference/en/en-US/modules/Overview.xml @@ -98,7 +98,7 @@ Multitenancy support. You can host and manage multiple realms for multiple organizations. - Supports JBoss AS7, EAP 6.x, Wildfly and Pure JavaScript applications. Plans to support Node.js, RAILS, GRAILS, and other non-Java deployments + Supports JBoss AS7, EAP 6.x, Wildfly, Tomcat 7 and Pure JavaScript applications. Plans to support Node.js, RAILS, GRAILS, and other non-Java deployments diff --git a/docbook/reference/en/en-US/modules/jboss-adapter.xml b/docbook/reference/en/en-US/modules/jboss-adapter.xml index c1413977c3..795b74ffd1 100755 --- a/docbook/reference/en/en-US/modules/jboss-adapter.xml +++ b/docbook/reference/en/en-US/modules/jboss-adapter.xml @@ -10,7 +10,7 @@
Adapter Installation - This is a adapter zip file for AS7, EAP, and Wildfly in the adapters/ directory in the Keycloak + There is a adapter zip file for AS7, EAP, and Wildfly in the adapters/ directory in the Keycloak distribution. @@ -135,7 +135,7 @@ public class CustomerService {
- Per WAR Configuration + Required Per WAR Configuration This section describes how to secure a WAR directly by adding config and editing files within your WAR package. diff --git a/docbook/reference/en/en-US/modules/tomcat-adapter.xml b/docbook/reference/en/en-US/modules/tomcat-adapter.xml new file mode 100755 index 0000000000..b9c0043f8e --- /dev/null +++ b/docbook/reference/en/en-US/modules/tomcat-adapter.xml @@ -0,0 +1,94 @@ +
+ Tomcat 7 Adapter + + To be able to secure WAR apps deployed on Tomcat 7 you must install the Keycloak Tomcat 7 adapter + into your Tomcat installation. You then have to provide some extra configuration in each WAR you deploy to + Tomcat. Let's go over these steps. + +
+ Adapter Installation + + There is a adapter zip file for Tomcat 7 in the adapters/ directory in the Keycloak appliance + or war distribution. You must unzip this file into Tomcat's lib/ directory. Including + adapter's jars within your WEB-INF/lib directory will not work! The Keycloak adapter is implemented as a Valve + and valve code must reside in Tomcat's main lib/ directory. + + + +$ cd $TOMCAT_HOME/lib +$ unzip keycloak-tomcat7-adapter-dist.zip + + +
+ +
+ Required Per WAR Configuration + + This section describes how to secure a WAR directly by adding config and editing files within your WAR package. + + + The first thing you must do is create a META-INF/context.xml file in your WAR package. This is + a Tomcat specific config file and you must define a Keycloak specific Valve. + + + + +]]> + + + Next you must create + a keycloak.json adapter config file within the WEB-INF directory + of your WAR. The format of this config file is describe in the general adapter configuration + section. + + + Finally you must specify both a login-config and use standard servlet security to specify + role-base constraints on your URLs. Here's an example: + + + + + + customer-portal + + + + Customers + /* + + + user + + + + + + /* + + + CONFIDENTIAL + + + + + BASIC + this is ignored currently/realm-name> + + + + admin + + + user + + +]]> + + +
+
\ No newline at end of file