我正在尝试使用JavaKerberos连接到SQL Server。 我的Jaas conf文件看起来像这样:
SQLJDBCDriver {
com.sun.security.auth.module.Krb5LoginModule required
useTicketCache=true
useKeyTab=true
keyTab="/etc/krb5.keytab"
doNotPrompt=true
renewTGT=true
debug=true;
};
这是我得到的错误
>>> Found no TGT's in LSA
Principal is null
null credentials from Ticket Cache
[Krb5LoginModule] authentication failed
Unable to obtain Principal Name for authentication
[Krb5LoginModule]: Entering logout
[Krb5LoginModule]: logged out Subject
这是“ /etc/krb5.conf ”的样子
[libdefaults]
default_realm = HOME.COM
dns_lookup_realm = true
dns_lookup_kdc = true
forwardable=true
[realms]
HOME.COM = {
kdc = PCDNT00003USP01.Cloud.com
kdc = PCDNT00002USP01.Cloud.com
kdc = PCDNT00002USP03.Cloud.com
kdc = pcdnt00001usp03.Cloud.com
kdc = pcdnt00001ukp01.Cloud.com
kdc = pcdnt00001ukp02.Cloud.com
kdc = PCDNT00003USP03.Cloud.com
kdc = PCDNT00002USP02.Cloud.com
default_domain = home.com
admin_server=Cloud.com
}
[domain_realm]
home.com= HOMECOM
.home.com= HOME.COM