I have a multiple DITs in my OpenLDAP server. I made user cn=config the root so that cn=config has root access to all DITs (each DIT). In addition, there is a per-DIT administrator IDed as cn=admin,$suffix [for example cn=admin,dc=example,dc=com or whatever].
I added a custom NAME attribute to admin and user objects. The attribute is named: 'serviceLevel' and values are either 'suspended' or 'normal'. The attribute is optional, and when it is not present, we interpret it as normal - not suspended.
Currently, when serviceLevel is set to 'suspended' my ACL suspends regular users and does not suspend local/DIT admins. I need admins to be unable to authenticate, like regular users.
The sample current LDIF setting ACLs is below:
dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcAccess
olcAccess: {0}to attrs=userPassword,shadowLastChange
filter=(serviceLevel=suspended)
by dn="cn=config" write
by * none
olcAccess: {1}to attrs=userPassword,shadowLastChange
filter=(!(serviceLevel=suspended))
by self write
by anonymous auth
by dn="cn=admin,dc=directory,dc=com" write
by dn="cn=config" write
by * none
olcAccess: {2}to dn.base="" by * read
olcAccess: {3}to *
filter=(serviceLevel=suspended)
by dn="cn=config" write
by * none
olcAccess: {4}to *
filter=(!(serviceLevel=suspended))
by self write
by dn="cn=admin,dc=directory,dc=com" write
by dn="cn=config" write
by * read
Please advise if you have an idea why domain admins slip through my ACL. I apparently don't understand how to properly set these rules.