Integrating OpenSSO with Liferay 5.1 on Glassfish

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.

More Blog Entries

thumbnail
thumbnail
Blogs
From 5.1 onwards Liferay has a bundle for Glassfish V3. Following is the download url:
http://downloads.sourceforge.net/lportal/liferay-portal-glassfish-5.1.0.zip
Hi, I wanted to know if there is a problem of Liferay work with the OPENSSO 5.0? I am not getting integrates them!
The sign of liferay is redirected to the Opensso but to return to Liferay the page is blank, and then to reload the page blank but it continues not to redirect the opensso because the user is already logged, the procedure is repeated ( erasing the cockies or in a new browser) happens all over again to access the portal is redirected to opensso but the return is the blank page, has no records of errors in the logs of Opensso and neither of Liferay!
Details I have tried to set the environment with Jboss and the glassfish (as you suggest)!
It's works! With Bundled with Glassfish 3!
Just works!!

I had already tried, the most important thing is that worked!
Great description which works for me (GlassFish v2u2) and Build 11 of (5.2).

Things that I would like to know is how do I get the http://portalhost:port/web/guest/
page un protected. In the config with OpenSSO it redirects to the OpenSSO
login pages. The OpenSSO page should only appear when sign in is selected.

The other thing that I tried to figure out is how to use OpenSSO to authenticate without
using its Login UI. So only leverage the uid/pwd authentication and session management (SSO).
Hi Eugene,

Have you got any solution?I have similar requirement..

Thanks
hi..
I am using liferay 5.2.3.I have deployed opensso war file in the same tomcat of liferay.I have a doubt ie when i login through opensso,it redirects me to liferay page.should i login again or not.It asks me to re-login.But when i logout it redirects me to opensso page,which i think is fine.

Any suggestions are welcome..
Hi Eugene,
I am also looking for similar kind of solution. Please let me know if you have any solutions.