Problem incorporating Single-Signon Using MS Active Directory

Hello:

I am using j2sdk1.4.2_07 and attempting to incorporate single-signon. There is a very nice article describing all of the steps necessary @ http://e-docs.bea.com/wls/docs90/secmanage/sso.html

My problem is at the final step which uses the kinit utility to verify Kerberos authentication is working properly:

kinit -k -t C:\temp\fips201cmsdemo.localhost.keytab localhost/ fips201cmsdemo

i get the following error:

Exception: krb_error 0 Cannot retrieve key from keytab for principal localhost/f

ips201cmsdemo@FIPS201.SOLUTIONS.COM No error

KrbException: Cannot retrieve key from keytab for principal localhost/fips201cms

demo@FIPS201.SOLUTIONS.COM

at sun.security.krb5.internal.tools.Kinit.<init>(DashoA12275:199)

at sun.security.krb5.internal.tools.Kinit.main(DashoA12275:109)

To try and diagnose this, I have tried a klist and see my keys in the keytab file:

===================================================

klist -k C:\temp\fips201cmsdemo.localhost.keytab

Key tab: C:\temp\fips201cmsdemo.localhost.keytab, 2 entries found.

[1] Service principal: localhost/fips201cmsdemo@FIPS201.SOLUTIONS.COM

KVNO: 2

[2] Service principal: fips201cmsdemo.FIPS201.SOLUTIONS.COM@FIPS201.SOLUTIONS.COM

KVNO: 1

===================================================

... and below is the krb5.ini file:

===================================================

[libdefaults]

default_realm = FIPS201.SOLUTIONS.COM

default_tkt_enctypes = des-cbc-crc

default_tgs_enctypes = des-cbc-crc

ticket_lifetime = 600

[realms]

FIPS201.SOLUTIONS.COM = {

kdc = 192.168.1.102

admin_server = 192.168.1.102

default_domain = FIPS201.SOLUTIONS.COM }

[domain_realm]

fips201.solutions.com = FIPS201.SOLUTIONS.COM

[appdefaults]

autologin = true

forward = true

forwardable = true

encrypt = true

===================================================

If anyone has any ideas, I would appreciate any suggestions you might have. Thank you

Harvey

[2157 byte] By [harveyFa] at [2007-10-3 2:35:11]
# 1

Check if you have installed Kerberos configuration file in C:\winnt\krb5.ini

When using kinit, make sure you provide the complete Kerberos principal name.

Try following:

kinit -k -t C:\temp\fips201cmsdemo.localhost.keytab localhost/fips201cmsdemo@FIPS201.SOLUTIONS.COM

Seema

Seema-1a at 2007-7-14 19:34:09 > top of Java-index,Security,Kerberos & Java GSS (JGSS)...
# 2
Hi Seema,I am also facing the same problem.Even I tried the solution suggested by you but its giving me the same error.Please let me know if there is something more to work out in this matter.All suggestions are welcome.Thanx and Regards,Chirag.
chirag1011a at 2007-7-14 19:34:09 > top of Java-index,Security,Kerberos & Java GSS (JGSS)...
# 3
Please download latest release of JDK 1.4.2. Currently the latest JDK 1.4.2_12 is available at: http://java.sun.com/j2se/1.4.2/download.htmlIf you encounter any further problems, please let me know.Seema
Seema-1a at 2007-7-14 19:34:09 > top of Java-index,Security,Kerberos & Java GSS (JGSS)...
# 4

Hi Seema,

I am also facing the same problem:-

C:\j2sdk1.4.2_12\bin>ktab -k mykeytabfile -a sacr@USERS.MERCURYTEST.COM

Password for sacr@USERS.MERCURYTEST.COM:abcabc

Done!

Service key for sacr@USERS.MERCURYTEST.COM is saved in mykeytabfile

C:\j2sdk1.4.2_12\bin>kinit -k -t mykeytabfile sacr

Exception: krb_error 0 Cannot retrieve key from keytab for principal sacr@mercurytest.com No error

KrbException: Cannot retrieve key from keytab for principal sacr@mercurytest.com

at sun.security.krb5.internal.tools.Kinit.<init>(DashoA12275:199)

at sun.security.krb5.internal.tools.Kinit.main(DashoA12275:109)

I am using JDK 1.4.2_12. Any help will be highly appreciated.

- SR

sirji1a at 2007-7-14 19:34:09 > top of Java-index,Security,Kerberos & Java GSS (JGSS)...
# 5

Have you installed a Kerberos configuration file on your machine ? Check if you

have C:/winnt/krb5.ini file setup correctly.

Does "kinit" work with any other account ? Create a new AD account with no

mapping, and try "kinit" using this account. If this does not work, please

check your AD server setup.

The error that you get indicates your Kerberos configuration file is not correct.

You added entry for "sacr@USERS.MERCURYTEST.COM" in keytab, but attempted to

obtain Kerberos ticket for "sacr@mercurytest.com".

Check the REALM setup in the Kerberos configuration file, it should correspond

to the domain used i.e."USERS.MERCURYTEST.COM"

Seema

Seema-1a at 2007-7-14 19:34:09 > top of Java-index,Security,Kerberos & Java GSS (JGSS)...