上一篇文章我们介绍了LDAP的部署以及管理维护,那么如何接入LDAP实现账号统一认证呢?这篇文章将带你完成svn的接入验证

subversion集成OpenLDAP认证

  • 系统环境:debian8.4
  • svn部署环境:apache2.4 + Subversion
  1. apache开启LDAP相关模块
# a2enmod ldap
Enabling module ldap.
To activate the new configuration, you need to run:
service apache2 restart
# a2enmod authnz_ldap
Considering dependency ldap for authnz_ldap:
Module ldap already enabled
Enabling module authnz_ldap.
To activate the new configuration, you need to run:
service apache2 restart
  1. 修改vhost配置文件,添加对ldap的支持
<Virtualhost *:8088>
DocumentRoot /home/svn/repos/
ServerName svn.blz.netease.com <Location /ne/>
DAV svn
SVNListParentPath on
SVNParentPath "/home/svn/repos" AuthType Basic
AuthName "Netease&Blizzard Subversion Repository" #AuthUserFile "/etc/subversion/dav_svn.passwd"
AuthzSVNAccessFile "/etc/subversion/dav_svn.authz" # use LDAP auth
AuthBasicProvider ldap
AuthLDAPBindAuthoritative on
AuthLDAPURL "ldap://ldap.blz.netease.com/dc=blz,dc=internal?uid?sub?(objectclass=*)"
AuthLDAPBindDN "uid=authz,ou=Public,dc=blz,dc=internal"
AuthLDAPBindPassword "ImNVZODT884" Require ldap-user </Location>
</Virtualhost>

主要LDAP配置文件详解: