-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do not construct user DN, but use DN from search #1029
base: 1.2
Are you sure you want to change the base?
Conversation
Not sure that this PR is necessary as the current version already supports authenticating the user by its DN and is more flexible in other senarios. To use DN with the current version use following settings:
|
Yes i've tried setting: which is not valid for ['dn'] I deal with ldap servers and ldap-authenticated application for many years now, Constructing user_dn with ldap_base and other fields is ad-hoc best regards G Array(
|
Sorry I didn't saw that dn doesn't have an array. The following code should fix that and keeps compatibility
|
Yes it does :) You're doing all that to "construct" the user_dn Maybe there is something I don't understand. Do you use LDAP_USERNAME_FIELD for anything else except user_dn? (no offence intended) :-) |
I think there was once a feature request for constucting the username like that but I have to look it up |
I just checked and couldn't find such a feature request. But since there still is the possibility that someone uses this I think we should stick with the current version for 1.2 and apply this pr for 2.x |
I agree with @Skywalker-11 : this pr should be rebased on develop and applied logic moved to |
The proper way to construct a user DN is not by appending LDAP_BIND_PREFIX or LDAP_BIND_SUFFIX to LDAP_USERNAME_FIELD
Instead use DN from ldap_search
The reason is that you might have multiple suffixes for user DNs in LDAP ie:
ou=People,dc=example,dc=com
ou=People,dc=sub,dc=example,dc=com