我正在尝试在 Windows Server 2008 中使用 ActiveDirectory 使用 kerberos 设置集成 Windows 身份验证,并且一切正常,并且我能够在成功登录时获得 kerberos 票证。我在将此票转发到配置 Apache 的服务器时遇到问题。转发票证时,Apache/PHP 环境变量中未设置 KRB5CCNAME。
我的 kerberos 配置文件(krb5.conf)是
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default_realm = DIVAMI.COM
default_keytab_file = /etc/krb5.keytab
dns_lookup_realm = true
dns_lookup_kdc = true
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
[realms]
DIVAMI.COM = {
kdc = meluha.divami.com:88
admin_server = meluha.divami.com:749
default_domain = divami.com
}
[domain_realm]
meluha.divami.com = DIVAMI.COM
divami.com = DIVAMI.COM
Apache mod_auth_kerb 配置文件(auth_kerb) 是
<Location /perfmon>
AuthType Kerberos
AuthName "Kerberos Login"
KrbMethodNegotiate On
KrbMethodK5Passwd Off
KrbAuthRealms DIVAMI.COM
Krb5KeyTab /etc/httpd/conf.d/apache.keytab
KrbSaveCredentials On
KrbServiceName HTTP/greenplum.divami.com
require valid-user
ErrorDocument 404 "No favicon"
</Location>
浏览器配置
火狐
Set network.negotiate-auth.delegation-uris to greenplum.divami.com.
Set network.negotiate-auth.trusted-uris to greenplum.divami.com
IE
In Internet Explorer, select Tools > Internet Options.
In the Local Internet (Advanced) dialog box, enter all relative domain names that will be used on the intranet (e.g. greenplum.divami.com).
当我将 KrbMethodK5Passwd 设置为 On 时,会在提供有效凭据票证时生成浏览器提示输入 kerberos 用户名和密码,并且它的缓存位置在 Apache/PHP 环境变量 KRB5CCNAME 中设置。使用此变量 KRB5CCNAME,我们可以使用作为身份验证凭据转发的 kerberos 票证。
当 KrbMethodK5Passwd Off 时,我收到以下错误消息。
[Wed Sep 25 18:48:11 2013] [debug] src/mod_auth_kerb.c(1939): [client 10.81.17.156] kerb_authenticate_user entered with user (NULL) and auth_type Kerberos
[Wed Sep 25 18:48:11 2013] [debug] src/mod_auth_kerb.c(1939): [client 10.81.17.156] kerb_authenticate_user entered with user (NULL) and auth_type Kerberos
[Wed Sep 25 18:48:11 2013] [debug] src/mod_auth_kerb.c(1278): [client 10.81.17.156] Acquiring creds for HTTP/greenplum.divami.com
[Wed Sep 25 18:48:11 2013] [debug] src/mod_auth_kerb.c(1691): [client 10.81.17.156] Verifying client data using KRB5 GSS-API
[Wed Sep 25 18:48:11 2013] [debug] src/mod_auth_kerb.c(1707): [client 10.81.17.156] Client didn't delegate us their credential
[Wed Sep 25 18:48:11 2013] [debug] src/mod_auth_kerb.c(1726): [client 10.81.17.156] GSS-API token of length 180 bytes will be sent back
plum.divami.com/perfmon/login.php
[Wed Sep 25 18:48:11 2013] [debug] src/mod_auth_kerb.c(1691): [client 10.81.17.156] Verifying client data using KRB5 GSS-API , referer:http://greenplum.divami.com/perfmon/login.php
我不知道浏览器是否无法选择 kerberos 票证或浏览器选择票证但无法在 KRB5CCNAME 中设置缓存位置。请帮我解决这个问题。