In this blog we will configure OpenAM as Identity provider and Liferay as Service Provider using SAML 2.0.
Follow below steps :
- Download OpenAM 11.0.0 war file from https://backstage.forgerock.com/#/downloads
- Deploy the war file in Tomcat (Lets say Port 8081).
- Increase heap and param space.
- Start the server and hit http://localhost:8081/OpenAM-11.0.0/ in the browser.
- You will be redirected to http://localhost:8081/OpenAM-11.0.0/config/options.htm

- Click on "Create default Configuration".

- Provide password as shown in above diagram and click on create configuration.
- After successfull completion page redirects to http://localhost:8081/OpenAM-11.0.0/UI/Login.
- Provide username as amadmin and password as liferaypassword.
- Now Open Liferay (I am using 6.2 which is running on port 8080).
- Deploy SAML plugin.
- Add below properties in portal-ext.properties :
saml.enabled=true
- Restart Liferay server.
- To configure OpenAM as IDP go to http://localhost:8081/OpenAM-11.0.0/task/Home
- On the Common Tasks page, click on Create Hosted Identity Provider.

- Now click on Register Remote Service Provider.

- After registering Remote Service Provider, click on Federation tab , your screen should look like:

- Now click on http://localhost:8081/OpenAM-11.0.0 link available under Entity Providers and make sure following settings are checked, If not then mark it checked

- Now click on test link available under Entity Providers table and make sure following settings are checked, If not then mark it checked

- Now go to Liferay Server and create a user with below details :

Now update the same user details in OpenAM, Go to Access Control tab.
Click the / (Top Level Realm) realm.
Select the Subjects tab.
Click on demo user.
Update first name as "demo" and emailaddress as "demo@liferay.com" and Save it.

Now Open a new browser clear all cache and hit http://localhost:8080/.
Click on SignIn link from Top right corner.
It will redirect you to OpenAM login page.
Fill username as demo and password as changeit.
It will be authenticated and redirected to Liferay successfully.
Thank You!!!

