Added by Goran Nastov, last edited by Goran Nastov on Nov 17, 2009  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

Index

Introduction

This guide will walk you through the steps to get a JOSSO 1.8.1 Agent build up and running in Websphere CE.

Prerequisites

To make a quick JOSSO setup we will need:

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
  • WASCE 2.1.1.2 is located at /opt/wasce
  • JOSSO 1.8.1 is located at /opt/josso-1.8.1

Install

First we will start JOSSO Deployment Console.

$ cd /opt/josso-1.8.1/bin
    __ _____ _____ _____ _____ 
 __|  |     |   __|   __|     |
|  |  |  |  |__   |__   |  |  |
|_____|_____|_____|_____|_____|

Atricore JOSSO (1.8.1)

Type 'help' for more information.
--------------------------------------
josso>

Now we have to execute the agent install command as shown below:

Before Starting
WASCE needs to be running in order to successfully deploy JOSSO

josso> agent install --target /opt/wasce --platform wc21


You should see something like this :

josso> agent install --target /opt/wasce --platform wc21
WASCE needs to be running in order to successfully deploy JOSSO

Installing WASCE 2.1 JOSSO Agent v.1.8.1

Verify Target WASCE 2.1
  WASCE 2.1                                                [OK   ] Directory Layout

Backing up JOSSO Gateway configuration

Installing JOSSO 3rd party JARs

Installing JOSSO Agent JARs

Installing JOSSO Agent JARs from Source

Configuring Container

Installing JOSSO Agent Configuration files
  Installing    [josso-agent-config.xml]                   [OK   ] Created file:///opt/wasce/var/shared/classes/josso-agent-config.xml

Undeploying tomcat6 module
  Undeploy tomcat6 module                                  [OK   ] Successful
Installing new jars to WASCE repository
  Install new jars                                         [OK   ] Successful
Deploying josso wasce agent
  Install josso wasce agent                                [OK   ] Successful
Starting tomcat related services
  Start tomcat related services                            [OK   ] Successful

WASCE 2.1 JOSSO Agent v.1.8.1
  Overall Installation                                     [OK   ] Successful.

Congratulations! You successfully installed the agent.
Now Follow the JOSSO Agent Configuration guide for SSO-enabling applications.

josso>

You can see all the console activity, this information will also be recorded in a log file created in josso-1.8.1/log/.

Configure

The Single Sign-On Agent Configuration is installed in $WASCE_HOME/var/shared/classes/ directory.

Let's take a look at an example Single Sign-On Agent configuration file :

josso-agent-config.xml
<?xml version="1.0" encoding="UTF-8" ?>
<s:beans xmlns:s="http://www.springframework.org/schema/beans"
         xmlns:tc60="urn:org:josso:agent:tomcat60"
         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:tomcat60 http://www.josso.org/schema/josso-tomcat60-agent.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">

    <tc60:agent name="josso-tomcat60-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>

                    <!-- Simple definition of a partner application -->
                    <agent:partner-app id="MyPartnerApp1" context="/partnerapp" />
                </agent:partner-apps>

            </agent:agent-configuration>


        </configuration>

    </tc60: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 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 WASCE 2.1 located in josso-1.8-1/dist/agents/config/wc21/josso-agent-config.xml

Logging in Tomcat
If you want to enable JOSSO logging in Tomcat, refer to http://tomcat.apache.org/tomcat-6.0-doc/logging.html .