Integrating Liferay(Websynergy) with OpenSSO on Glassfish V3
By Ajit Kamble on Jul 15, 2008
Liferay is an open source portal and Sun is using Liferays codebase and contributing Sun features. The project name for the same is Websynergy. OpenSSO is an open source project for single sign on. This document describes how to integrate Liferay(Websynergy) with OpenSSO on Glassfish V3 TP2.
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 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.
4. Login to opensso as amadmin. Create the user Joe Bloggs by giving "ID=joebloggs" and "Emailfirstname.lastname@example.org"
(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 email@example.com (Joe Bloggs) . Add application "Enterprise Admin" from desktop.
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.
Enjoy, your opensso integration with liferay is rocking !!