Debian Codegraph @

doc/sources/admin/authldap.rst

raw
1 LDAP
2 ====
3
4 ============== ===== ========
5 Authentication Users Password
6 ============== ===== ========
7 ✔ ✔ ✔
8 ============== ===== ========
9
10 Presentation
11 ------------
12
13 LL::NG can use an LDAP directory to:
14
15 - authenticate user
16 - get user attributes
17 - get groups where user is registered
18 - change password (with server side password policy management)
19
20 This works with every LDAP v2 or v3 server, including
21 :doc:`Active Directory<authad>`.
22
23 LL::NG is compatible with `LDAP password
24 policy <https://opends.dev.java.net/public/standards/draft-behera-ldap-password-policy.txt>`__:
25
26 - LDAP server can check password strength, and LL::NG portal will
27 display correct errors (password too short, password in history,
28 etc.)
29 - LDAP sever can block brute-force attacks, and LL::NG will display
30 that account is locked
31 - LDAP server can force password change on first connection, and LL::NG
32 portal will display a password change form before opening SSO session
33
34 Configuration
35 -------------
36
37 In Manager, go in ``General Parameters`` > ``Authentication modules``
38 and choose LDAP for authentication, users and/or password modules.
39
40
41 .. tip::
42
43 For :doc:`Active Directory<authad>`, choose
44 ``Active Directory`` instead of ``LDAP``.
45
46 Authentication level
47 ~~~~~~~~~~~~~~~~~~~~
48
49 The authentication level given to users authenticated with this module.
50
51
52 .. attention::
53
54 As LDAP is a login/password based module, the
55 authentication level can be:
56
57 - increased (+1) if portal is protected by SSL (HTTPS)
58 - decreased (-1) if the portal autocompletion is allowed (see
59 :doc:`portal customization<portalcustom>`)
60
61
62
63 Exported variables
64 ~~~~~~~~~~~~~~~~~~
65
66 List of attributes to query to fill user session. See also
67 :doc:`exported variables configuration<exportedvars>`.
68
69 Connection
70 ~~~~~~~~~~
71
72 - **Server host**: LDAP server hostname or URI (by default: localhost).
73 Accept some specificities:
74
75 - More than one server can be set here separated by spaces or
76 commas. They will be tested in the specified order.
77 - To use StartTLS, set ``ldap+tls://server`` and to use LDAPS, set
78 ``ldaps://server`` instead of server name.
79 - If you use StartTLS or LDAPS, you can set any of the
80 `Net::LDAP <http://search.cpan.org/~gbarr/perl-ldap/lib/Net/LDAP.pod>`__
81 start_tls() options in the URL, such as ``ldap+tls://server/verify=none``
82 or ``ldaps://server/cafile=/etc/ssl/ca.pem&sslversion=tlsv1_2``. You can
83 also use cafile and capath parameters.
84
85 - **Server port**: TCP port used by LDAP server if different from the standard
86 ports. Can also be specified in the server host URI.
87 - **Verify LDAP server certificate**: It is highly recommended to verify the
88 identity of the remote server. This setting is only enforced for LDAPS or
89 TLS connections.
90 - **Users search base**: Base of search in the LDAP directory.
91 - **Account**: DN used to connect to LDAP server. By default, anonymous
92 bind is used.
93 - **Password**: password used to connect to LDAP server. By default,
94 anonymous bind is used.
95 - **Connection timeout**: applies only when initiating the connection
96 - **Operation timeout**: applies to all LDAP operations
97 - **Version**: LDAP protocol version.
98 - **Binary attributes**: regular expression matching binary attributes
99 (see
100 `Net::LDAP <http://search.cpan.org/~gbarr/perl-ldap/lib/Net/LDAP.pod>`__
101 documentation).
102 - **CA file path**: This allows you to override the default system-wide
103 certificate authorities by giving a single file containing the CA used by the
104 LDAP server.
105 - **CA directory path**: This allows you to override the default system-wide
106 certificate authorities by giving the path of a directory containing your
107 trusted certificates.
108
109
110 .. attention::
111
112 LL::NG needs anonymous access to LDAP Directory
113 RootDSE in order to check LDAP connection.
114
115 Filters
116 ~~~~~~~
117
118
119 .. tip::
120
121 In LDAP filters, $user is replaced by user login, and $mail by
122 user email.
123
124 - **Default filter**: default LDAP filter for searches, should not be
125 modified.
126 - **Authentication filter**: Filter to find user from its login
127 (default: ``(&(uid=$user)(objectClass=inetOrgPerson))``)
128 - **Mail filter**: Filter to find user from its mail (default:
129 ``(&(mail=$mail)(objectClass=inetOrgPerson))``)
130 - **Alias dereference**: How to manage LDAP aliases. (default:
131 ``find``)
132
133
134 .. tip::
135
136 For Active Directory, the default authentication filter is:
137
138 ::
139
140 (&(sAMAccountName=$user)(objectClass=person))
141
142 And the mail filter is:
143
144 ::
145
146 (&(mail=$mail)(objectClass=person))
147
148
149
150 .. _authldap-groups:
151
152 Groups
153 ~~~~~~
154
155 - **Search base**: DN of groups branch. If no value, disable group
156 searching.
157 - **Group Filter**: LDAP filter for groups, can be used to have several
158 group object classes (for example ``(|(objectClass=groupOfNames)(objectClass=groupOfURLs))``).
159 If this value is empty, the **Object class** parameter is used to build the filter.
160 - **Object class**: objectClass of the groups (default: ``groupOfNames``).
161 If you are using Active Directory you need to modify this value to ``group``.
162 This parameter is ignored if **Group filter** is set.
163 - **Target attribute**: name of the attribute in the groups storing the
164 link to the user (default: member).
165 - **User source attribute**: name of the attribute in users entries
166 used in the link (default: dn).
167 - **Searched attributes**: name(s) of the attribute storing the name of
168 the group, spaces separated (default: cn).
169 - **Decode searched value**: with Active Directory, member DN value is
170 sometimes bad decoded and groups are not found, activate this option
171 to force value decoding.
172 - **Recursive**: activate recursive group functionality (default: 0).
173 If enabled, if the user group is a member of another group (group of
174 groups), all parents groups will be stored as user's groups.
175 - **Group source attribute**: name of the attribute in groups entries
176 used in the link, for recursive group search (default: dn).
177
178
179 .. note::
180
181 The groups that the user belongs to are available as ``$groups``
182 and ``%hGroups``, as documented :ref:`here<macros_and_groups>`
183
184
185 .. attention::
186
187 If your LDAP countains over a thousand groups, you
188 should avoid using group processing, check out
189 :ref:`the performance page<performances-ldap-performances>` for
190 alternatives
191
192 Password
193 ~~~~~~~~
194
195 - **Password policy control**: enable to use LDAP password policy. This
196 requires at least Net::LDAP 0.38. (see ppolicy workflow below)
197 - **Password modify extended operation**: enable to use the LDAP
198 extended operation ``password modify`` instead of standard modify
199 operation.
200 - **Change as user**: enable to perform password modification with
201 credentials of connected user. This requires to request user old
202 password (see :doc:`portal customization<portalcustom>`).
203 - **LDAP password encoding**: can allow one to manage old LDAP servers
204 using specific encoding for passwords (default: utf-8).
205 - **Use reset attribute**: enable to use the password reset attribute.
206 This attribute is set by LemonLDAP::NG when
207 :doc:`password was reset by mail<resetpassword>` and the user choose
208 to generate the password (default: enabled).
209 - **Reset attribute**: name of password reset attribute (default:
210 pwdReset).
211 - **Reset value**: value to set in reset attribute to activate password
212 reset (default: TRUE).
213 - **Allow a user to reset his expired password**: if activated, the
214 user will be prompted to change password if his password is expired
215 (default: disabled)
216 - **Search for user before password change**: this option forces the password
217 change module to search for the user again, refreshing its DN. This feature
218 is only useful in rare cases when you use LDAP as the password module, but
219 not as the UserDB module. (default: enabled)
220 - **Delay to force password change before expiration**: if this value is set,
221 users will be forced to change their password if it expires in less than
222 the given number of seconds.
223 - **IBM Tivoli DS support**: enable this option if you use ITDS. LL::NG
224 will then scan error message to return a more precise error to the
225 user.
226
227 **Password expiration warning workflow** |image0| **Password expiration
228 workflow** |image1|
229
230 .. |image0| image:: /documentation/lemonldap-ng-password-expiration-warning.png
231 .. |image1| image:: /documentation/lemonldap-ng-password-expired.png
232