Add LDAP alias dereferencing support to user and group searches #3713
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.
Overview
Implementation of LDAP alias directory dereferencing option in LDAP connector. Our LDAP tree uses baseline user directories (with passwords) under
dc=[org]
and per-system aliases to user directories granted access to [system] inou=[system],dc=[org]
. If DEX cannot dereference LDAP alias directories, it cannot properly lookup or bind to the user's base directory.What this PR does / why we need it
For LDAP directory trees that include alias directories, the user/group searches will not dereference an alias directory to the target. The Go LDAP module defaults to never dereferencing alias directories.
The
userSearch
andgroupSearch
config objects now have aderef
key-value pair that can take values:never
(default),always
,searching
,finding
inline with the LDAPv3 module's capabilities. Settingderef: always
allows aliased user directories to be dereferenced to their target LDAP directory, and the DN and attributes of the target are returned instead of those of the alias directory.One minor additional fixup: if neither the
emailAttr
nor theemailSuffix
keys are defined on theuserSearch
config object, then the code will not object but fail authentication with the message:A check of the config was added to abort startup if both
emailAttr
andemailSuffix
are undefined in theuserSearch
config.Special notes for your reviewer