Skip to content

Normalize LDAP user DNs (downcase and remove excess spaces)

username-removed-1144264 requested to merge mk-normalize-ldap-user-dns into master

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?

What are the relevant issue numbers?

Edited by username-removed-1144264

Merge request reports