OpenSSO is an open source project for single sign on from Sun Microsystems. This document describes how to integrate Liferay 5.1 with OpenSSO on Glassfish V3.
1. Download OpenSSO from https://opensso.dev.java.net . You can use stable Build 4.
2. Download Glassfish V3 from https://glassfish.dev.java.net
3. Iam assuming OpenSSO and Liferay on the same machine for this example but they can be on two different machines.
4. Install ANT 1.7, JDK 1.6 and SVN 1.4.5. Make sure all are in PATH.
5. Checkout Liferay latest source from sourceforge.net (svn co https://lportal.svn.sourceforge.net/svnroot/lportal/trunk portal). Latest version is "5.1" if checked out from trunk.
6. Go to Liferay source code directory and modify appserver.properties. Specify the glassfish version as v3 and glassfish install location.
7. From Liferay Source Code checkout Directory run ant -f build.xml all.
8. Once, build is successful, liferay is up and running on Glassfish V3 after few 5 minutes of compilation time, access http://host:port to verify.
Note : On liferay site we have pre-built image of only GFv2.1 but not GFv3. Thats why we manually did a build for GFv3 as above
See below steps now for OpenSSO :
1. Unzip opensso.zip . Go to deployable-war directory and copy opensso.war to glassfish hotdeploy directory.
2. Glassfish autodeploy scanner will pick the war and deploy it.
3. Access http://host:port/opensso. Web based install screen of OpenSSO will be seen. Select default configuration and go through the steps which are very easy and self explanatory. Remeber "amadmin" password that you provided during installation.
4. Login to opensso as amadmin. Create the user Joe Bloggs by giving "ID=joebloggs" and "Email=test@liferay.com"
(Note : First create the user, then edit to set email).
5. Logout and login to OpenSSO as joebloggs. It should work fine.
6. Now login to Liferay as test@liferay.com (Joe Bloggs) . Add application "Enterprise Admin" if not already present.
7. In the "Enterprise Admin" portlet, Go to EnterpriseAdmin > Organizations > Settings > Authentication > OpenSSO. Change the below values for your opensso host and portalhost. In this example it is the same host.
# Login URL=http://openssohost:port/opensso/UI/Login?goto=http://portalhost:port/c/portal/login
# Logout URL=http://openssohost:port/opensso/UI/Logout?goto=http://portalhost:port/portal/
# Service URL=http://openssohost:port/opensso
Check "Enable" checkbox and Save.
8. Now once you click on Logout. It takes you back to opensso login page and after successful authentication it will come bring the liferay desktop again. Also if you access http://host:port for accessing liferay, opensso authentication screen should come.

