我正在尝试使用spnego和tomcat设置kerberos iwa身份验证。SPNEGO Kerberos窗口身份验证
这是我第一次这样做,并没有看到真正的环境,所以依靠在线文档主要是spnego网站。 我得到以下错误:
GSSException: Failure unspecified at GSS-API level (Mechanism level: Invalid Argument (400) Cannot find key of appropriate type to decrypt AP REP - RC4 with HMAC)
Catalina log shows:
Jan 30, 2017 10:12:37 AM net.sourceforge.spnego.SpnegoHttpFilter doFilter
SEVERE: HTTP Authorization Header=Negotiate <edited - actual had a big key>
Jan 30, 2017 10:41:24 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8443"]
Jan 30, 2017 10:41:24 AM org.apache.coyote.AbstractProtocol pause
附上我的KRB5和login.conf的。
KLIST command gives 2 keys:
CLIENT: B1GYZDM @ test.win.org
Server: krbtgt/test.win.org @ test.win.org
KerbTicket Encryption Type: RSADSI RC4-HMAC(NT)
CLIENT: B1GYZDM @ test.win.org
Server: krbtgt/test.win.org @ test.win.org
KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
启动Tomcat作为本地服务。 和keytab支持128加密。
你能帮我解决这个问题吗?
KRB5.conf:
[libdefaults]
default_tkt_enctypes = aes128-cts aes256-cts
default_tgs_enctypes = aes128-cts aes256-cts
permitted_enctypes = aes128-cts aes256-cts
[realms]
test.win.org = {
kdc = test.win.org
default_domain = test.win.org
}
[domain_realm]
test.win.org = test.win.org
login.conf:
spnego-client {
com.sun.security.auth.module.Krb5LoginModule required;
};
spnego-server {
com.sun.security.auth.module.Krb5LoginModule required
storeKey=true
useKeyTab=true
keyTab="file:///E:/Apps/apache-tomcat-7.0.40/bin/test.keytab"
isInitiator=false;
};
custom-client {
com.sun.security.auth.module.Krb5LoginModule required
storeKey=true
useKeyTab=true
keyTab="file:///E:/Apps/apache-tomcat-7.0.40/bin/test.keytab"
principal=B1ADPST000;
};
请将krb5.conf和login.conf的内容直接粘贴到问题本身中。不要让我们去另一个网站下载它们。这些文件足够短,你可以做到这一点。那么,无论如何,对于login.conf,肯定是krb5.conf,如果它不比krb5.conf长,你可以显示相关的SPNEGO节或整个事情。 –
我已经使用文件内容更新了票证 – michael
您是否使用Microsoft Active Directory来使用Kerberos?你是否还有一个keytab创建语法的副本,你创建了keytab,如果有的话,你是否也可以发布? –