对多个ldap组进行身份validation

我对Apache / 2.2.14(Ubuntu)使用mod_authn_alias和mod_authnz_ldap,我正在尝试针对多个域configurationldap身份validation。

我的configuration是:

<AuthnProviderAlias ldap alpha> AuthLDAPBindDN "CN=admin-alpha,CN=Users,DC=alpha,DC=local" AuthLDAPBindPassword "xxx" AuthLDAPURL "ldap://dc01.alpha.local/CN=Users,DC=alpha,DC=local?sAMAccountName?sub?(objectClass=*)" </AuthnProviderAlias> <AuthnProviderAlias ldap beta> AuthLDAPBindDN "CN=admin-beta,CN=Users,DC=beta,DC=local" AuthLDAPBindPassword "xxx" AuthLDAPURL "ldap://dc01.beta.local/CN=Users,DC=test,DC=local?sAMAccountName?sub?(objectClass=*)" </AuthnProviderAlias> <Directory "/usr/local/nagios/addons/pnp/share"> AllowOverride None Order allow,deny Allow from all AuthName "Pnp Access" AuthType Basic AuthBasicProvider alpha beta AuthzLDAPAuthoritative off #Important, otherwise "(9)Bad file descriptor: Could not open password file: (null)" AuthUserFile /dev/null #only members of this group can log in Require ldap-group CN=grp_nagiosadmins,DC=beta,DC=local Require ldap-group CN=grp_nagiosadmins,DC=alpha,DC=local ... </Directory> 

所以,如果用户无法validation到alpha域,它应该故障转移到域testing版。 但是,任何一个域的用户都不能使用此configuration进行身份validation。

当我尝试login时:

 [Fri Mar 07 16:13:35 2014] [error] [client 10.100.13.30] access to /pnp failed, reason: require directives present and no Authoritative handler. [Fri Mar 07 16:13:38 2014] [error] [client 10.100.13.30] access to /pnp failed, reason: require directives present and no Authoritative handler. 

为什么不把我的所有用户放在一个域中? 这是一个漫长的故事,最终不是我的决定。

如何正确configuration?

错误消息说: require directives present and no Authoritative handler. 那么,如果你设置AuthzLDAPAuthoritative on

我有一个类似的问题,除了我正在validation特定的LDAP用户而不是组。 解决方法是将ldap-user中的require指令的参数更改为仅用户 。 这在mod_authn_alias文档的注释部分有logging 。

我的理解是, mod_authn_alias不是特定于LDAP。 它的文档说“它允许扩展身份validation提供程序”,它们不一定与LDAP相关。

这可能是值得尝试replace你的需要ldap组指令只需要组,并小心字母大小写。

错误是关于的

 AuthzLDAPAuthoritative on 

失踪。 这就是说,如果你想设置多个规则你必须configuration:

 Satisfy any