Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions security/ldap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -257,19 +257,22 @@ and will not be considered as authenticated fully.
uid_key
.......

**type**: ``string`` **default**: ``sAMAccountName``
**type**: ``string`` **default**: ``null``

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

* ``sAMAccountName``
* ``sAMAccountName`` (default)
* ``userPrincipalName``
* ``uid``

If you configure the value ``null`` for the UID key, the default UID key
``sAMAccountName`` is used.

filter
......

**type**: ``string`` **default**: ``({uid_key}={username})``
**type**: ``string`` **default**: ``null``

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

If you configure this key with the value ``null``, the default filter
``({uid_key}={username})`` is used.

Of course, the username will be escaped, in order to prevent `LDAP injection`_.

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