我们在 Apache 2.2.9(在 Debian 5.0、2.2.9-10+lenny7 中提供)中使用 mod_authnz_ldap 和 mod_authn_alias 来验证多个 Active Directory 域以托管 Subversion 存储库。我们目前的配置是:
# Turn up logging
LogLevel debug
# Define authentication providers
<AuthnProviderAlias ldap alpha>
AuthLDAPBindDN "CN=Subversion,OU=Service Accounts,O=Alpha"
AuthLDAPBindPassword [[REDACTED]]
AuthLDAPURL ldap://dc01.alpha:3268/?sAMAccountName?sub?
</AuthnProviderAlias>
<AuthnProviderAlias ldap beta>
AuthLDAPBindDN "CN=LDAPAuth,OU=Service Accounts,O=Beta"
AuthLDAPBindPassword [[REDACTED]]
AuthLDAPURL ldap://ldap.beta:3268/?sAMAccountName?sub?
</AuthnProviderAlias>
# Subversion Repository
<Location /svn>
DAV svn
SVNPath /opt/svn/repo
AuthName "Subversion"
AuthType Basic
AuthBasicProvider alpha beta
AuthzLDAPAuthoritative off
AuthzSVNAccessFile /opt/svn/authz
require valid-user
</Location>
Run Code Online (Sandbox Code Playgroud)
对于同时拥有 Alpha 和 Beta 帐户的用户,我们遇到了问题,尤其是当他们的 Alpha 帐户已过期(但仍然存在;公司政策是帐户的有效期至少为 1 年)。例如,当用户x(在Alpha中已过期,在Beta中为有效账户)时,Apache错误日志报告如下:
[Tue …
Run Code Online (Sandbox Code Playgroud) active-directory ldap authentication apache-2.2 mod-authn-alias