一、svn服务(subversion)
1、基于saslauthd构建AD验证的SVN服务器
https://www.docin.com/p-1036806577.html
2、cat /etcsaslauthd.conf

ldap_servers: ldap://168.8.80.28
ldap_default_domain:hangsheng.cn
ldap_search_base:DC=hangsheng,DC=cn
ldap_bind_dn:hangsheng\jssvnuser1
ldap_password:jssvnuser1
ldap_deref: never
ldap_restart: yes
ldap_scope: sub
ldap_use_sasl: no
ldap_start_tls: no
ldap_version: 3
ldap_auth_method: bind
ldap_mech: DIGEST-MD5
ldap_filter:sAMAccountName=%u
ldap_password_attr:userPassword
ldap_timeout: 10
ldap_cache_ttl: 30
ldap_cache_mem: 32786

二、Gerrit服务
1、Gerrit 整合 ldap
https://blog.iamzhl.top/Gerrit-integrate-with-ldap-and-CAS.html
2、cat gerrit.config

[auth]

type = DEVELOPMENT_BECOME_ANY_ACCOUNT

    type = LDAP
    gitBasicAuthPolicy = LDAP

[receive]

enableSignedPush = true

     enableSignedPush = false

[ldap]
server = ldap://168.8.80.28:389
username = cn=jssvnuser1,OU=computer,DC=hangsheng,DC=cn
password = jssvnuser1
accountBase = DC=hangsheng,DC=cn
groupBase = DC=hangsheng,DC=cn
accountPattern = (sAMAccountName=${username})
accountFullName = uid
[sendemail]
enable = true
smtpServer = wxx.hangsheng.com.cn
smtpUser = jssvnuser1@hangsheng.com.cn
smtpPass = jssvnuser1
sslVerify = false
from = jssvnuser1@hangsheng.com.cn