Skip to content

Commit c19e78d

Browse files
hiddewiejaviereguiluz
authored andcommitted
Added docs for LDAP user provider with default (null) values
1 parent d2907db commit c19e78d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

security/ldap.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,19 +257,22 @@ and will not be considered as authenticated fully.
257257
uid_key
258258
.......
259259

260-
**type**: ``string`` **default**: ``sAMAccountName``
260+
**type**: ``string`` **default**: ``null``
261261

262262
This is the entry's key to use as its UID. Depends on your LDAP server
263263
implementation. Commonly used values are:
264264

265-
* ``sAMAccountName``
265+
* ``sAMAccountName`` (default)
266266
* ``userPrincipalName``
267267
* ``uid``
268268

269+
If you configure the value ``null`` for the UID key, the default UID key
270+
``sAMAccountName`` is used.
271+
269272
filter
270273
......
271274

272-
**type**: ``string`` **default**: ``({uid_key}={username})``
275+
**type**: ``string`` **default**: ``null``
273276

274277
This key lets you configure which LDAP query will be used. The ``{uid_key}``
275278
string will be replaced by the value of the ``uid_key`` configuration value
@@ -279,6 +282,9 @@ replaced by the username you are trying to load.
279282
For example, with a ``uid_key`` of ``uid``, and if you are trying to
280283
load the user ``fabpot``, the final string will be: ``(uid=fabpot)``.
281284

285+
If you configure this key with the value ``null``, the default filter
286+
``({uid_key}={username})`` is used.
287+
282288
Of course, the username will be escaped, in order to prevent `LDAP injection`_.
283289

284290
The syntax for the ``filter`` key is defined by `RFC4515`_.

0 commit comments

Comments
 (0)