LDAP User Authentication

2022-04-26 13:21:03
Kelsea
2402
Last edited by Hongyan on 2023-09-27 13:18:55
Share links

LDAP User Authentication

LDAP authentication requires an LDAP extension for PHP. Click here to view how to install LDAP to PHP.


Users of the LDAP server can be automatically logged in by configuring LDAP. Users can also be imported from LDAP, which solves the problem of ZenTao user import and single sign-on under Windows domain (Windows AD).

1. LDAP Server Configuration

Configure it in "More" - "Admin" - "System" - "LDAP".

If the configuration is successful and correct, when you use the LDAP username and password to log in, the system will automatically authenticate the login and the user will be added to the database. Check the anonymous box, the admin account and password will be hidden automatically and do not need to be filled in.

Note:

  • Base DN is filled in as follows.

  • The login name is filled in with the corresponding user name in the LDAP server, as shown below.

2. Active Directory Configuration

Select the Server Type as "Active Directory". You need to fill in the username and password as the anonymous login is not allowed.

Note: The Admin Account must have administrative privileges to the domain, otherwise the query data will be wrong.


Setting Allow Access to the Active Directory, otherwise, you cannot log in.

3. Import Users

Click the button "Import users from LDAP". Next, link to local account - select local account, then you bind LDAP users to the local account successfully.

3.1 Search

There is a button "Search" in "More" - "Admin" - "Member" - "User" - "Import users from LDAP".


Click the button "Search" to search for the users that need to be imported based on the requirement. In addition to searching for the attributes set during LDAP configuration, which include login name, real name, mobile, phone, and Email, the custom attributes are also available to be searched.


In LDAP server, there are attributes other than our default attribute configuration, which can be searched by customizing. You need to fill in the search box with the name and value of the attribute.

For example,

  • If we want to search for sn attributes that are NOT equal to wang, we need to fill in ! (sn=wang) in the custom search box.
  • If we want to search for sn attributes that equal to wang, we need to fill in sn=wang in the custom search box.

Other attributes can be searched in the same way.

3.2 Inspect the Same Names and Showing the Differences

In the case there is an overlap between the real name of the LDAP user and the real name of the ZenTao user when importing users from LDAP, the following differences can be shown in LDAP configuration.

  • Add the number after the real name. e.g. Jason, Jason 2.
  • Add the department after the real name. e.g. Jason (Dev Team), Jason (QA Team).

The default is to add the number after the real name.


If you prefer to add the department after the real name, you need to select the department they belong to during the import. If no selection is made, it will be shown as Jason (0).

Write a Comment
Comment will be posted after it is reviewed.