Index
1. Introduction
This guide will walk you through the steps to get a JOSSO 1.8 Agent running on Alfresco 3.3 web application. Deployment console provides complete agent install for Tomcat bundle, other bundles might require manual adjustments.
2. Prerequisites
To make a quick JOSSO setup we will need:
- JDK 1.5 : For optimal results, confirm that your JDK version matches a JDK listed at http://java.sun.com/javase/downloads/index_jdk5.jsp
- Alfresco Community Edition 3.3 bundle listed at: https://sourceforge.net/projects/alfresco/
- JOSSO 1.8
For the purposes of this guide, we will assume the following facts:
- JDK 1.5.0 16 is located at /opt/jdk1.5.0_16
- Alfresco 3.3 bundle, located at /opt/alfresco (with tomcat as application server)
- JOSSO 1.8.0 is located at /opt/josso-1.8.0
3. Install Agent
First we will start JOSSO Deployment Console.
$ cd /opt/josso-1.8.0/bin
$ ./josso-gsh
__ _____ _____ _____ _____
__| | | __| __| |
| | | | |__ |__ | | |
|_____|_____|_____|_____|_____|
JOSSO (1.8.0)
Type 'help' for more information.
--------------------------------------
josso>
Now we have to execute the agent install command as shown below:
(remember that target parameter is always path to root of alfresco web application)
3.1 Alfreco default (tomcat) bundle
josso> agent install --target /opt/alfresco/tomcat/webapps/alfresco/ --platform alfresco --tcdir /opt/alfresco/tomcat/
3.2 Other application servers (alfresco.war)
Expanded alfresco.war package is located in /opt/jboss/server/default/deploy/alfresco.war
josso> agent install --target /opt/jboss/server/default/deploy/alfresco.war --platform alfresco
Proceed to [3.3.1 Configure JAAS module]
You should see something like this :
josso> agent install -t /opt/alfresco/tomcat/webapps/alfresco -p alfresco -td /opt/alfresco/tomcat Installing Alfresco 3.3 JOSSO Agent v.1.8.2-SNAPSHOT Verifying Target Alfresco 3.3 Alfresco root [OK ] Backing up and removing old JOSSO artifacts Installing JOSSO 3rd party JARs Backup [xbean-spring-3.4.3.jar] [OK ] file:///opt/alfresco/tomcat/webapps/alfresco/WEB-INF/lib/xbean-spring-3.4.3.jar.bkp.1 Installing [xbean-spring-3.4.3.jar] [OK ] Created file:///opt/alfresco/tomcat/webapps/alfresco/WEB-INF/lib/xbean-spring-3.4.3.jar Installing JOSSO Agent JARs Installing [josso-agent-shared-1.8.2-SNAPSHOT.jar] [OK ] Replaced file:///opt/alfresco/tomcat/webapps/alfresco/WEB-INF/lib/josso-agent-shared-1.8.2-SNAPSHOT.jar Installing [josso-servlet-agent-1.8.2-SNAPSHOT.jar] [OK ] Replaced file:///opt/alfresco/tomcat/webapps/alfresco/WEB-INF/lib/josso-servlet-agent-1.8.2-SNAPSHOT.jar Installing [josso-alfresco-agent-1.8.2-SNAPSHOT.jar] [OK ] Replaced file:///opt/alfresco/tomcat/webapps/alfresco/WEB-INF/lib/josso-alfresco-agent-1.8.2-SNAPSHOT.jar Installing [josso-agents-bin-1.8.2-SNAPSHOT.jar] [OK ] Replaced file:///opt/alfresco/tomcat/webapps/alfresco/WEB-INF/lib/josso-agents-bin-1.8.2-SNAPSHOT.jar Installing JOSSO Agent JARs from Source Configuring Container Added josso filter into web.xml [JOSSO Alfresco Agent ] [OK ] WEB-INF/web.xml Backup [web.xml] [OK ] file:///opt/alfresco/tomcat/webapps/alfresco/web.xml.bkp.1 Save [web.xml] [OK ] file:///opt/alfresco/tomcat/webapps/alfresco/WEB-INF/web.xml Installing JOSSO Agent Configuration files Installing [josso-agent-config.xml] [OK ] Created file:///opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/josso-agent-config.xml Installing [jaas.conf] [OK ] Created file:///opt/alfresco/tomcat/conf/jaas.conf Installing [josso-agent.xsd] [OK ] Created file:///opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/josso-agent.xsd Installing [setenv.sh] [OK ] Created file:///opt/alfresco/tomcat/bin/setenv.sh Installing [josso-protocol-client.xsd] [OK ] Created file:///opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/josso-protocol-client.xsd Installing [setenv.bat] [OK ] Created file:///opt/alfresco/tomcat/bin/setenv.bat Installing [josso-servlet-agent.xsd] [OK ] Created file:///opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/josso-servlet-agent.xsd Alfresco 3.3 JOSSO Agent v.1.8.2-SNAPSHOT Overall Installation [OK ] Successful. Congratulations! You've successfully installed the agent. Now Follow the JOSSO Agent Configuration guide for SSO-enabling applications.
You can see all the console activity, this information will also be recorded in a log file created in josso-1.8.0/log/.
3.3.1 Configure JAAS module
After you successfully installed josso agent, you need to setup jaas module manually.
| If you are using Tomcat you can skip this step. |
jaas.config (conf, xml) is located in conf directory of your application server. You should add josso module definition at the end of that file.
Let's take a look at an example of Jaas module configuration file :
josso {
org.josso.servlet.agent.jaas.SSOGatewayLoginModule required debug=true;
};
4.Configure
The Single Sign-On Agent Configuration is installed in $ALFRESCO_WEBAPP_ROOT/WEB-INF/classes/ directory.
Let's take a look at an example Single Sign-On Agent configuration file :
<?xml version="1.0" encoding="ISO-8859-1" ?> <s:beans xmlns:s="http://www.springframework.org/schema/beans" xmlns:agent="urn:org:josso:agent:core" xmlns:genSvlt="urn:org:josso:agent:generic-servlet" xmlns:protocol="urn:org:josso:protocol:client" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd urn:org:josso:agent:core josso-agent.xsd urn:org:josso:agent:generic-servlet josso-servlet-agent.xsd urn:org:josso:protocol:client josso-protocol-client.xsd"> <genSvlt:agent sessionAccessMinInterval="1000" gatewayLoginUrl="http://localhost:8080/josso/signon/login.do" gatewayLogoutUrl="http://localhost:8080/josso/signon/logout.do"> <genSvlt:configuration> <agent:agent-configuration> <agent:partner-apps> <agent:partner-app id="alfresco" context="/alfresco"/> </agent:partner-apps> </agent:agent-configuration> </genSvlt:configuration> <genSvlt:gatewayServiceLocator> <protocol:ws-service-locator endpoint="localhost:8080"/> </genSvlt:gatewayServiceLocator> <genSvlt:parametersBuilders> <agent:vhost-parameters-builder/> <agent:appctx-parameters-builder/> </genSvlt:parametersBuilders> </genSvlt:agent> </s:beans>
Using this configuration you can set :
- The Gateway Login URL, where the Single Sign-On Agent will redirect the user on protected resource access request so that he can authenticate.
- The Gateway Logout URL, where the Single Sign-On Agent will redirect the user on logout request.
- The concrete Service Locator to be used to invoke the services of the Single Sign-On Gateway.
- The Single Sign-On partner applications
In this specific case, which is the default, we are using SOAP over HTTP to invoke The Single Sign-On Gateway WebServices.
Its important to specify the endpoint configuration parameter which should contain the host and port information where the Single Sign-On WebServices are listening.
If the agent and the gateway are running in the same server this will be localhost and the port should be the port where Tomcat is listening for incoming HTTP requests.
This configuration file defines only one partner application, Alfresco, associated with the alfresco/ web context. This means that the web application associated with the alfresco/ web context will be put behind the Single Sign-On. You can define other partner applications.