powered by Jive Software

Compilling Spark with Single Sign On Support?

Tonight I pulled down the source for Spark, Configured Eclipse, and built. It wouldn’t build out of the box because of a GSSAPI error. I resolved that error by moving the GSSAPIConfiguration.java into src\java\org\jivesoftware and adding an import to one of the source files. But when it tries to get the principle name it throws an exception. My question is this. Is there anything special that needs to be done in order to build spark with SSO support?

Thanks,

Nathan

The support is all built into java 1.5 and newer relases. What errors are you getting, exactly?

I was getting an exception when I was off of the network, which makes sense. Now I get an error that says “Unable to connect using Single Sign-On. Please check your principle and server settings.”

When I use the official install of Spark it works on the same machine. So I’m not sure what else I would need to do in my build to get this working.

Thanks,

Nathan

Check the log files for more information, there are a lot of things that can go wrong.

Are there log files for spark? There is a log directory with an errors.txt but nothing ever shows up in it. The best that I see are console messages being put on the console when I run it from startup.bat.

I did find out that one of my machines works just fine with SSO and the other does not with my build. Looking at the console messages they look the same.

Debug is true storeKey false useTicketCache true useKeyTab false doNotPrompt true ticketCache is null isInitiator true KeyTab is null refreshKrb5Config is false principle is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false

Acquire TGT from Cache

Principle is npalmer@REALADDOMAIN.COM

Commit Succeeded

I do get this though on the machine that doesn’t work.

java.lang.NullPointerException

at org.jivesoftware.smack.XMPPConnection.createPacketCollector(XMPPConnection.java :758)

at org.jivesoftware.smack.NonSASLAuthentication.authenticate(NonSASLAuthentication .java:51)

at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 217)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:341)

at org.jivesoftware.LoginDialog$LoginPanel.login(LoginDialog.java:828)

at org.jivesoftware.LoginDialog$LoginPanel.access$400(LoginDialog.java:196)

at org.jivesoftware.LoginDialog$LoginPanel$1.construct(LoginDialog.java:594)

at org.jivesoftware.spark.util.SwingWorker$2.run(SwingWorker.java:129)

at java.lang.Thread.run(Unknown Source)

Jan 10, 2008 11:54:03 AM org.jivesoftware.spark.util.log.Log warning

WARNING: Exception in Login:

java.lang.NullPointerException

at org.jivesoftware.smack.XMPPConnection.createPacketCollector(XMPPConnection.java :758)

at org.jivesoftware.smack.NonSASLAuthentication.authenticate(NonSASLAuthentication .java:51)

at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 227)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:341)

at org.jivesoftware.LoginDialog$LoginPanel.login(LoginDialog.java:828)

at org.jivesoftware.LoginDialog$LoginPanel.access$400(LoginDialog.java:196)

at org.jivesoftware.LoginDialog$LoginPanel$1.construct(LoginDialog.java:594)

at org.jivesoftware.spark.util.SwingWorker$2.run(SwingWorker.java:129)

at java.lang.Thread.run(Unknown Source)

The version of spark available for download on the site does SSO. What exactly are you trying to change? Are you trying to preconfigure it for a particular server? How do you plan on encorporating the registry edits and the krb5.ini file?

Quite a few things. We’re trying to pre-configure the server, customize it with our logo and graphics, disable the update process, replace the update process with one that looks directly at our server, etc. We’re packaging this up and then plan to deploy it to everyone in the company.

What do you mean about the registry edits and krb5.ini file? Maybe this is something that we’re missing. We haven’t done anything with registry or krb5.ini so far.

Nathan

Single sign on from windows requires modification of the registry on the client machines and the addition of a krb5.ini file to the windows directory. The custom graphics can be done to a client with out a recompile sort of. But the preferences about the server are more tricky. They can be by copying the Spark preference folder to each user’s profile folder via a login script. I use EMCO MSI Builder to make my custom build of spark with company logos, registry edits, krb5.ini and such.

From the changes we’ve done so far we need a custom build since we’ve changed and added to the code. But we’re deploying through Microsoft ClickOnce. Making changes to the windows directory and registry beyond CURRENT_USER are a problem. Do you know where I can find more information about the krb5.ini and registry changes that need to be made? Or know where at in the source I should look?

Nathan

I have never heard of ClickOnce. It sounds interesting. Anyway check out this thread for an example of a krb5.ini, I also attached the registry changes for the xp machines to this thread: http://www.igniterealtime.org/community/message/163378#163378.

Looks like we’re just going to not use SSO on this deployed version. Since we’re trying to make everything installable in userspace without any special privileges.

Nathan

The server (HOST_NAME) can also be set in the src\java\org\jivesoftware\resource\default.properties file.

  • Rob

We are already setting the HOST_NAME in that file. But it doesn’t have an affect on SSO.