Skip to content

LDAP searches can return weird matches based on an ID match #1673

@sdwilsh

Description

@sdwilsh

Describe the bug

LDAP group searches (performed when trying to add a new member to a space, for instance) do a substring search for both the cn and the entryUUID. This leads to weird experiences where results are returned that do not match the query in an obvious way.

Steps to reproduce

  1. Have a group with an entryUUID that contains a string such as "beef" in it. This might be difficult because these are generated by the LDAP provider.
  2. Try to add "Beef Tobin" to a space

Expected behavior

Only see an entry with a name that contains "beef" (a person named Beef Tobin)

Actual behavior

See an entry that does not contain "beef" for the group that has the entryUUID with the substring "beef".

Additional context

This came up when I discovered I couldn't add someone to a Space. After some debugging, it turned out that my LDAP provider (lldap, which isn't uncommon for self-hosters to run) did not support substring queries on entryUUID, and so the LDAP query failed. I filed an issue there to add that support, but they rightly pushed back that the behavior is odd.

I think it's reasonable to match an an exact entryUUID hit in LDAP so power users/admins can get the exact group they want if they know it, but it can be jarring and produce unexpected results to end users since searches start with as few as three characters.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions