Wednesday, February 13, 2013

Liferay LDAP integration


Objective:

Integration of LDAP server to Life ray.

Life ray proving different authentication mechanism one of that is LDAP authentication.
Required Thing:

  1.   LDAP server(to manage user, groups and authentication)
  2. JXPlorer(This UI for creating users and Groups in LDAP Server)

We have many LADP servers available in market one of open source server is Apache Directory Server.
Apart form that we have Microsoft Active directory Server and Open LDAP servers.

Note: We are going to user Apache Directory Server in this integration

Steps:

Download Apache directory Server from following link it is 1.x version.

If you are using windows you can download direct .exe file. Install server on your machine this is straight forward way.

Download LDAP browser and Install it   http://jxplorer.org/downloads/users.html and install.

1.       Open the LDAP browser.(JXPlorer)
2.       Click File>Connect.


3.   Change the port to 10389.
4       In the Level drop-down menu, choose User+Password.
5.    Insert uid=admin,ou=system in the User DN input field.
6.    The password is secret.
7.    Click Save and enter a name for the template.
8.     Right click on Example and click New then you can see following window.


        9.     Enter cn= bruno in the Enter RDN text box field  .

10.     Add inetorgperson to the Selected Classes list then click OK then you can see following screen.


11.       In the Table Editor enter bruno in the SN line.
12.       Enter bruno in the givenName line.
13.       For the mail enter bruno@7cogs.com.
14.       For the userpassword enter bruno
15.       Click Submit.

Now user Bruno is added in the LDAP Tree means user is available in LDAP server under the branch DC=example,DC=com
LDAP Integration
1.      Login as a Administrator

2.      Go to Control Panel->Settings->Authentication->LDAP

3.      Check the Enable Box.

4.      If the Required box is checked only users in the LDAP server will be able to log into Liferay Portal.

5.      Choose Default Value Apache Directory Server. 


6. Check Connection, provide given values and Test LDAP Connection
BaseProviderURL:   ldap://localhost:10389
BaseDN:  dc=example,dc=com
Principal:  uid=admin,ou=system
Credential: secret  

7. Test LDAP users

8. Check on Import Enabled box. 


Observation:


  • Login as Bruno account you will be successfully login into the portal.
  • The account created in LDAP sever will automatically register in User_ table.
  • We did not create any account directly in life ray but it’s available in user_ table.
  • Liferay LDAP configuration automatically imports LDAP users into life ray data base.



1 comment :

Recent Posts

Recent Posts Widget

Popular Posts