Bug 42181 - UMC - make automatic substring search in UDM module configurable
UMC - make automatic substring search in UDM module configurable
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 3.3
Other Linux
: P5 normal (vote)
: UCS 3.2-8-errata
Assigned To: Florian Best
Alexander Kläser
:
: 30533 (view as bug list)
Depends on: 37904
Blocks: 42387 42388
  Show dependency treegraph
 
Reported: 2016-08-30 13:39 CEST by Daniel Orrego
Modified: 2016-10-07 18:11 CEST (History)
8 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.046
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): External feedback, Large environments, Usability
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (901 bytes, patch)
2016-09-12 14:33 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Orrego univentionstaff 2016-08-30 13:39:00 CEST
(in UCS 3.X) UMC assumes all searches as subtring. 

(in UCS 4.1) In Bug #37904 EQ search is added to the default search filter. 

For simple purposes, a backport to UCS 3.X of Bug #37904 is enough, but I would add options so that the user can specify the form of search they desire (eg: according to the indices they have defined in slapd.conf) and not only EQ and SUBSTR.



+++ This bug was initially created as a clone of Bug #37904 +++

Noted during a technical training: It's not possible to search by GID: 

- Open the "Groups" module in the UMC
- Select "Advanced Options" and the property "Group ID"
- Enter thr GID of an existing group (e.g. 5001 which is usually Domain Users")

-> No result in found.
Comment 1 Ingo Steuwer univentionstaff 2016-08-30 13:57:46 CEST
I modified the summary. The idea is to make the behaviour of the UDM module in UMC configurable.

In large environments any search runs into an timeout if the substring search is done but the LDAP indices are optimized for EQ searches.
Comment 2 Florian Best univentionstaff 2016-09-12 14:33:25 CEST
Created attachment 7999 [details]
patch
Comment 3 Florian Best univentionstaff 2016-09-12 14:45:41 CEST
@Daniel:
Can you please test this patch. With this you can configure that UMC makes automatically substring searches by pre+appending '*' to the search value.
> ucr set umc/auto_substring_search=false

To completely disallow '*' in the search:
> ucr set umc/allow_substring_search=false

We need to find better names for the UCR variables. Probably replace "umc" with "directory/manager/web/".
Comment 4 Daniel Orrego univentionstaff 2016-09-13 12:21:43 CEST
(In reply to Florian Best from comment #3)
> @Daniel:
> Can you please test this patch. With this you can configure that UMC makes
> automatically substring searches by pre+appending '*' to the search value.
> > ucr set umc/auto_substring_search=false
> 
> To completely disallow '*' in the search:
> > ucr set umc/allow_substring_search=false
> 
> We need to find better names for the UCR variables. Probably replace "umc"
> with "directory/manager/web/".

FYI. I tested the patch and it works.

Thank you Florian.
Comment 5 Florian Best univentionstaff 2016-09-14 12:27:35 CEST
univention-management-console-module-udm (4.0.99-11):
r72569 | Bug #42181: make wildcard and substring search configurable

univention-management-console-module-udm.yaml:
r72570 | YAML Bug #42181 Bug #42379
Comment 6 Florian Best univentionstaff 2016-09-14 13:32:32 CEST
[directory/manager/web/allow_wildcard_search]
Definiert, ob Wildcards (*) in der Suche ausgewertet werden.
Defines whether wildcards (*) are evaluated when searching.

[directory/manager/web/auto_substring_search]
Definiert, ob automatisch nach Teilstrings gesucht wird.
Defines if it is searched automatically for substrings.

It is not possible to have directory/manager/web/allow_wildcard_search=false and directory/manager/web/auto_substring_search=true.
Otherwise I need to patch sanitizers.py, too. REOPEN if wished.
Comment 7 Alexander Kläser univentionstaff 2016-09-19 16:30:03 CEST
Changes: OK
YAML file entry: OK

→ VERIFIED
Comment 8 Janek Walkenhorst univentionstaff 2016-09-22 15:51:52 CEST
<http://errata.software-univention.de/ucs/3.2/447.html>
Comment 9 Florian Best univentionstaff 2016-10-07 18:11:33 CEST
*** Bug 30533 has been marked as a duplicate of this bug. ***