B3. LDAP/AD Authentication |
Configuration File Settings are stored in the auth-ldap-rfc4515.conf configuration file. Configuration files with typical settings are also provided: •auth-ldap-rfc4515-check-group.conf—configuration file template for administrators external authorization via LDAP using the simplified scheme with verification of belonging to an Active Directory group. •auth-ldap-rfc4515-check-group-novar.conf—configuration file template for administrators external authorization via LDAP using the simplified scheme with verification of belonging to an Active Directory group and using variables. •auth-ldap-rfc4515-simple-login.conf—configuration file template for administrators external authorization via LDAP using the simplified scheme. General tags of the auth-ldap-rfc4515.conf configuration file: •<server />—LDAP server definition.
•<set />—variables set by LDAP search.
Variables can be used in values of the add attributes of the <mask /> and <expr /> tags, in value of the value attribute of the <filter /> tag as the \varname, and also in value of the search attribute of the <set /> tag. Allowed recursion level in variables is 16. If the search returns several found objects, only the first one is used. •<mask />—user name templates.
For example:
\1 and \2 are the links on matching masks in the user attribute. •<expr />—user name templates using regular expressions (attributes are the same as in the <mask />). For example:
Correspondence between masks and regular expressions:
•<filter />—LDAP search filter.
•<user-dn/> defines the rules of name translation to the DN (Distinguished Name) using DOS-like masks. In the <user-dn/> tag, the following wildcard characters are allowed: ▫* replaces a sequence of any characters except . , = @ \ and spaces; ▫# replaces a sequence of any characters. •<user-dn-expr/> defines the rules of name translation to the DN using regular expressions. Here is an example of the same name translated to the DN in two ways:
\1 .. \9 define the place where *, # or an expression in brackets is substituted for its value in the template. Accordingly, if the username is specified as login@example.com, you will get the following DN after translation: "CN=login,DC=example,DC=com". •<user-dn-extension-enabled/> allows the ldap_user_dn_translate.ds Lua script (Translating user names to LDAP DN user hook) to be executed to translate usernames to DNs. This script runs after an attempt to apply the user-dn, user-dn-expr rules if no appropriate rule is found. The script has one parameter: the username. The script returns a string that contains the DN or nothing. If an appropriate rule is not found and the script is disabled or returns nothing, the specified username is used as it is. •<bind dn/> specifies the DN of the user that is used to connect to the LDAP server, and <bind password/> specifies the password of the user that is used to connect to the LDAP server (empty DN and password are possible for anonymous connections). For example:
Filters concatenation
If the admingrp get the "CN=ESuite Admins,OU=some name,DC=example,DC=com" value after the search, and the user input was domain\user, when the result filter is
Example of Configuring LDAP/AD Authentication Here is an example of typical settings for authentication using LDAP. Settings are configured in the Control Center, in the Administration → Authentication → LDAP/AD-authentication section (for the Advanced settings). Initial parameters of administrators who must be authenticated: •domain: dc.test.local •Active Directory group: DrWeb_Admins Control Center settings:
|