Get MAP_KEY results when logged in as actual user #23
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.
Some LDAP systems let the bind_user see all attributes of another user, but some LDAP systems restrict what can be seen by the bind_user, especially if doing an anonymous bind. To make the MAP_KEY work as expected, re-search after connecting with the real user/password.
As an optimization, if a customer is happy with the results from the initial search, give them a config parameter to avoid the second search. This gives them functionality identical to today in case they need it. But it's opt-in to the old style. Doing nothing will give them the new behavior with MAP_KEY results when logged in as the actual user.
Note: this issue was found on a JPM system which uses anonymous bind. The initial search gives the name via 'cn', but doesn't provide the email address of the user. Adding the 2nd search gave the expected results for the email address and other parameters.