惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
P
Privacy International News Feed
Hugging Face - Blog
Hugging Face - Blog
U
Unit 42
博客园 - 叶小钗
月光博客
月光博客
Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
The Hacker News
The Hacker News
T
Tor Project blog
阮一峰的网络日志
阮一峰的网络日志
Google DeepMind News
Google DeepMind News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Help Net Security
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Security Latest
Security Latest
I
Intezer
L
LINUX DO - 最新话题
Blog — PlanetScale
Blog — PlanetScale
T
The Exploit Database - CXSecurity.com
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Webroot Blog
Webroot Blog
WordPress大学
WordPress大学
A
About on SuperTechFans
P
Proofpoint News Feed
T
Tailwind CSS Blog
I
InfoQ
The Register - Security
The Register - Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AWS News Blog
AWS News Blog
博客园 - Franky
Simon Willison's Weblog
Simon Willison's Weblog
Last Week in AI
Last Week in AI
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google Online Security Blog
Google Online Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Attack and Defense Labs
Attack and Defense Labs
T
Tenable Blog
大猫的无限游戏
大猫的无限游戏
K
Kaspersky official blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
W
WeLiveSecurity
S
Security @ Cisco Blogs
MongoDB | Blog
MongoDB | Blog

博客园 - NetCobra

近况 让TortoiseSVN使用类似TortoiseCVS的文件冲突解决方式 CSDN双雄——universee(太极语言)和Sinox(汉澳操作系统) The Netron project down, Netron Reloaded... 推荐一个开源项目和一个免费工具 DotNet 项目中链接文件的用处 看看美国的烂公司是怎么样的烂法 SQLite 不能加密? 对软件的多语言化方法的一点看法 最近工作情况 关于 zjsflyer 对 JPgraph 中文显示乱码问题的回复 [旧文]来自 Borcon2003 中国开发者大会的现场报道 [问题]DotNet 项目如何实现在构建时 Build 号自动增加? 每日构建中的两个问题 如何防止 Wiki 被恶意篡改? [翻译] NMock 两分钟教程 [翻译] NMock 简介 头疼的问题:NAnt 的 cvs-checkout 任务无法执行 可以下载 Delphi 2005 试用版了
Windows平台下使用Active Directory对Subversion进行权限控制(非完美解决方案)
NetCobra · 2006-05-31 · via 博客园 - NetCobra
 

Windows平台下使用Active DirectorySubversion进行权限控制(非完美解决方案)

目前网上找到的Subversion的配置说明中,关于用户权限控制都是基于ApacheUser文件的或是基于svnserve.conf文件的,这种配置方式最大的问题在于用户信息保存在独立的文本文件中,维护不便(对用户的添加、修改等必须在服务器上执行,用户自己无法修改密码等),并且无法和其他系统集成。

 于是琢磨可不可以用公司现有的Active DirectorySubversion的用户进行权限控制,这样可以解决上面提到的几个问题。

 目前已经基本实现了对Subversion使用Active Directory验证,但是还有一些比较重要的问题没有解决,所以是“非完美解决方案”,放在这里抛砖引玉,希望能够有更好的解决方案。

 Apache不能直接调用Active Directory的,只能通过Active Directory提供的LDAP方式进行访问,因此需要在Apache中打开对LDAP的支持;

 Apache中自带了对LDAP的支持(默认情况下没有打开),但是官方自带的LDAP支持插件在Windows平台下有问题(我这里是经常造成Apache异常退出,服务终止);因此在Windows平台下需要安装第三方的LDAP支持插件才可以。

 在网上找了一下,发现ApacheLDAP支持模块有以下几个可供选择(来源:http://nona.net/software/ldap/):

我使用的是http://www.muquit.commod_auth_ldap,对其他的没有试过。

一、 安装(假定已经安装了Apache+Subversion

1.        安装文件的获取:

mm_mod_auth_ldap for MS Windows binary:从http://www.muquit.com/muquit/software/mod_auth_ldap/mod_auth_ldap.html下载。

由于mm_mod_auth_ldap是基于SuniPlanet C SDK 5.08开发的,运行时还需要iPlanet C SDK 5.08的一些DLL,因此还需要自己下载iPlanet C SDK 5.08http://www.sun.com/download/index.jsp?cat=Application%20Development&tab=3,需要注册才能下载)

2.        安装和设置(来自http://www.chinaunix.net/jh/49/618651.html:

1)       将上面所说的两个压缩包中的DLL文件复制到Apachemodules目录中;

2)       httpd.conf中加入 LDAP 相关模块的配置,就是增加如下一行:

    LoadModule auth_ldap_module modules/mod_auth_ldap.dll

二、 配置

如下是httpd.confSubversion段的配置,注意红字的部分就是LDAP的配置信息,具体意义参见注释;其他关于SubversionApache的配置资料请参见网上相关文章(例如http://cube316.net/blog/archives/200512/32)。

 <Location /svn>

    // 常规Subversion配置

    DAV svn

    SVNListParentPath on

    SVNParentPath D:\SVNStore

    AuthType Basic

    AuthName "Subversion repositories"

    # 不能使用svnaccessfile进行配置,原因见后

    # AuthzSVNAccessFile conf\svnaccessfile

    Require valid-user

    # 以下为LDAP配置信息

    # LDAP 协议版本,AD提供的LDAP3

    LDAP_Protocol_Version 3

    # LDAP 服务器

    LDAP_Server 192.168.1.2

    # LDAP 服务器端口

    LDAP_Port 389

    # LDAP 基础DN

    Base_DN "dc=MainDC"

    # AD LDAP 不允许进行匿名查询,因此需要提供一

    # AD 中的用户名及其密码用于 Apache LDAP查询

    Bind_DN "cn=Administrator,cn=Users,dc=MainDC"

    Bind_Pass "password"

    # Apache 查询的 AD Object 的属性

    UID_Attr "sAMAccountName"

    # 允许什么条件的 AD 用户访问 Subversion

    # 这里设置只有scmuser组的用户才可以访问,但是并没

# 有成功,事实上只要是AD中的用户现在都可以访问,

# 不清楚问题出在哪里。

    require group "cn=scmuser,ou=groups,dc=MainDC"

</Location>

这样配置的意图是允许SCMUser中所有用户可以存取Subversion,其他的用户则不可以,但是事实上这样配置以后的实际结果是AD中所有用户都可以访问Subversion了,怀疑是require group中的LDAP Filter写的不正确,但是不知道该怎么写,目前就凑合着用了。

三、 问题
使用LDAP可以和其他系统比较好的集成,并且能够方便地对用户进行管理,但是这种方式对于Subversion很有问题,就是使用这种方式后无法使AuthzSVNAccessFile来对Subversion进行目录级别的权限控制,据网上资料说是因为SVNAccessFile中的用户和组都必须在User文件中定义(参见http://svn.haxx.se/users/archive-2006-02/0586.shtml及其相关讨论),我想如果对Apache的授权模块进行自定义修改的话估计是可以的,不过目前我们对此要求不高,所以还暂时能够使用。

四、参考资料

1.        《开发服务器环境配置安装说明》(http://bbs.chinaunix.net/viewthread.php?tid=618651

2.        LDAP authentication module for apachehttp://www.muquit.com/muquit/software/mod_auth_ldap/mod_auth_ldap.html

3.        Subversion Users List Archiveshttp://svn.haxx.se/users/