2013-04-17 88 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)具有隻讀權限沒有被執行。