免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2536 | 回复: 2
打印 上一主题 下一主题

[ldap] openldap中的access control问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-09-04 19:04 |只看该作者 |倒序浏览
我在slapd.conf中增加一下几句话

  1. access to * by * read
  2. access to dn="cn=flod,ou=People,dc=example,dc=com"
  3.         by users write
复制代码

cn=flod,ou=People,dc=example,dc=com这个entry存在。

  1. # flod, People, example, com
  2. dn: cn=flod,ou=People,dc=example,dc=com
  3. cn: flod
  4. labeledURI: http://www.google.com google
  5. objectClass: inetOrgPerson
  6. objectClass: organizationalPerson
  7. objectClass: person
  8. objectClass: top
  9. sn: wang
复制代码



但是我没法修改
他里面的属性。改成
access to dn="cn=flod,ou=People,dc=example,dc=com"
        by * write
也不行,都报没权限。
其他地方也没有access control的代码。帮忙看看原因吧。

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
2 [报告]
发表于 2006-09-05 12:18 |只看该作者
ACL是有优先级的,写成这样子就可以了
access to dn="cn=flod,ou=People,dc=example,dc=com"
        by users write
access to * by * read

论坛徽章:
0
3 [报告]
发表于 2006-09-05 12:46 |只看该作者
呵呵,我也刚刚摸索出来,好像是按照顺序来进行决定access control。
比如:

  1. access to *
  2.         by self write
  3.         by users read
  4.         by dn="cn=flod,dc=example,dc=com" none
  5.         by anonymous auth
复制代码

acl检查到users read的时候有读取权限就不再检查后继规则,也就是
cn=flod,dc=example,dc=com none没起到作用。

  1. access to *
  2.         by self write
  3.         by dn="cn=flod,dc=example,dc=com" none
  4.         by users read
  5.         by anonymous auth
复制代码

这个就恰恰相反。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP