I'm trying to implement SSO with kerberos using spring-security-kerberos extension.
I've created a keytab file and I get the following error when trying to access my webapp:
GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)
I tried to test my keytab according to this post.
The keytab was created with the following command:
ktpass /out http-web.keytab /mapuser testing@MYDOMAIN.COM /princ HTTP/testing@MYDOMAIN.COM /pass myPass /ptype KRB5_NT_PRINCIPAL -crypto RC4-HMAC-NT /kvno 0
My krb5.conf is as follow
[libdefaults]
default_realm = MYDOMAIN.COM
permitted_enctypes = aes256-cts arcfour-hmac-md5 aes128-cts rc4-hmac des3-cbc-sha1 des-cbc-md5 des-cbc-crc
default_tgs_enctypes = aes256-cts arcfour-hmac-md5 aes128-cts rc4-hmac des3-cbc-sha1 des-cbc-md5 des-cbc-crc
default_tkt_enctypes = aes256-cts arcfour-hmac-md5 aes128-cts rc4-hmac des3-cbc-sha1 des-cbc-md5 des-cbc-crc
kdc_timesync = 1
ccache_type = 4
forwardable = true
proxiable = true
[realms]
MYDOMAIN.COM = {
kdc = controller1.mydomain.com:88
kdc = controler2.mydomain.com:88
kdc = controller3.mydomain.com:88
admin_server = controller3.mydomain.com
default_domain = MYDOMAIN.COM
}
[domain_realm]
.mydomain.com = MYDOMAIN.COM
mydomain.com = MYDOMAIN.COM
[login]
krb4_convert = true
krb4_get_tickets = false
I get the following error:
KDC has no support for encryption type (14)
I've tried enabling DES, AES-128 and AES-256 for the account of the SPN but it didn't solve the problem.
What am I missing here?
Thanks, Lior
just bashed my head against the KrbException "KDC has no support for enryption type (14)" for several days in sequence. I have visited many places including some indepth MSDN blog posts (from Hongwei Sun, Sebastian Canevari) I cannot reference for lack of reputation.
Thanks, for your mention of kvno 0 and dsiabling DES it now also works on my side.
In the end it boiled down that I have my User Account setup with
userAccountControl: 0d66048 or 0x10200 which matches 0b10000001000000000 or ADS_UF_DONT_EXPIRE_PASSWD (0x00010000) and ADS_UF_NORMAL_ACCOUNT (0x00000200) but no UF_USE_DES_KEY_ONLY (0x200000) being set
and
msDS-SupportedEncryptionTypes: 0d16 or 0x10 which matches 0b10000 or AES256-CTS-HMAC-SHA1-96 (0x10) but no RC4-HMAC (0x04) being set.
With this and the following in my /etc/krb5.conf I can reproducably provoke "KrbException KDC has no support for enryption type (14)" when removing rc4-hmac from the default_tkt_enctypes.
/etc/krb5.conf:
However if you change it to default_tkt_enctypes = aes256-cts rc4-hmac it will succeed.
Note that you can also leave out specifying the default_tkt_enctypes directive in /etc/krb5.conf, in order to make it work.
It therefor looks like Windows Server 2008 SP2 Active Directory does explicitly require RC4-HMAC in the Pre-Authentication phase:
I have updated JCE 1.8.0 policy files within my JDK's jre/lib/security folder in order for AES256 to be supported.
Kind regards, Stefan
The enctypes are specified under
Kerberos Parameters http://www.iana.org/assignments/kerberos-parameters/kerberos-parameters.xhtml
Failure:
Success:
PS: You might want to extract the Kerberos 5 Tools from a Windows JDK because Oracle have removed it from the JDK 1.6 onwards. This gives you additional debug output on Linux platform with the Parameter (-Dsun.security.krb5.debug=true).
This works around JDK-6910497 : Kinit class missing http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6910497
What helped in my case was the switch
and I commented all of these in krb5.conf:
I guess it's default setup with rc4-hmac encoding that's most compatible.
No special settings were needed in Active Directory on my SPN account.
Windows Server 2008, Weblogic 10.3.6, Oracle JDK 1.7
Finally got it working: When implementing kerberos authentication for Oracle JDK 6, one should use RC4-HMAC encryption, and so the DES and AES support should be disabled for the user account.
Why did I check them in the first place is another story....