我在32位Win7桌面上运行Apache Web服务器(2.2.21),WebSVN 2.3.3和Subversion 1.5.6。LDAP身份验证没有强制运行websvn的某些URL
这里的问题:
如果我定位到http://myservername/websvn
,LDAP身份验证将被强制执行,只有人,我允许在配置文件中的用户可以访问它。 但是,如果我导航到http://myservername/WebSvn
或/Websvn
甚至/webSVN
,您会明白,LDAP auth未强制执行,并且它们允许任何用户(即使那些未在配置文件中指定的用户)进入相同的websvn页面。
那么,我该如何解决这个问题呢?
更新: 这是我的websvn.conf文件。出于安全原因,我修改了它以适应这里的帖子。 通过在文件尾部附近插入'Include C:/somehwere/websvn.conf
',在httpd.conf
文件中调用此特定文件。
<Location /websvn/>
#Redirect any requests to this page to the listing.php
FallbackResource listing.php
AuthLDAPBindDN "[email protected]"
AuthLDAPBindPassword "password"
#The LDAP query URL
AuthLDAPURL "ldap://x.x.x.x.x.x:389/DC=x,DC=x,DC=x,DC=x,DC=x?sAMAccountName?sub?(objectClass=user)" NONE
AuthType Basic
AuthName "Websvn"
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthUserFile /dev/null
Require ldap-user user1
</Location>
更新2013年7月2日: 笔者获悉,应使用,而不是和我已经做到了。 Apache documentation详细介绍了“什么时候使用什么”部分,特别是该部分下的区别。所以,我修改了websvn.conv文件,以反映这一点:
<Directory /websvn>
DirectoryIndex listing.php
Options FollowSymLinks
Order allow,deny
Allow from all
AuthLDAPBindDN "[email protected]"
AuthLDAPBindPassword "password"
#The LDAP query URL
AuthLDAPURL "ldap://x.x.x.x.x.x:389/DC=x,DC=x,DC=x,DC=x,DC=x?sAMAccountName?sub?(objectClass=user)" NONE
AuthType Basic
AuthName "Websvn"
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
Require ldap-user user1
</Directory>
但是,我仍然可以访问我的websvn甚至不正确的URL,eg./websVn,此外,认证不踢了。
此外,页面listing.php不显示。而是显示websvn的目录列表。
任何人都可以请指出我是什么做错了吗?谢谢。
上下文是否应用于虚拟主机或目录。如果将上下文应用于目录或虚拟主机,则只有该目录将由ldap强制执行。如果你可以把你如何confogure ldap认证它会让你更好地了解你的情况 –
嗨萨达姆阿布迦达,我的歉意。我已经包含了我的websvn.conf文件 – winhung
我仍然面临着这个问题...我可能不得不使用重写功能来处理这个问题.. – winhung