Hi,
Am trying to use Java GSS Api(JDK 1.5) to perform kerberos authentication on a Windows 2003 server. Am following the steps specified in JDK docs.
Am receiving following error while calling login on LoginContext
Debug is true storeKey true useTicketCache false useKeyTab false doNotPrompt false ticketCache is null KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false
[Krb5LoginModule] user entered username: kagupta
principal is kagupta@COMPANY.COM
Acquire TGT using AS Exchange
EncryptionKey: keyType=3 keyBytes (hex dump)=0000: 89 5E 32 E5 B3 07 40 01
EncryptionKey: keyType=1 keyBytes (hex dump)=0000: 89 5E 32 E5 B3 07 40 01
EncryptionKey: keyType=23 keyBytes (hex dump)=0000: 6C 7C 29 0C 7E E7 2D 6C 93 19 EE 6A AB 53 42 7F l.)...-l...j.SB.
EncryptionKey: keyType=16 keyBytes (hex dump)=0000: BA 5D 5D 4F C1 8A E9 A2 C4 51 1C 6B BC 7A 23 8A .]]O.....Q.k.z#.
0010: 6B 54 49 75 E3 08 1A F8
EncryptionKey: keyType=17 keyBytes (hex dump)=0000: 94 B1 EA E7 4F 28 B8 25 26 A2 B6 6A 79 93 00 29 ....O(.%&..jy..)
[Krb5LoginModule] authentication failed
Pre-authentication information was invalid (24)
GSSServer... Secure Context not established..
javax.security.auth.login.LoginException: Pre-authentication information was invalid (24)
at com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Unknown Source)
at com.sun.security.auth.module.Krb5LoginModule.login(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.access$000(Unknown Source)
at javax.security.auth.login.LoginContext$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(Unknown Source)
at javax.security.auth.login.LoginContext.login(Unknown Source)
at GSSServer.startServer(GSSServer.java:92)
at GSSServer.main(GSSServer.java:66)
Caused by: KrbException: Pre-authentication information was invalid (24)
at sun.security.krb5.KrbAsRep.<init>(Unknown Source)
at sun.security.krb5.KrbAsReq.getReply(Unknown Source)
at sun.security.krb5.Credentials.acquireTGT(Unknown Source)
... 14 more
Caused by: KrbException: Identifier doesn't match expected value (906)
at sun.security.krb5.internal.KDCRep.init(Unknown Source)
at sun.security.krb5.internal.ASRep.init(Unknown Source)
at sun.security.krb5.internal.ASRep.<init>(Unknown Source)
... 17 more
Please help me.
Thanks,
Kapil