Liferay - OpenSSO-AM Integration - Modified
Liferay - OpenSSO-AM Integration - Modified
Liferay - OpenSSO-AM Integration - Modified
0 With
OpenSSO/OpenAM+LDAP
Table of Contents
Integrating Liferay 6.0 With OpenSSO/OpenAM+LDAP.........................................................................1
1 Introduction............................................................................................................................................2
2 Prerequisites...........................................................................................................................................2
3 Steps Required for..................................................................................................................................2
3.1 Installing Liferay Portal..................................................................................................................2
3.2 Installing OpenDJ LDAP Server....................................................................................................3
3.3 Installing OpenSSO/OpenAM ......................................................................................................3
3.3.1 Installation of the Tomcat server consisted of........................................................................3
3.3.2 Installation of OpenAM consisted of......................................................................................4
3.3.3 Additional OpenAM Configuration........................................................................................5
3.4 Enabling LDAP Authentication......................................................................................................6
3.5 Integrating Liferay Portal with OpenAM and Enabling LDAP ....................................................6
3.5.1 Enabling LDAP ......................................................................................................................6
4 Reference...............................................................................................................................................8
1 Introduction
This guide will walk you through the steps to implement Single Singn On feature with Liferay portal
v6.0. This document is intended for test driving OpenSSO(or OpenAM) within a simple single sign-on
setting using JBOSS as the target platform where liferay portal would be running..
2 Prerequisites
To make a quick OpenAM setup we will need:-
Liferay Portal and OpenSSO both require a minimum 1.5 JVM, but I would recommend using Java 6
(as Java 1.5 reached its End of Service Life in October, 2009). Make sure that your JAVA_HOME,
JBOSS_HOME and CATALINA_HOME (for Tomcat server) environment variable are correctly set to
point to your Java 6 installation.
For OpenSSO to work correctly with Liferay Portal, both servers (Tomcat and Jboss) need to be
running in the same domain.
OpenDJ is a downstream build of the OpenDS project, with a different name to avoid trademark
issues. For more information:- http://opendj.forgerock.org/faq.html
NOTE:-
-->While installing OpenDJ, we need to import the default users. The imported users are
automatically generated sample data.
-->Admin rights are required if we are installing OpenDJ with Run as the windows service
option.If the system don't have admin rights uncheck the Run as window service option
otherwise OpenDJ installation will give an error.
OpenSSO will continue to be developed and supported by ForgeRock under the name of OpenAM.
As OpenAM also requires a servlet container, we can either use latest Tomcat (6.0.32) or
JBOSS(5.1.0) depending on whether we want to run it on Tomcat or JBOSS.
or
4. Modify “server.xml”, in order to run it on port 8081 instead of default port 8080. You could find
it in tomcat directory- apache-tomcat-6.0.32 \conf.
open server.xml.
edit entry
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
to
<Connector port="8081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
4. After doing above changes, we can run two instance of JBOSS server. Liferay will run
on one JBOSS instance through(bin/run.bat).
For running OpenSSO, we have to open a new command prompt and run it as below-
cd $JBOSS_HOME/bin
run.bat -D jboss.service.binding.set=ports-01 -c ports-01
Note:- OpenSSO will be running on the 8180 port and Liferay will run on default 10000 port.
For more information regarding JBOSS configuration, you can refer below link:-
https://wikis.forgerock.org/confluence/display/openam/
Considerations+when+deploying+on+JBoss+AS+5.1
After Tomcat has deployed OpenAM, you will see the exploded war file as apache-
tomcat-6.0.32/webapps/opensso.
--OR --
-- OR--
In case of OpenSSO/JBOSS server --
Open a browser to http://localhost:8180/opensso, which should redirect you to
http://localhost:8180/opensso/config/options.htm, to complete the OpenAM configuration.
4. You should see the OpenAM configuration options page. Under Custom Configuration,click
Create New Configuration. Enter the following:
For more information regarding OpenAM configuration, you could read through step
Procedure1.4.To Configure OpenAM on below link:-
http://openam.forgerock.org/doc/install-guide/OpenAM-Install-Guide.html
1. When this completes, in the Configuration Complete dialog, click Proceed to Login, which
should now redirect you to http://localhost:8081/opensso/UI/Login (for OpenSSO running on
Tomcat) or http://localhost:8180/opensso/UI/Login ( for OpenSSO running on JBOSS)
2. Type amAdmin as the username, password as the password, and click, Log In. You should
now see the OpenAM Console.
3. You can now delete the opensso.war file from apache-tomcat-6.0.32/webapps/ directory.
Note:- While installing OpenAM, Cookie Domain should be set as Full Computer Name
prefixed by . (dot)
In-order to get OpenAM to work correctly with Liferay, you would need to set Encode Cookie Value
to Yes. This will prevent infinite redirection between Liferay and OpenAM on login.
1. In the OpenAM Console, select the Configuration tab.
2. Select the Servers and Sites tab.
3. Click Default Server Settings.
4. Select the Security tab.
5. In the Cookie section, select the Yes check-box beside Encode Cookie Value.
6. Click Save.
Also set the com.iplanet.am.cookie.c66Encodeproperty to true as well, to resolve the infinite
redirection problem:
1. In the OpenAM Console, select the Configuration tab.
2. Select the Servers and Sites tab.
3. Click Default Server Settings.
4. Select the Advanced tab.
5. Find the com.iplanet.am.cookie.c66Encodeproperty, and set the value to true.
6. Click Save.
Before updating Liferay to use OpenAM, please add the default Liferay user,[email protected] , to
OpenAM.
1. In the OpenAM Console, select the Access Control tab.
2. Click the / (Top Level Realm) realm.
3. Select the Subjects tab.
4. Click New…
5. Setup the default Liferay user:
ID — joebloggs (test, in our customized Liferay)
First Name — Joe (Test, in our customized Liferay)
Last Name — Bloggs (Test, in our customized Liferay)
Full Name — Joe Bloggs (test, in our customized Liferay)
Password — password
Click OK to create the user.
6. Click test to add the email address. Enter [email protected] for the Email Address, and click
Save.
6.
open.sso.auth.enabled=true
open.sso.login.url= http://localhost:8081/opensso/UI/Login?goto=http://localhost:10000/c/portal/login
open.sso.logout.url=http://localhost:8081/opensso/UI/Logout?goto=http://localhost:10000/web/guest/home
open.sso.service.url=http://localhost:8081/opensso
open.sso.screen.name.attr=uid
open.sso.email.address.attr=mail
open.sso.first.name.attr=givenname
open.sso.last.name.attr=sn
auto.login.hooks=com.liferay.portal.security.auth.OpenSSOAutoLogin
Now Liferay is using OpenAM for authentication, if you create a new user in OpenAM, that user
will also be created in Liferay on the first log in. That newly created user in Liferay will only have
the basic information filled in – First Name, Last Name, Screenname, Email Address – and will have
the default Roles, Groups, and Organizations assigned.
NOTE:-
→ OpenAM is supported with Apache Tomcat-v6.0.18 onwards.
→ If you are not using customized liferay+jboss, then it would run on default port 8080 instead of
10000. So please change the entries accordingly.
4 Reference
http://www.objectpartners.com/2010/08/16/integrating-opensso-openam-with-liferay-portal-on-
tomcat/
https://wikis.forgerock.org/confluence/display/openam/integrate+OpenAM+with+Liferay