During an investigation into filter optimisation in 389DS it was discovered that two attributes of the certmap query are unindexed. Due to the nature of LDAP filters, if any member of an OR query is unindexed, the entire OR becomes unindexed.
As a result this query is effectively:
(& (| (usercertificate;binary=) (ipaCertMapData=X509:<I>O=DEV.BLACKHATS.NET.AU,CN=Certificate Authority<S>O=DEV.BLACKHATS.NET.AU,CN=ipauser1) (altsecurityidentities=X509:<I>O=DEV.BLACKHATS.NET.AU,CN=Certificate Authority<S>O=DEV.BLACKHATS.NET.AU,CN=ipauser1) ) (objectClass=posixAccount) (uid=*) (& (uidNumber=*) (! (uidNumber=0) ) ) ) EFFECTIVE: (& (objectClass=*) (objectClass=posixAccount) (uid=*) (& (uidNumber=*) (! (uidNumber=0) ) ) )
This is then basically a full-table scan, which applies the filter test to the contained members.
The two attributes in question are ipaCertMapData and altsecurityidentities.
For reference, see:
https://pagure.io/freeipa/issue/7932 https://pagure.io/389-ds-base/pull-request/50252#comment-85208
Metadata Update from @pcech: - Issue tagged with: Falcon
Metadata Update from @frenaud: - Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/3110
master:
ipa-4-8:
ipa-4-7:
ipa-4-6:
Metadata Update from @abbra: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)