2013-04-17 36 views
0

我在的slapd.conf文件3分ACL的。OpenLDAP的ACL订购

1. access to attrs=userPassword 
    filter="(&(objectClass=customAttributes)(!(statusCode=A)))" 
    by * none 

2. access to attrs=userPassword 
    filter="(&(objectClass=customAttributes)(statusCode=A))" 
    by self =wx 
    by * =x 

3. access to dn.subtree="dc=mycompany,dc=com" 
    by self write 
    by group.exact="cn=administrators,dc=mycompany,dc=com" write 
    by group.exact="cn=applications,dc=mycompany,dc=com" read 
    by * auth 

ACL 1和2的目的是禁止其状态代码比其他A.它工作正常,任何用户。 ACL 3的目的是使member作为管理员的administrators组和memberapplications组已只读访问。其他人都必须认证。

如果我有上面的顺序ACL在那么对于ACL 3,我不能阅读/编辑使用管理员帐户的任何用户的userPassword领域。如果我在1和2之前有ACL 3,则ACL 1和2不起作用。

是否有ACL任何特定的顺序,我需要遵循?这3个ACL可以合并成一个ACL吗?

回答

0

我不得不改变ACL 2如下

2. access to attrs=userPassword 
    filter="(&(objectClass=customAttributes)(statusCode=A))" 
    by self =wx 
    by group.exact="cn=administrators,dc=mycompany,dc=com" write 
    by * =x 

原因:早期ACL 3因为我有一切在ACL 2(by * =x)具有只读权限没有被执行。