我正在尝试使用spnego和tomcat设置kerberos iwa身份验证。
这是我第一次这样做,并没有看到真正的环境,所以依靠在线文档主要是spnego网站。 我收到以下错误:
GSSException:在GSS-API级别未指定失败(机制级别: 无效参数(400)无法找到要解密的适当类型的密钥 AP REP - RC4与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&amp; 256加密。
你能帮我解决一下这个问题吗?
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;
};
答案 0 :(得分:0)
我猜你在访问webapp时会出现错误..
keytab文件很可能没有匹配的密钥条目。
你应该使用&#39; / crypto all&#39;在创建密钥表文件时。
你可以运行&#39; klist&#39;在客户端,而不是服务器端,检查客户端从服务的KDC(部署WebApp的主机)获得的服务票证,而不是“票证授予票证”(TGT)&#39;