SSO for user's first Spark login is submitting last successful SSO username

What’s happening is I’ll log into my test Windows Server 2008 Terminal Server using my profile, called user1, and SSO works like a champ. I then login to a second session on the same terminal server, with user2. SSO attempts to log user2 in, but fails, advising me to check principal and server settings, blah blah. I click ok, and in the username field, user1 is listed, while the account name is *user2. *If I modify the username and log in once manually, I get in. Each subsequent SSO login for *user2 *after that initial successful manual login works beautifully. Why is it populating the username field with the previous user’s username?

One thing to note: We’re running in Server 2008 Native Mode for AD, with roaming profiles. Plus, the user profile hierarchy has changed since Server 2003. My GPO for copying a predefined spark.properties is placing the Spark\spark.properties folder and file in C:\Users*user2, *rather than *C:\Documents and Settings\user1\Spark\spark.properties. *Perhaps I’m placing the spark.properties in the wrong location? Thanks in advance for any help you guys can muster.

When you make a change in Spark preferences that affects spark.properties, at least in my roaming profile environment, it creates the Spark folder inside of c:\Users*username* and places the spark.properties inside of the new Spark folder. Is there a better location than that if you’re using roaming profiles?

are you certain that SSO is being used at all? It sounds more like its just saving the username and password. SSO should not even need your username (its in the credential cache)

Here’s my Raw Received from Smack Debug, using my Windows domain account, which did log into Spark without any intervention.

stream:featuresGSSAPIPLAINzlib</stream:features>

<?xml version='1.0' encoding='UTF-8'?>GSSAPIPLAINzlib

=

YDMGCSqGSIb3EgECAgIBAAD/////j/MUjv4iyM 7q72KdhBZgzz3O1rPW3XAMAQEAAAQEBAQ=

<?xml version='1.0' encoding='UTF-8'?>zlib

neilj@communications1.pabbs.local /spark

<compressed xmlns='http://jabber.org/protocol/compress’/>

<?xml version='1.0' encoding='UTF-8'?>

Thanks for looking at this with me.

Sorry, my Raw Sent would probably be better proof that the client’s at least attempting SSO. Here’s the pertinent Raw Sent data, prior to the iq roster chatter.

<stream:stream to=“communications1” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams” version=“1.0”>

<stream:stream to=“communications1.pabbs.local” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams” version=“1.0”>

YIIGIQYJKoZIhvcSAQICAQBuggY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1.pabbs.local” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams” version=“1.0”>

spark

zlib

<stream:stream to=“communications1.pabbs.local” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams” version=“1.0”>

Can you send the raw packets for when the second user attempts, but fails?

Here’s Raw Sent on the second user:

<stream:stream to=“communications1” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams” version=“1.0”>

<stream:stream to=“communications1.pabbs.local” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams” version=“1.0”>

YIIFEgYJKoZIhvcSAQICAQBuggUBMIIE/aADAg EFoQMCAQ6iBwMFAAAAAACjggQtYYIEKTCCBCWgAwIBBaENGwtQQUJCUy5MT0NBTKIuMCygAwIBAKElMC MbBHhtcHAbG2NvbW11bmljYXRpb25zMS5wYWJicy5sb2NhbKOCA90wggPZoAMCARehAwIBEKKCA8sEgg PHs73SLCr+DjZPJTqMFtC6OYRrORYUOXQx+EJH0aEhjNpSXHPRlygHaE52966LQfNxvcZQEvG26YuTB5 BT/e0LESwHyCl6/G6JtzOirECpeAjvHccLs4o15tg0q0af90d+9C+dNx786p1p1/b0U72fviqTb2RA06 /S4Lavr/2+NnRz/YH3c6OtqYVCU33+Ql2AVMjGGMCEcx8469sgEZMlaoj3+bSyfiAwvsQTt+f60LjNRi lXTI6YNORh1qSpIafFNvaHS1spUt6zi3myM8EeqPAL3GMtUONoC5loA3IXnxE32Jv+HR1fh7FeDsYmD3 m5Jxn3u3YMPD6Qc5JUQi/XpLVL/TLoCilAUzgV3tm9Nd6lbtbd+5BRwuRd+zEcptY9DLXpgfMDZugSfz QnB2+ee18zJJ02VuEZb6ni43w9oJ/aCEiJgvYiSrEFTQ2u7GvbLeDmBWKgHT8EqkL2lWGbAs0DVfFa6Y PBACWhyHr5N9VoDSX+Vwr6vzrKydghMfB7RpJUcXNq5B74ZPGTg4ldcjyrduL6MACBP+L7/ns1Au5UgE 8Ws+4qS/ft8l2Rxw2b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received:

<?xml version='1.0' encoding='UTF-8'?>

stream:featuresGSSAPIPLAINzlib</stream:features>

<?xml version='1.0' encoding='UTF-8'?>GSSAPIPLAINzlib

=

YDMGCSqGSIb3EgECAgIBAAD/////O+Wk1iCwPt e8yJKWW4A+zoURFY/kBnxeAQEAAAQEBAQ=

Does anyone have any recommendations or any logs or other output that they’d like to see, to chime in on this?

I won’t bump this to death, but this post has been sinking, and I figured I’d give it one more try before I gave up.

I dont know Windows well, and Terminal Server stuff just adds more complexity. I wonder if java is getting confused about credentials. Not sure how to go about checking that, though. Java (I think maybe only in the SDK) has a klist command- what does that show for either user?

The native Kerberos implementation in Server 2008 has a klist command, and when I run it under my account, it displays my current tickets, none of which show an xmpp spn. Should there be one? Also, does it make a difference if I use the native klist versus the one that was bundled with Java?

The native klist will not show an XMPP spn, since java dosnt retain the ticket after obtaining it. And the native client will give the correct creds, because if it didnt all sorts of other things would be broken. Im curious what java is saying, if the klist command can even read that ticket cache- it may not be able to.

OK, I think we’re getting somewhere now. The native klist does show my credentials. When I run Java’s klist in /bin, it says “Credentials cache not found”, and it’s looking for a file/folder named krb5cc_*myusername. *Java is looking for it in my Desktop folder.

This looks to be at the heart of the problem.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6519127

If I execute klist, the one in my C:\Program Files\Java\jre1.6.0_07\bin, the error reads:

Credentials cache \my.domain\users\settings\DESKTOP\krb5cc_myusername not found.

We are using roaming profiles, and folder redirection for things like documents, home folders, desktop files and folders, etc.

Shouldn’t klist be trying to view my tickets in c:\Users\myusername? If I run “echo %userprofile%” at a command prompt, that’s the path that displays.