Part 1 Install OpenSSO on Tomcat
Assumption: Tomcat 6.0.18 + OpenSSO V1 Build 4.5 on Windows XP Professional.
- Download and install JDK 1.6 to C:\java\jdk1.6.0_07;
- Download Tomcat 6.0.18 and extract to C:\tomcat;
- Edit C:\tomcat\bin\catalina.bat and add the following to the beginning of the file:
set JAVA_HOME=C:\java\jdk1.6.0_07
set CATALINA_OPTS="-Xms512m -Xmx1024m" - Download openSSO and extract to C:\Temp;
- Copy C:\temp\opensso\deployable-war\opensso.war to C:\tomcat-6.0.18\webapps;
- Start Tomcat by running C:\tomcat\bin\startup.bat;
- Go to http://opensso.host.domain:8080/opensso;
- Click on "Create Default Configuration"
- Fill in passwords and click Create... (IE6 may have issues with this screen, use Firefox instead);
- Login as amadmin and the password specified above;
Part 2 Setup Liferay
Assume you have a liferay 5.1.1 running at http://portal.host.domain:8080/. If you don't, it is time now to set up one.
Install Liferay from a bundle
- Download a Liferay + Tomcat bundle from http://www.liferay.com/;
- Extract to a directory (say c:\liferay);
- Edit c:\liferay\bin\catalina.bat to add CATALINA_OPTS and JAVA_HOME such as step 3 above;
Create an account in OpenSSO:
- Go to http://opensso.host.domain:8080/opensso
- Login as amadmin, access control -> opensso -> subjects -> New
- ID: joebloggs, Last Name: Bloggs, Full Name: joebloggs, Password: welcome1
- Click OK
- Click on joebloggs, add email address: test@liferay.com
- Click Save
Configure Liferay
- Login to liferay as admin: test@liferay.com and password test
- Go to My Places -> My Community -> Private Pages (2)
- In the Enterprise Admin section, click Organizations -> Settings -> Authentication -> OpenSSO...
- Check Enabled
- Login URL: http://opensso.host.domain:8080/opensso/UI/Login?goto=http://portal.host.domain:8080/c/portal/login
- Logout URL: http://opensso.host.domain:8080/opensso/UI/Logout?goto=http://portal.host.domain:8080/portal/logout
- Service URL: http://opensso.host.domain:8080/openssoSave
- Click Save
- You are now asked to login to opensso, login as joebloggs and password is what you specified above
- To test: go to http://portal.host.domain:8080/, you should be prompted for OpenSSO login, login as joebloggs/welcome1, you should be logged in to Liferay without asking for another password
But Wait! Something Not Quite Right
You may notice that once you have provided OpenSSO credentials for OpenSSO, it does not redirect you to Liferay. This is more obvious in Firefox, where it errors out indicating a dead loop.
Liferay 5.1.1 has an issue in its code com.liferay.portal.servlet.filters.sso.opensso.OpenSSOUtil class. The fix is to change the following line in method _setCookieProperty:
- from: sb.append(cookieValue);
- to: sb.append("\"" + cookieValue + "\"");
And then you need to recompile and deploy portal-impl.jar.