Index
Introduction
This guide will walk you through the steps to get a JOSSO JASPI Agent running in JBoss 6. The JOSSO Agent for JBoss 6 shares the JBoss 5 codebase, therefore you can harness the JBoss 5 installation commands for provisioning JOSSO support onto a JBoss 6 application server instance.
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
- JBoss 6 Final
- JOSSO 1.8.2 or newer
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
- JBoss 6.0.0 Final is located at /opt/jboss-6.0.0.Final
- JOSSO is located at /opt/josso-1.8.2
Install
First we will start JOSSO Deployment Console.
$ cd /opt/josso-1.8.2/bin
$ ./josso-gsh
__ _____ _____ _____ _____
__| | | __| __| |
| | | | |__ |__ | | |
|_____|_____|_____|_____|_____|
Atricore JOSSO (1.8.2)
Type 'help' for more information.
--------------------------------------
josso>
josso> agent install --target /opt/jboss-6.0.0.Final --jboss-instance default --platform jb5
josso> agent install --target /opt/jboss-6.0.0.Final --jboss-instance default --platform jb5 Installing JBoss AS 5.x JOSSO Agent v.1.8.2 Verify Target JBoss AS 5.x JBoss AS 5.x [OK ] Directory Layout JBossHome [OK ] Backing up and removing old JOSSO artifacts Installing JOSSO 3rd party JARs Installing [spring-aop-2.5.5.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/spring-aop-2.5.5.jar Installing [commons-beanutils-1.6.1.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/commons-beanutils-1.6.1.jar Installing [commons-discovery-0.2.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/commons-discovery-0.2.jar Installing [commons-lang-2.0.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/commons-lang-2.0.jar Installing [commons-digester-1.5.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/commons-digester-1.5.jar Installing [spring-beans-2.5.5.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/spring-beans-2.5.5.jar Installing [activation-1.1.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/activation-1.1.jar Installing [aopalliance-1.0.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/aopalliance-1.0.jar Installing [xbean-spring-3.4.3.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/xbean-spring-3.4.3.jar Installing [commons-collections-3.0.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/commons-collections-3.0.jar Installing [commons-modeler-1.1.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/commons-modeler-1.1.jar Installing [axis-saaj-1.4.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/axis-saaj-1.4.jar Installing [commons-logging-api-1.0.4.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/commons-logging-api-1.0.4.jar Installing [axis-jaxrpc-1.4.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/axis-jaxrpc-1.4.jar Installing [commons-codec-1.3.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/commons-codec-1.3.jar Installing [axis-1.4.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/axis-1.4.jar Installing [spring-core-2.5.5.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/spring-core-2.5.5.jar Installing [spring-context-2.5.5.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/spring-context-2.5.5.jar Installing [axis-ant-1.4.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/axis-ant-1.4.jar Installing [commons-logging-1.0.4.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/commons-logging-1.0.4.jar Installing JOSSO Agent JARs Installing [josso-jaspi-agent-1.8.2.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/josso-jaspi-agent-1.8.2.jar Installing [josso-agents-bin-1.8.2.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/josso-agents-bin-1.8.2.jar Installing [josso-agent-shared-1.8.2.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/josso-agent-shared-1.8.2.jar Installing [josso-jboss5-agent-1.8.2.jar] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/lib/josso-jboss5-agent-1.8.2.jar Installing JOSSO Agent JARs from Source Configuring Container Removed [Tomcat default Realm ] [OK ] org.jboss.web.tomcat.security.JBossWebRealm Configured [JOSSO JAAS Realm ] [OK ] org.josso.jb5.agent.JBossCatalinaRealm Backup [server.xml] [OK ] file:///opt/jboss-6.0.0.Final/server/default/deploy/jbossweb.sar/server.xml.bkp.1 Save [server.xml] [OK ] file:///opt/jboss-6.0.0.Final/server/default/deploy/jbossweb.sar/server.xml Backup [login-config.xml] [OK ] file:///opt/jboss-6.0.0.Final/server/default/conf/login-config.xml.bkp.1 Save [login-config.xml] [OK ] file:///opt/jboss-6.0.0.Final/server/default/conf/login-config.xml Installing JOSSO Agent Configuration files Installing [josso-agent-config.xml] [OK ] Created file:///opt/jboss-6.0.0.Final/server/default/conf/josso-agent-config.xml JBoss AS 5.x JOSSO Agent v.1.8.2 Overall Installation [OK ] Successful. Congratulations! You've successfully installed the agent. Now Follow the JOSSO Agent Configuration guide for SSO-enabling applications.
Remove conflicting artifacts
Manually remove $JBOSS_HOME/server/default/lib/commons-logging-api-1.0.4.jar and $JBOSS_HOME/server/default/lib/commons-logging-1.1.1.jar
In case of hosting the JOSSO Gateway web application you need in addition to manually remove $JBOSS_HOME/server/default/deploy/josso.war/WEB-INF/lib/commons-logging-1.0.3.jar and $JBOSS_HOME/server/default/deploy/josso.war/WEB-INF/lib/commons-logging-api-1.0.4.jar
Configure
The Single Sign-On Agent Configuration is installed in $JBOSS_HOME/server/default/conf directory. This may vary depending on the JBoss instance you used when installing the agent.
Let's take a look at an example Single Sign-On Agent configuration file :
<?xml version="1.0" encoding="UTF-8" ?> <s:beans xmlns:s="http://www.springframework.org/schema/beans" xmlns:agent="urn:org:josso:agent:core" 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-2.5.xsd urn:org:josso:agent:core http://www.josso.org/schema/josso-agent.xsd urn:org:josso:protocol:client http://www.josso.org/schema/josso-protocol-client.xsd"> <agent:agent name="josso-jaspi-agent" sessionAccessMinInterval="1000" > <!-- Gateway LOGIN and LOGOUT URLs --> <gatewayLoginUrl>http://localhost:8080/josso/signon/login.do</gatewayLoginUrl> <gatewayLogoutUrl>http://localhost:8080/josso/signon/logout.do</gatewayLogoutUrl> <!-- Gateway service locator --> <gatewayServiceLocator> <!-- Other properties for ws-service-locator : username, password, servicesWebContext, transportSecurity --> <protocol:ws-service-locator endpoint="localhost:8080" /> </gatewayServiceLocator> <configuration> <agent:agent-configuration> <!-- ============================================================================= --> <!-- --> <!-- JOSSO Parnter application definicions : --> <!-- --> <!-- Configure all web applications that should be a josso partner application --> <!-- within this server. --> <!-- For each partner application you have to define the proper web-context. --> <!-- ============================================================================= --> <agent:partner-apps> <agent:partner-app id="MyPartnerApp1" context="/partnerapp" /> </agent:partner-apps> </agent:agent-configuration> </configuration> </agent: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 JBoss is listening for incoming HTTP requests.
This configuration file defines only one partner application associated with the /partnerapp web context. This means that the web application associated with the /partnerapp web context will be put behind the Single Sign-On. You can define other partner applications.
You can also take a look at the distributed configuration file for JBoss 5 located in josso-1.8-2/dist/agents/config/jb5/josso-agent-config.xml