Dashboard > JOSSO 1 > ... > Developer > ASP
JOSSO 1
ASP
Added by Sebastian Gonzalez Oyuela, last edited by Sebastian Gonzalez Oyuela on Oct 02, 2007  (view change)
Labels: 
(None)

Prerequisites

Install and Configure JOSSO

Before starting to enable ASP support, you must first build and configure JOSSO following your platform specific setup How-TO.

Also, test that the JOSSO web application is accessible using the default basic authentication scheme as explained in the Running section of the setup guide.

Install the JRE 1.5.0

Download the JRE 1.5.0 from here and install it on the IIS server, assigning the JRE_HOME environment variable to the corresponding installation directory :

set JRE_HOME=C:\Program Files\Java\jre1.5.0_11

Availability of an Internet Information Server (IIS) environment

In this tutorial we'll deploy and run the sample ASP applications on IIS, which is found in Windows NT and Windows 2000 Servers.

Configuring

Installing the ASP Client Plugin

The ASP integration is achieved through a Java Bean wrapped in an ActiveX component. If you want more information about this check here

Create the location where the JOSSO Client ActiveX will reside :

mkdir %JRE_HOME%\axbridge\
mkdir %JRE_HOME%\axbridge\bin

Now lets install and register the ASP Client Plugin ActiveX :

copy %JOSSO_HOME%\src\plugins\microsoft\dist\JOSSOActiveX.dll %JRE_HOME%\axbridge\bin
cd %JRE_HOME%\axbridge\bin
regsvr32 JOSSOActiveX.dll

If the operation is succesfull the ActiveX will be identified as :

clsid={A9D9756E-DCC3-4566-AD99-4153C2C06BD8}

progid=JOSSOActiveX.Bean.1

Enabling SSO in the ASP Partner Applications

Create a Virtual Directory

Create a directory which will hold the ASP partner application :

mkdir c:\inetpub\partnerapp

Next, run the Internet Services Manager administrative tool and add a virtual directory associated to the directory we've just created.

Install JOSSO ASP support files

Create a dedicated area in the virtual directory and copy JOSSO ASP support files :

mkdir c:\inetpub\partnerapp\josso-asp
copy %JOSSO_HOME%\src\microsoft\asp\josso\*.* c:\inetpub\partnerapp\josso-asp

Install the Sample Partner Application

JOSSO comes with a sample ASP partner application which we'll use for testing :

copy %JOSSO_HOME%\src\samples\microsoft\asp\*.* c:\Inetpub\partnerapp

Configure the ASP client plugin

The preferences for the ASP client plugin should be put in the global.asa file. Lets have a look at a sample global.asa file :

<object runat="server" scope="application" id="josso" progid="JOSSOActiveX.Bean.1">
</object>


<!--METADATA TYPE="TypeLib"
uuid="{FA564C45-6AE6-4610-9C50-C5B2D37AD9BB}"
-->

<script language="vbscript" runat="server">

sub Application_OnStart

  ' JOSSO Gateway SOAP end point
  josso.setProperty "gwy.endpoint", "sso.example.com:8080"

  ' JOSSO Gateway Login/Logout urls
  josso.setProperty "gwy.login", "http://sso.example.com:8080/josso/signon/login.do"
  josso.setProperty "gwy.logout", "http://sso.example.com:8080/josso/signon/logout.do"

  ' JOSSO ASP Agent base code i.e. /partnerapp/josso-asp for http://myasphost.com/partnerapp/josso-asp/josso.asp, etc
  josso.setProperty "agent.basecode", "/partnerapp/josso-asp"


  ' JOSSO Log4J configuration properties (Optional, only if you want to enable agent logging, use properties file found in JOSSO ASP distribution directory)
  ' josso.setLog4jProperties("c:\josso-wa\log4j.properties")

  ' Initialize josso object
  josso.init()
end sub
</script>

Using this configuration you can set :

  • gwy.endpoint : contains the host and port information where the Single Sign-On WebServices are listening.
  • gwy.login : the gateway Login URL, where the SSO ASP Client will redirect the user on protected resource access request so that he can authenticate.
  • gwy.logout : the gateway Logout URL, where the SSO ASP Client will redirect the user on logout request.

Testing it

Lets invoke the protected page by contacting the http://partnerapp.example.com/partnerapp/sample-protected.asp URL, assuming that partnerapp.example.com is the IIS host where the ASP partner application resides.

You can also access the following samples : http://partnerapp.example.com/partnerapp/sample-user.asphttp://partnerapp.example.com/partnerapp/sample-public.asphttp://partnerapp.example.com/partnerapp/default.asp

You should be redirected to the Login form on the JOSSO Gateway. After succesfully logging on using the account 'user1/user1pwd' you should be redirected back to the requested ASP page which will display the authenticated user's information.

Even if the ASP page is not protected but part of the SSO domain, it should notify keep-alive events to the Gateway in order to avoid the SSO session expiration. Check the 'sample-public.asp' page for more details.

Comments

Care to comment on this How-To? Help keep this document relevant by passing along any constructive feedback to the josso-docs

Site running on a free Atlassian Confluence Open Source Project License granted to JOSSO. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.0 Build:#913 Sep 27, 2007) - Bug/feature request - Contact Administrators