【问题标题】:svn ldap automatic authorisationsvn ldap 自动授权
【发布时间】:2015-07-17 11:39:24
【问题描述】:

当我们决定为 SVN 迁移到 LDAP 身份验证时,我假设身份验证和授权将是自动的,即如果用户登录到网络,subversion 将接受该用户为合法用户并且不会弹出登录对话框,但是继续生活吧。不幸的是,到目前为止,我们还没有做到这一点。

这会导致我的源代码管理外联网 Web 应用程序出现问题,该应用程序过去用于查找用户密码(不安全),但现在必须请求授权。

SVN/LDAP 应该像我希望的那样工作吗?如果是这样,我需要设置一些神秘的配置项吗?我错过了什么?

我认为这是合适的 .conf [当然是经过编辑和混淆的]

#
#
# DO NOT EDIT THIS FILE IT WILL BE REGENERATED AUTOMATICALLY BY SUBVERSION EDGE
#
# If you must make a change to the contents of this file then copy and paste the
# content into the httpd.conf file and comment out the Include statement for
# this file. The httpd.conf file is not modified or generated and is safe for
# you to modify.
#
#

Include "F:\csvn\data/conf/ctf_httpd.conf"
<VirtualHost *:18080>
# SSL is off

# Required for SCRIPT_URI/URL in viewvc libs, not just rewrite rules
RewriteEngine on
RewriteOptions inherit

# Apache will issue sub_req for PATH_INFO on ScriptAlias which
# gives a spurious error message. Setting auth at root level to avoid clogging logs.
<Location />
  AuthType Basic
  AuthName "CollabNet Subversion Repository"
  AuthBasicProvider file ldap
  AuthLDAPUrl "ldap://192.168.0.249:3268/OU=Technical Staff,OU=DomainUsers,DC=snip,DC=net?samAccountName?sub" "NONE"

  AuthLDAPBindDN "CN=subversion,OU=Technical Staff,OU=DomainUsers,DC=snip,DC=net"
  AuthLDAPBindPassword "kasd8asdik"
  LDAPReferrals Off


  AuthUserFile "F:\csvn\data/conf/svn_auth_file"

  Require valid-user
</Location>

# Work around authz and SVNListParentPath issue
RedirectMatch ^(/svn)$ $1/
<Location /svn/>   
   DAV svn
   SVNParentPath "F:/csvn/data/repositories"
   SVNReposName "CollabNet Subversion Repository"

  <IfModule deflate_module>
    SetOutputFilter DEFLATE
  </IfModule>
  AuthzSVNAccessFile "F:\csvn\data/conf/svn_access_file"
  SVNPathAuthz short_circuit
  SVNListParentPath On
</Location>


<Directory "F:\csvn\www\viewVC/docroot">
  AllowOverride None
  Options None
</Directory>
<Location /viewvc-static>
  Require all granted
</Location>
Alias /viewvc-static "F:\csvn\www\viewVC/docroot"

ScriptAlias /viewvc "F:\csvn\bin/cgi-bin/viewvc.cgi"

<Location /viewvc>
  AddDefaultCharset UTF-8
  SetEnv CSVN_HOME "F:\csvn"
</Location>

</VirtualHost>

#
# auth helper endpoint for use by SvnEdge
#        
<VirtualHost localhost:50123>
  <Location "/">
  AuthType Basic
  AuthName "CollabNet Subversion Repository"
  AuthBasicProvider file ldap
  AuthLDAPUrl "ldap://192.168.0.249:3268/OU=Technical Staff,OU=DomainUsers,DC=snip,DC=net?samAccountName?sub" "NONE"

  AuthLDAPBindDN "CN=subversion,OU=Technical Staff,OU=DomainUsers,DC=snip,DC=net"
  AuthLDAPBindPassword "kasd8asdik"
  LDAPReferrals Off


  AuthUserFile "F:\csvn\data/conf/svn_auth_file"


  Require valid-user
  </Location>
</VirtualHost>

【问题讨论】:

标签: authentication svn ldap


【解决方案1】:

SVN/LDAP 应该像我希望的那样工作吗?

是的

如果是这样,我需要设置一些神秘的配置项吗?

大概

我错过了什么?

显示您与 SVN 相关的完整位置(来自 Apache,您用过吗?!)

【讨论】:

  • 我已经编辑了我的问题,以包括我希望是您的意思的文件。当然是经过编辑的。
猜你喜欢
  • 2011-09-08
  • 1970-01-01
  • 2020-12-03
  • 2014-05-18
  • 1970-01-01
  • 2014-07-26
  • 1970-01-01
  • 2013-10-28
  • 2013-02-14
相关资源
最近更新 更多