Spring Boot JavaKerberos身份验证问题

时间:2018-12-16 10:10:07

标签: sql-server spring spring-boot kerberos spring-security-kerberos

我正在尝试使用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

0 个答案:

没有答案