mod_authnz_ldap 绑定为身份验证用户而不是匿名

Bra*_*ley 7 ldap authentication apache-httpd

我正在尝试尽可能接近单一凭证。我们有一个 Web 应用程序,它的可用身份验证机制集相当有限,但(幸运的是)允许管理员告诉它信任REMOTE_USERhttpd.

有没有办法将 mod_authnz_ldap 配置为使用请求用户的凭据进行身份验证,而不仅仅是在匿名绑定或共享凭据之间进行选择?

这是我目前拥有的:

    <Location />

       AuthzLDAPLogLevel debug
       AuthType Basic
       AuthBasicProvider ldap
       AuthName "Active Directory"
       AuthzLDAPAuthoritative off
       AuthLDAPBindDN CN=jad,DC=xxx,DC=com
       AuthLDAPBindPassword xxx
       AuthLDAPURL ldap://xxx.xxx.64.71/DC=xxx,DC=com?samaccountname?sub
       require valid-user

    </Location>
Run Code Online (Sandbox Code Playgroud)

xxx的标记修订。基本上上述工作可以验证用户,但它使用我的帐户绑定到 AD。如果我尝试注释掉AuthLDAPBindDN并且AuthLDAPBindPassword它似乎尝试执行匿名绑定,AD 管理员已将其配置为拒绝。

我的问题是是否可以将 apache 配置为使用身份验证用户的凭据,而不是让我在匿名绑定或使用共享帐户之间进行选择(鉴于 AD 人员设置的策略,这也是不可能的)。使用一个人的帐户显然也不适用于他们被终止或离开的情况。

cku*_*jau 6

也许AuthLDAPInitialBindAsUser (Apache 2.3.6) 可以提供帮助:

确定服务器是否使用基本的 DN 查找进行初始 DN 查找
验证用户自己的用户名,而不是匿名或使用
服务器的硬编码凭据

结合AuthLDAPInitialBindPattern,这样的事情可能会奏效(未经测试):

       AuthType 基本
       AuthBasicProvider LDAP
       身份验证名称“活动目录”
       AuthzLDAPAuthoritative 关闭
       AuthLDAPInitialBindAsUser 开启
       AuthLDAPInitialBindPattern (.+) cn=$1,dc=com
       AuthLDAPURL ldap://xxx.xxx.64.71/DC=xxx,DC=com?samaccountname?sub
       需要有效用户

  • 有一个 Fedorapeople repo,提供 [httpd24 for RHEL6](http://developerblog.redhat.com/2013/10/24/apache-httpd-2-4-on-red-hat-enterprise-linux-6/) (3认同)