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
92 - **Password**: Password used to connect to LDAP server
93 - **Client certificate**: Path of the client certificate to bind with.
94 ``CN`` of the certificate will be used to connect to LDAP server.
95 ``CN`` sould be mapped to an accound with ``olcAuhtzRegexp`` directive.
96 This feature requires `Authen::SASL <https://metacpan.org/pod/Authen::SASL>`__.
97 - **Client key**: Path of the private key associated to client certificate
98 - **Connection timeout**: Applies only when initiating the connection
99 - **Operation timeout**: Applies to all LDAP operations
100 - **Version**: LDAP protocol version.
101 - **Binary attributes**: Regular expression matching binary attributes
102 (see
103 `Net::LDAP <http://search.cpan.org/~gbarr/perl-ldap/lib/Net/LDAP.pod>`__
104 documentation).
105 - **CA file path**: This allows you to override the default system-wide
106 certificate authorities by giving a single file containing the CA used by the
107 LDAP server.
108 - **CA directory path**: This allows you to override the default system-wide
109 certificate authorities by giving the path of a directory containing your
110 trusted certificates.
111
112
113 .. attention::
114
115 LL::NG needs anonymous access to LDAP Directory RootDSE in order to check LDAP connection.
116
117
118 Filters
119 ~~~~~~~
120
121 .. tip::
122
123 In LDAP filters, $user is replaced by user login, and $mail by
124 user email.
125
126 - **Default filter**: default LDAP filter for searches, should not be
127 modified.
128 - **Authentication filter**: Filter to find user from its login
129 (default: ``(&(uid=$user)(objectClass=inetOrgPerson))``)
130 - **Mail filter**: Filter to find user from its mail (default:
131 ``(&(mail=$mail)(objectClass=inetOrgPerson))``)
132 - **Alias dereference**: How to manage LDAP aliases. (default:
133 ``find``)
134
135
136 .. tip::
137
138 For Active Directory, the default authentication filter is:
139
140 ::
141
142 (&(sAMAccountName=$user)(objectClass=person))
143
144 And the mail filter is:
145
146 ::
147
148 (&(mail=$mail)(objectClass=person))
149
150
151
152 .. _authldap-groups:
153
154 Groups
155 ~~~~~~
156
157 - **Search base**: DN of groups branch. If no value, disable group
158 searching.
159 - **Group Filter**: LDAP filter for groups, can be used to have several
160 group object classes (for example ``(|(objectClass=groupOfNames)(objectClass=groupOfURLs))``).
161 If this value is empty, the **Object class** parameter is used to build the filter.
162 - **Object class**: objectClass of the groups (default: ``groupOfNames``).
163 If you are using Active Directory you need to modify this value to ``group``.
164 This parameter is ignored if **Group filter** is set.
165 - **Target attribute**: name of the attribute in the groups storing the
166 link to the user (default: member).
167 - **User source attribute**: name of the attribute in users entries
168 used in the link (default: dn).
169 - **Searched attributes**: name(s) of the attribute storing the name of
170 the group, spaces separated (default: cn).
171 - **Decode searched value**: with Active Directory, member DN value is
172 sometimes bad decoded and groups are not found, activate this option
173 to force value decoding.
174 - **Recursive**: activate recursive group functionality (default: 0).
175 If enabled, if the user group is a member of another group (group of
176 groups), all parents groups will be stored as user's groups.
177 - **Group source attribute**: name of the attribute in groups entries
178 used in the link, for recursive group search (default: dn).
179
180
181 .. note::
182
183 The groups that the user belongs to are available as ``$groups``
184 and ``%hGroups``, as documented :ref:`here<macros_and_groups>`
185
186
187 .. attention::
188
189 If your LDAP countains over a thousand groups, you
190 should avoid using group processing, check out
191 :ref:`the performance page<performances-ldap-performances>` for
192 alternatives
193
194 Password
195 ~~~~~~~~
196
197 - **Password policy control**: enable to use LDAP password policy. This
198 requires at least Net::LDAP 0.38. (see ppolicy workflow below)
199 - **Password modify extended operation**: enable to use the LDAP
200 extended operation ``password modify`` instead of standard modify
201 operation.
202 - **Change as user**: enable to perform password modification with
203 credentials of connected user. This requires to request user old
204 password (see :doc:`portal customization<portalcustom>`).
205 - **LDAP password encoding**: can allow one to manage old LDAP servers
206 using specific encoding for passwords (default: utf-8).
207 - **Use reset attribute**: enable to use the password reset attribute.
208 This attribute is set by LemonLDAP::NG when
209 :doc:`password was reset by mail<resetpassword>` and the user choose
210 to generate the password (default: enabled).
211 - **Reset attribute**: name of password reset attribute (default:
212 pwdReset).
213 - **Reset value**: value to set in reset attribute to activate password
214 reset (default: TRUE).
215 - **Allow a user to reset his expired password**: if activated, the
216 user will be prompted to change password if his password is expired
217 (default: disabled)
218 - **Search for user before password change**: this option forces the password
219 change module to search for the user again, refreshing its DN. This feature
220 is only useful in rare cases when you use LDAP as the password module, but
221 not as the UserDB module. (default: enabled)
222 - **Delay to force password change before expiration**: if this value is set,
223 users will be forced to change their password if it expires in less than
224 the given number of seconds.
225 - **IBM Tivoli DS support**: enable this option if you use ITDS. LL::NG
226 will then scan error message to return a more precise error to the
227 user.
228
229 **Password expiration warning workflow** |image0| **Password expiration
230 workflow** |image1|
231
232 .. |image0| image:: /documentation/lemonldap-ng-password-expiration-warning.png
233 .. |image1| image:: /documentation/lemonldap-ng-password-expired.png
234