允许匿名访问受保护的Subversion存储库的各个部分
我们当前面临的问题是允许人们访问Subversion存储库的各个部分(1.5.x,不久后为1.6.x),而在其他部分中这是安全的.让我给你一些细节:
We face currently the problem to allow people access to parts of a subversion repository (1.5.x, soon 1.6.x), that is secure in other parts. Let me give you some details:
- 我们有一个生产服务器,其中许多项目都有自己的Subversion存储库.
- 对于每个项目,我们的Apache配置中都有一个类似于以下内容的部分:
DAV svn
SVNPath /export/subversion/PROJ1
SVNAutoversioning on
#Authentication
AuthType Basic
AuthName "Subversion PROJ1"
AuthBasicProvider ldap
AuthLDAPBindDN ""
AuthLDAPBindPassword 'xxxxx'
AuthLDAPURL "ldap://?sAMAccountName?sub?(objectClass=*)"
Require valid-user
#Authorization
AuthzSVNAccessFile /etc/subversion/projects/PROJ1/authUsers
(有人知道为什么位置栏不显示吗?如果知道,请正确地对其进行编辑)
(does anyone know why the Location-block does not show up? If you know, please edit it correctly)
- 我们想要那个
- 所有人都可以阅读存储在特殊公共目录中的文档,而无需提供用户ID和密码.
- 每个尝试读取其他目录中内容的人都必须登录才能读取该文档.
- We want that
- All people may read documents stored in a special public directory without giving their user ID and password.
- Everyone that tries to read something in a different directory will have to login to read that document.
当前,我们必须将要共享的文档复制到一个不安全的特殊Subversion存储库中,以便人们可以在那里阅读.但是,我们放弃了颠覆的可能性,例如.文件的历史记录.
Currently we have to copy the documents we want to share in a special subversion repository that is not secured, so that the people can read there. But we loose the possibilities of subversion, eg. the history of the files.
我们可以通过任何方式进行这样的设置:Apache Web服务器,一个Subversion存储库,一些无需登录即可供所有人访问的部分,大多数部分由基本登录保护.
Is there any way we can reach such a setup: Apache web server, one subversion repository, some parts accessible to everyone without login, most parts secured by base login.
我的好友不久前就此确切内容写了一篇文章:
My buddy wrote an entry on this exact thing a while back:
http://blogs.collab.net/subversion/2007/03/authz_and_anon_/
尽管我不保证您会同意这些选择,但他在其中提出了一些有关如何处理此问题的建议.
He has a few suggestions in there about how you might handle this, although I'm not guaranteeing you'll agree with the options.