Apache mod_auth_basic和Ordering

我有Apache安装程序通过ldap为我的用户使用活动目录进行身份validation。 有一些“系统”用户(用于自动构buildtesting),通过文件手动设置和validation。

AuthBasicProvider ldap file 

我遇到的问题是Active Directory框会因为维护或其他原因而不得不停下来,我不希望我的“系统”用户在那段时间被拒绝访问。 我想要Apache尝试authentication文件,然后ldap,但这似乎不可能。 根据http://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html ,“处理的顺序是在模块的源代码中确定的,不可configuration”。

这似乎不正确。 我想可以(经常)指定auth提供者的顺序(如果不是因为其他原因我想要的话)。 没有黑客源代码没有办法做到这一点?

ps将configuration更改为AuthBasicProvider file ldap没有区别。

根据http://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html ,“处理的顺序是在模块的源代码中确定的,不可configuration”。

上面的报价并不是在谈论你在问什么:

只有将mod_auth_basic使用AuthBasicProvider指令configuration的第三方模块组合时,才需AuthBasicProvider 。 当使用这样的模块时,处理的顺序是在模块的源代码中确定的,并且是不可configuration的。

从2.2版本开始,Apache允许使用多个提供者 。 我已经testing了我的系统(Apache 2.2.20),它工作正常:

 <Location /> AuthType Basic AuthBasicProvider file ldap AuthUserFile /etc/httpd/passwords AuthzLDAPAuthoritative Off AuthLDAPURL ldap://ip:389/dc=x,dc=y?cn AuthLDAPBindDN cn=anonymous,ou=z,dc=x,dc=y AuthLDAPBindPassword pa$$w0rd AuthName "Restricted Area" AuthzLDAPGroupBase ou=z,dc=x,dc=y AuthzLDAPGroupkey cn AuthzLDAPMemberKey member AuthzLDAPSetGroupAuth user require valid-user AuthzLDAPLogLevel error </Location> 

停止OpenLDAP,我仍然可以在/etc/httpd/passwords与用户/etc/httpd/passwords