OpenLDAP高级ACLconfiguration

我的OpenLDAP服务器有多个DIT。 我把用户cn = config设置为root,这样cn = config就可以访问所有DIT(每个DIT)。 此外,每个DITpipe理员都标识为cn = admin,$ suffix [例如cn = admin,dc = example,dc = com或其他]。

我为pipe理员和用户对象添加了一个自定义的NAME属性。 该属性被命名为:“serviceLevel”,值为“挂起”或“正常”。 该属性是可选的,当它不存在时,我们将其解释为正常 – 不会中止。

目前,当serviceLevel设置为“暂停”时,我的ACL暂停常规用户,并不暂停本地/ DITpipe理员。 我需要pipe理员无法像普通用户那样进行身份validation。

样本当前的LDIF设置ACL如下:

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 

请告知,如果你有一个想法,为什么域pipe理员滑过我的ACL。 我显然不明白如何正确设定这些规则。

我相信你正在采取比必要更复杂的方法。 禁用DIT禁用其相应的数据库。 这可以通过设置olcHidden: TRUE来完成。

olcHidden:TRUE |
控制数据库是否将用于回答查询。 隐藏的数据库将永远不会被选中以回答任何查询,并且在检查与其他数据库的冲突时,将忽略数据库上configuration的任何后缀。 默认情况下,olcHidden是FALSE。

 ldapmodify <<EOF dn: olcDatabase={2}hdb,cn=config replace: olcHidden olcHidden: TRUE EOF 

附加说明:

不pipe什么访问控制策略被定义, rootdn总是被允许充分的权利 (即authentication,search,比较,读和写)的一切和任何东西。

因此,它是无用的(并导致性能损失)在条款中明确列出rootdn。 – OpenLDAP Software 2.4 Administrator's Guide