-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Although the UI hides a user's existing password, it is still sent to the browser and can be seen in the network logs. Arguably, this is more an issue with the LDAP access configuration (more on this later), but fixing it is still a good idea for better defense in depth.
The only fathomable reason for this is to verify the "old password" field on the change password prompt, yet that verification process works with only =wx access (i.e. unreadable userPassword), so I think this could easily be fixed without compromising on functionality.
Using =wx access to try and work around this problem allows the user to change their own password (the userPassword attribute has to be manually added since it's not visible and the "old password" field has to be manually enabled), but then ldap-ui reports an error because it tries to read the attribute, making the user think the operation failed.
=> slap_access_allowed: read access denied by =wx
In summary, here's what I think should be changed for better security:
- Fix the issues modifying
userPasswordwhen it's not readable (disabled yet required "old password" field and misleading error after making the change). I can't think of any way of soundly determining whether an object has a password without adding other permissions, which may be less secure [1]. - When the
userPasswordattribute is readable, don't send its value to the browser (even better if it's possible to avoid reading it from LDAP in the first place).
[1] With OpenLDAP 2.4, =wsx allows use of a (userPassword=<value>) filter to find users with specific passwords. This might be fine with salted hashes (like the default SSHA), but certainly isn't with unsalted or unhashed passwords. If this risk is acceptable, it could be used to determine whether an object has a password with the (userPassword=*) filter.