Bug 57393 - index: univentionObjectIdentifier not indexed
Summary: index: univentionObjectIdentifier not indexed
Status: VERIFIED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: LDAP
Version: UCS 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 5.2-2
Assignee: Arvid Requate
QA Contact: Julia Bremer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-18 12:01 CEST by Tim Breidenbach
Modified: 2025-06-11 15:12 CEST (History)
3 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?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.057
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2025041421000032
Bug group (optional):
Customer ID: 02149
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Breidenbach univentionstaff 2024-06-18 12:01:19 CEST
In a customer project we use the univentionObjectIdentifier to store the ID from an external IAM at user/group objects.

In syslog there are a lot of entries like

slapd[1374]: <= mdb_equality_candidates: (univentionObjectIdentifier) not indexed 

I guess that the indexing wouldnt be an improvement only for this customer but for all environments (for the case that the attribute is in future used internally from UCS or ucs@school.)
Comment 1 Philipp Hahn univentionstaff 2024-06-18 12:24:46 CEST
See https://forge.univention.org/bugzilla/show_bug.cgi?id=53259 why is not not a good idea to index too much.

You're always free to extend UCRV 'ldap/index/eq' yourself with all the bad consequences that might have.
Comment 2 Daniel Tröder univentionstaff 2024-06-18 13:14:46 CEST
In the case the attribute is used, it should be indexed.
When it's not used, it shouldn't be indexed.

There should be an easy and safe way for customers/ProfS to enable it.
If using 'ldap/index/eq' is not a good way, then it's not a solution.


A topic for a different issue might be a system diagnose module that greps in syslog for occurrences of 'mdb_equality_candidates' and provides admins with a generic solution or a link to a help article.
Comment 3 Arvid Requate univentionstaff 2024-06-18 17:14:28 CEST
/usr/share/univention-ldap/ldap_setup_index --add-eq univentionObjectIdentifier --only-update-ucr; systemctl stop slapd; \
slapindex -f /etc/ldap/slapd.conf univentionObjectIdentifier; systemctl start slapd
Comment 5 Arvid Requate univentionstaff 2024-06-18 17:27:57 CEST
Or, without restart of slapd:

/usr/share/univention-ldap/ldap_setup_index --add-eq univentionObjectIdentifier --only-update-ucr; \
echo -e 'dn: olcDatabase={1}mdb,cn=config\nchangetype: modify\nadd: olcDbIndex\nolcDbIndex: univentionObjectIdentifier eq' | ldapmodify -x -H LDAPI://
Comment 6 Daniel Tröder univentionstaff 2024-06-18 17:50:52 CEST
Would that add the setting to UCR?
IMHO, a solution should document the change and make it repeatable in case of a system/cluster rebuild.
Comment 9 Arvid Requate univentionstaff 2025-05-23 12:11:17 CEST
Regarding 57393 Coment 7: No that's not recommended. The tool for adding/removing LDAP attributes
to the index configuration (in UCR) is: /usr/share/univention-ldap/ldap_setup_index

The problem of that script is only, that by default it runs a full slapindex over all configured
LDAP attributes. That's why in Bug 57393 Comment 3 I pointed out a way how this can be avoided
by adding the relatively new option --only-update-ucr which only adjust the UCR variables but skips
the full re-index, so you can to it manually for one specific attribute.
Comment 10 Arvid Requate univentionstaff 2025-06-11 13:26:55 CEST
994e8bc679c | Configure eq index for univentionObjectIdentifier by default

Later updated by commits for Bug #58318.
Comment 11 Julia Bremer univentionstaff 2025-06-11 15:12:00 CEST
OK: univentionObjectIdentifier is indexed for eq matching in 5.2-2