ApacheLDAP身份验证Redmine

ApacheLDAP身份验证Redmine,apache,svn,ldap,redmine,Apache,Svn,Ldap,Redmine,我在Apache服务器(RHEL 6.1)上安装了Redmine。我还有一个subversion服务器运行在/var/svn。我为我的subversion配置了正确的LDAP身份验证,因此当有人访问subversion存储库时(通过命令行:svn checkout/update/commit,或通过),它会提示输入用户名和密码,以对LDAP服务器进行身份验证 但是:在Redmine中浏览项目页面时,我看到“Repository”选项卡出现(它链接到正确的地址:)。但当我导航到此选项卡时,它显示“

我在Apache服务器(RHEL 6.1)上安装了Redmine。我还有一个subversion服务器运行在
/var/svn
。我为我的subversion配置了正确的LDAP身份验证,因此当有人访问subversion存储库时(通过命令行:svn checkout/update/commit,或通过),它会提示输入用户名和密码,以对LDAP服务器进行身份验证


但是:在Redmine中浏览项目页面时,我看到“Repository”选项卡出现(它链接到正确的地址:)。但当我导航到此选项卡时,它显示“404存储库中未找到条目或修订”。我有一种感觉,404来自Redmine,无法针对LDAP进行身份验证。所以我的问题是如何允许Redmine进入该目录,但其他所有人都需要根据LDAP进行身份验证?

我已经解决了我的问题,并提出了一个相当简单的解决方案。我的假设是正确的——因为Redmine不知道如何处理LDAP请求,所以它抛出了404

下面是允许Redmine(或在同一服务器上运行的任何服务)通过身份验证过程的正确Apache配置:

<Location /svn>
    # The following two lines allow for any request made by this machine through
    #  We do this to allow Redmine to have access without needing to authenticate against LDAP
    # NOTE: The IP address MUST be the one given by DHCP - the loop-back (127.0.0.1) will NOT WORK
    Order allow,deny
    Allow from ACTUAL_IP_ADDRESS (example: 123.45.67.100)


    # The following authenticates against LDAP for any request NOT made by the same server
    # This includes anyone attempting to access:
    #       http://myserver.com/svn/*
    #  either via web-browser, or svn command
    #
    # Tell apache this is a subversion repository
    DAV svn
    # Where the subversion repository list exists on the file system
    SVNParentPath "/var/svn"
    # What kind of authentication 
    AuthType Basic
    AuthName "Restricted Subversion Content"
    AuthBasicProvider ldap
    AuthLDAPBindDN "YOUR_BIND_DN"
    AuthLDAPBindPassword "YOUR_BIND_PASSWORD"
    AuthLDAPURL "YOUR_LDAP_URL"
    # Require a valid-LDAP user (if not from the allowed IP address)
    Require valid-user

    # This line (very important) tells Apache that the request needs to follow AT LEAST
    # one of the following:
    #       - The request is from the IP address listed above
    #       - All others MUST authenticate using LDaP
    # If we wanted BOTH to be required (not in our case), we would use "Satisfy All"
    Satisfy Any

#以下两行允许此机器通过
#我们这样做是为了允许Redmine访问,而无需对LDAP进行身份验证
#注意:IP地址必须是DHCP给定的地址-环回(127.0.0.1)将不起作用
命令允许,拒绝
允许来自实际IP地址(示例:123.45.67.100)
#对于不是由同一服务器发出的任何请求,以下内容将针对LDAP进行身份验证
#这包括任何试图访问:
#       http://myserver.com/svn/*
#通过web浏览器或svn命令
#
#告诉apache这是一个subversion存储库
DAV svn
#文件系统上存在subversion存储库列表的位置
SVNParentPath“/var/svn”
#什么样的认证
AuthType Basic
AuthName“受限制的Subversion内容”
AuthBasicProvider ldap
authldappinddn“您的绑定”
authldappindpassword“您的绑定密码”
AuthLDAPURL“您的LDAP URL”
#需要有效的LDAP用户(如果不是来自允许的IP地址)
需要有效用户
#这一行(非常重要)告诉Apache至少需要遵循请求
#以下其中一项:
#-请求来自上面列出的IP地址
#-所有其他人必须使用LDaP进行身份验证
#如果我们希望两者都是必需的(不是在我们的情况下),我们会使用“满足所有人”
满足任何

我希望这有助于其他人寻找类似的解决方案