@@ -123,6 +123,26 @@ own file to not leak secrets into your configuration:
123123
124124Please note that every trailing ` \n` in the password file will be stripped automatically.
125125
126+ # ## Simple vs search mode, and attribute mapping
127+
128+ The module behaves quite differently depending on the configured `mode` :
129+
130+ - If `mode` is omitted (or set to `simple`), the module simply builds a DN from
131+ ` attributes.uid` , binds as the authenticating user, and stops there. No LDAP
132+ search is performed, meaning `attributes.name` and `attributes.mail` are never
133+ queried. When a Matrix user is created in this mode their display name is the
134+ username they logged in with and their email address is left blank.
135+ - To fetch attribute values from LDAP you **must** run in `mode : search`. You can
136+ optionally supply `bind_dn`/`bind_password` so the module performs the search
137+ with a service account. If they are omitted, an anonymous bind is attempted
138+ and succeeds only if your LDAP server allows anonymous reads.
139+
140+ Also note that attribute data (`name`, `mail`) is fetched only when a Matrix
141+ user is created. During each authentication, the module re-checks LDAP
142+ credentials, but existing Matrix accounts keep the profile data stored in
143+ Synapse. Therefore logging in again will not refresh the display name or email
144+ address.
145+
126146# # Active Directory forest support
127147
128148If the ``active_directory`` flag is set to `true`, an Active Directory forest will be
0 commit comments