Hello Open Source Gurus,
Overview of LDAP
LDAP directory service is based on a client-server model. One or more LDAP servers contain the data making up the LDAP directory tree or LDAP backend database. An LDAP client connects to an LDAP server and asks it a question. The server responds with the answer, or with a pointer to where the client can get more information (typically, another LDAP server). No matter what LDAP server a client connects to, it sees the same view of the directory; a name presented to one LDAP server references the same entry it would at another LDAP server. This is an important feature of a global directory service, like LDAP.
Prerequisites for LDAP integration with Liferay
- Setup Liferay 6.2
- LDAP Server
For this blog we have used Apache Directory as LDAP server. You can download the Apache Directory server from Click Here.
For windows you can download direct .exe file. And Install Apache Directory Server on your machine.
- JXPlorer (Used for creating users and Groups in LDAP Server)
You can download JXPlorer from Click Here.
For windows you can download direct “.exe” file. Install JXPlorer server on your machine and run it.
Now Open The JXPlorer.
Click file Connect.
In the Level drop-down menu, Choose User+Password.
Change the port to 10389.
Insert uid=admin,ou=system in the User DN input field.
The password is secret.
Click on save and enter a name for template, Now you can see this type of
Right Click on Example and click on New then you can see this type of window.
Enter cn= chirag in the Enter RDN textbox field.
Add the inetOrgPerson to the selected Classes list then click ok then you can see the following window.
In the Table Editor enter chirag in the SN line.
Enter email@example.com in the mail line.
Enter chirag the password line.
Click Submit. You can see this type of window.
Now user chirag is added in the LDAP server under the branch
- LDAP integration with Liferay 6.2
Login as an Administrator in Liferay. Default user is firstname.lastname@example.org.
Go to Control Panel → Portal Settings → Authentication. You will see window similar to following snapshot.
Check the Enabled and Required box. Required box is checked only users in the
LDAP server will be able to log in Liferay Portal.
Click on Add button for Add LDAP Servers.
Choose Default value Apache Directory Server.
Filled the value as per below in the textbox as given in the Add Apache Directory Server Page.
Base Provider URL = ldap://localhost:10389
Base DN = dc=example,dc=com
Principal = uid=admin,ou=system
Credentials = secret
Now Click on Test LDAP Connection you can see the message that Liferay has connected LDAP successfully.
Now filled other details in the textbox as shown as below.
Authentication Search Filter = (&objectCategory=Person)(mail=@email_address@)
Import Search Filter = (objectClass=person)
Screen Name = sn
Email Address = mail
Password = userPassword
First Name = givenName
Last Name = sn
Job Title = title
Group = memberOf
Now click on Test LDAP Users. You can see the following type of window.
Now your created LDAP user is Synchronize with Liferay. Click on save button so you can see your created Apache LDAP server is configured with Liferay.
Now you have successfully able to login in Liferay with credentials of created user in LDAP. …. 😀