免费注册 查看新帖 |

Chinaunix

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

[ldap] 求教svn+ldap 用户组的配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-10-22 09:52 |只看该作者 |倒序浏览
1、ldap环境:
base_dn--dc=yhcompany,dc=com
cn=groups,dc=yhcompany,dc=com      
    cn=groups02                                 存放的一些组用户成员

ou=users,dc=yhcompany,dc=com         
   cn=900000                                     存放的是用户相关属性(uid=900000)
    cn=900001

2、/etc/httpd/conf.d/authz_ldap.conf文件:
<Location />
        DAV svn
        SVNParentPath /var/www/svn/
        AuthzSVNAccessFile /var/www/svn/conf/authz
        AuthzLDAPAuthoritative off
        AuthzLDAPMethod ldap
      AuthzLDAPServer 172.18.30.232:389
      AuthzLDAPUserBase ou=users,dc=yhcompany,dc=com
      #AuthLDAPURL "ldap://172.18.30.232:389/DC=yhcompany,DC=com?uid?sub?(objectClass=yh-abstractPerson)
        AuthzLDAPUserKey uid
      AuthzLDAPUserScope base
      AuthType Basic
      AuthName "pls login"
      satisfy any
     require valid-user

3、/var/www/svn/conf/authz文件
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
#group02=900000,900001
#project01的访问权限
[project01:/]
abc3=rw
900004=rw
@group02=rw
*=

4、要求
把用户、密码、用户组都放在ldap上,如何让svn对ldap上的组成员进行访问控制?

=================分隔线=============================

A、如果把红色部分@group02=rw注释掉,可以用900004这个uid去访问的

B、如果存在红色部分@group02=rw,则会提示如下报错:
[Mon Oct 21 17:45:35 2013] [error] [client 172.18.21.110] Failed to load the AuthzSVNAccessFile: An authz rule refers to group '@group02', which is undefined
[Mon Oct 21 17:45:35 2013] [error] [client 172.18.21.110] Access denied: '900000‘

后来在网上找到了一篇http://thoughtspark.org/node/26/  对作者的[groups]有些不解,还有脚本也不知道如何使用(项目急,没python基础),
[root@desktop svn_source]# python slg.py          ##slg.py其实就是原作者的python sync_ldap_groups_to_svn_authz.py 文件,添加在附件中
Successfully bound to ldap://172.18.30.232:389...
40 groups found.。

求高手帮帮忙,如何设置,急

slg.rar

4.86 KB, 下载次数: 4

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP