Integration domain: de-duplicate code between AD and LDAP #50
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.
Integration domain: users_dn is a full DN
The config parameter users_dn is documented as
"Optional full DN of LDAP tree where users are"
but the current implementation is not consistent with the description.
Make this parameter mandatory, and expect it to contain the full
DN of the users tree, for instance:
ou=users,dc=example,dc=com
With this new behavior, no need to build the user dn from
relative dn + suffix.
Integration domain: de-duplicate code between AD and LDAP
The classes are 95% identical.
The current differences so far:
the expected naming convention: users in AD are named
cn=,$USER_BASE_DN
while users in LDAP are named
uid=,$USER_BASE_DN
the bind DN (client_id) used to connect to the remote AD/LDAP
server. For AD the code is using client_id@domain but we can
use a user DN instead.
Introduce a class variable _user_rdn_attr that stores the
RDN attribute used to build a user DN.
Integration domain: allow 255 chars for client_id
The client_id contains a bind DN and can be longer than 20 chars.