The details of this article may also be covered in Configuring Liferay's LDAP Settings to Import Users.
This article provides a comprehensive walkthrough for integrating an Active Directory Server with Liferay Portal. By integrating Active Directory with Liferay Portal, you will be able to import the users from your LDAP server into Liferay Portal, along with their group associations. If you have not yet set up your Active Directory Server, the information on acquiring and setting up the software can be found on the Microsoft Azure site.
In this article, you'll be shown...
- How to create an organizational unit in Active Directory
- How to add the LDAP server within Liferay Portal
- How to map the settings for import, and
- How to import users from Active Directory
Resolution
Create an Organization Unit
- In Active Directory, create an Organizational Unit (OU) and name it LDAPtest.
- Within LDAPtest, create a new user. Name that user LDAPtest1. Make sure to enter the users first and last name, email and password. Likewise, under Account > Account Options check the box for User cannot change password. If this is not selected, when you attempt to sign in to the Liferay Portal with LDAP users, you will receive authentication errors.
- Within LDAPtest, create a new group and name the group LDAPgroup.
- In LDAPtest, create a new user named LDAPtest2, and add that user as a member of LDAPgroup. Again, under Account > Account Options check the box for User cannot change password.
Once the above steps are completed, we are ready to configure Liferay Portal to accept an import of these users and the group.
LDAP Mapping
- Start the Portal and log in as the Administrator
- Navigate to Control Panel > Portal Settings > Authentication > LDAP > LDAP Servers and select Add
- Select the Microsoft Active Directory Server radio button and click Reset Values
- Enter the below credentials for the Connection Values:
Under Base Provider URL, place the IP address of the machine with Active Directory on it instead of the IP address noted above. Thus, it takes Base Provider URL takes the following form:
ldap://$IP_ADDRESS:389After filling in the above fields, verify that you are able to establish a connection via the Test LDAP connection button. This connection needs to occur before entering the other LDAP mappings.
- Enter the below User Values
Under Authentication Search Filter you can establish whether users are authenticated via screen name, email address, or another filter. In the above example, we are authenticating users via screen name.
Verify that the LDAP users can be imported with the above mappings by selecting Test LDAP Users. If we have followed this process correctly, we should see two users, with only one user having a group association.
Also, do not worry about the warning given in the above screenshot. As long as everything is filled out, except the password, the mappings should be sufficient to import the users.
- Enter the below Group Value
Verify that the LDAP group can be imported with the above mappings by selecting Test LDAP Groups.
- Once all the connections and mappings have been tested, select Save at the bottom of the page.
Import Users into the Liferay Platform
- Under Control Panel > Portal Settings > Authentication > LDAP select enabled. Save the updated settings. Also, verify that the server we added in steps 2-6 displays under LDAP Servers.
- Navigate to Control Panel > Portal Settings > Authentication and verify that authentication is by Screen name.
- Sign out of the portal, and log in as the two users we created with LDAP.
- After importing the users, sign in again as the Administrator, navigate to Control Panel > User Groups and note that the Group we created in LDAP has been imported. Also, note that the user LDAPtest2 is assigned as a member of the User Group.