Normalize LDAP user DNs (downcase and remove excess spaces)
What does this MR do?
Normalizes LDAP user distinguishing names by downcasing and removing excess spaces around attribute names and values.
Note that this work was done on EE first (for faster development including EE only changes), then cherry-picked to CE. I decided to make this look more like a traditional workflow (develop on CE, port to EE) by squashing the EE commits, but this is why the MR review and discussion is in the EE MR.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
There are rules in LDAP that allow different string representations of DNs to be equal (i.e. spaces around attribute names and values should be ignored).
So anywhere we compare DNs as strings (e.g. when syncing a group with its LDAP provider, or when looking up an Identity in our DB, etc.), we should compare them in some normalized form.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together