WIP: BIND_AS_AUTHENTICATING_USER should bind with the authenticating user also when using the Search/Bind configuration #180
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been struggling with the problem the whole day:
I Was using the following configuration, because I wanted to first bind, using the authenticating user credentials, and then perform an ldap search.
This is the configuration i'm using
Which caused me the error.
The fix was to actually bind with the authenticating user when
AUTH_LDAP_BIND_AS_AUTHENTICATING_USER
is set to True and when not usingAUTH_LDAP_USER_DN_TEMPLATE
but instead usingAUTH_LDAP_USER_SEARCH
.Note that I had to add at line #479 because
self.dn
is not required to be set nor should be read otherwise a binding withAUTH_LDAP_BIND_DN
andAUTH_LDAP_BIND_PASSWORD
is done.