Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ldap search for attributes with no substr matching rule #32499

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

julien-nc
Copy link
Member

Wildcards are not supported when used in search filters for the entryUUID attribute. I guess it's the same for some other attributes as well.

IMO we can make an exact search filter in this case.

Is there a cleaner way to address that issue?

@come-nc
Copy link
Contributor

come-nc commented May 23, 2022

It’s not limited to entryUUID it’s any field without a substr matching rule.
Maybe we can use something like (|(field=search)(field=search*)) ?

@julien-nc julien-nc force-pushed the enh/noid/ldap-search-entryuuid-no-wildcard branch from 5f6fab5 to 666ec01 Compare May 23, 2022 09:29
@julien-nc
Copy link
Member Author

@come-nc Much better indeed!

@julien-nc julien-nc changed the title Fix Ldap search with entryUUID filter Fix Ldap search for attributes with no substr matching rule May 23, 2022
@julien-nc
Copy link
Member Author

@come-nc @blizzz What do you think about the way it's done now with the OR exact_search?

@blizzz
Copy link
Member

blizzz commented May 31, 2022

Do we know whether this might have performance impact? I would assume not, but then I know those products and I would not be surprised…

@julien-nc
Copy link
Member Author

@blizzz I have no idea but I think the partial search we do anyway might be way more costly than the additional exact search.

@blizzz
Copy link
Member

blizzz commented Jun 2, 2022

@blizzz I have no idea but I think the partial search we do anyway might be way more costly than the additional exact search.

Certainly. What I wonder is whether the products handle this now smartly, or whether this has an additional performace penalty. For sure we cannot go without the appended wildcard for ordinary searches. An alternative would be a list of known attributes for which we do not add the wildcard. But, if this approach works out fine it is preferable – looks duplicated, but less complex.

@come-nc
Copy link
Contributor

come-nc commented Jun 2, 2022

@blizzz I have no idea but I think the partial search we do anyway might be way more costly than the additional exact search.

Certainly. What I wonder is whether the products handle this now smartly, or whether this has an additional performace penalty. For sure we cannot go without the appended wildcard for ordinary searches. An alternative would be a list of known attributes for which we do not add the wildcard. But, if this approach works out fine it is preferable – looks duplicated, but less complex.

I think techincally you could query the ldap server for schema information to know which fields have substr matching rules and which have not. But that seems overkill for current situation.

@PVince81 PVince81 requested a review from artonge June 10, 2022 13:40
This was referenced Aug 12, 2022
This was referenced Aug 24, 2022
This was referenced Sep 6, 2022
@skjnldsv skjnldsv mentioned this pull request Sep 15, 2022
This was referenced Sep 20, 2022
@blizzz blizzz modified the milestones: Nextcloud 25, Nextcloud 26 Sep 22, 2022
@blizzz blizzz mentioned this pull request Feb 1, 2023
@skjnldsv skjnldsv mentioned this pull request Feb 23, 2023
@blizzz blizzz mentioned this pull request Mar 7, 2023
@blizzz blizzz modified the milestones: Nextcloud 26, Nextcloud 27 Mar 9, 2023
@blizzz blizzz added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Apr 13, 2023
@blizzz
Copy link
Member

blizzz commented Apr 13, 2023

/rebase

@blizzz blizzz enabled auto-merge April 13, 2023 19:54
…s without a substr matching rule

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug feature: ldap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants