Single sign on SSO not working with Openfire 3.10.2 & Pandion

I have a working Openfire 3.8.2 installation (Windows 2008 R2 server, SQLServer 2012 back end) with hundreds of users on Windows users auto logging on with Pandion and Norman Rasmussen’s NTLM libraries. This I wanted to upgrade to 3.10

Unfortunately the SSO part does not work anymore. I can login without SSO with Spark and Pandion. I have tried replacing the files with the latest nightly, and with a patched openfire.jar (from this thread Openfire GSSAPI / Kerberos login no longer working with 3.10.0 ) but to no avail. Java is the one shipped with 3.10.2 (1.70_79). I also tried using the JRE from 3.8.2. LDAP works fine but its the SSO part that doesnt. In the console from Pandion I get the following from an unsuccessful SSO login:

EVNT: Connecting to openfire.internal.domain
SENT: <?xml version="1.0"?>
SENT: <stream:stream to="internal.domain" xml:lang="en" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
RECV: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="internal.domain" id="c0c030fd" xml:lang="en" version="1.0">
RECV: <stream:features xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>NTLM</mechanism><mechanism>PLAIN</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/></stream:features>
SENT: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="NTLM"/>
RECV: <challenge xmlns:stream="http://etherx.jabber.org/streams" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">TlRMTVNTUAACAAAAGAAYACAAAAAFAggA4Sc0LcvE0zx0AHIAaQBvAGQAbwBzAC4AYwBvAHIAcAA=</challenge>
SENT: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">TlRMTVNTUAABAAAAl7II4gcABwAzAAAACwALACgAAAAGAbEdAAAAD05MMDEwV1MwODczVFJJ
T0RPUw==</response>
RECV: <failure xmlns:stream="http://etherx.jabber.org/streams" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><incorrect-encoding/></failure>
SENT: </stream:stream>
EVNT: Disconnected
RECV: </stream:stream>

I also get the error: Pandion

Cannot sign in. This may have one of the following causes:

  • You entered an incorrect password

  • The account does not exist on the server

which is evidently not true, as I can login without SSO and get the following from the console:

EVNT: Connecting to openfire.internal.domain
SENT: <?xml version="1.0"?>
SENT: <stream:stream to="internal.domain" xml:lang="en" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
RECV: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="internal.domain" id="ac392fba" xml:lang="en" version="1.0">
RECV: <stream:features xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>NTLM</mechanism><mechanism>PLAIN</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/></stream:features>
SENT: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">AHNyaG9kZXMAM1Zlcnl0aGluZw==</auth>
RECV: <success xmlns:stream="http://etherx.jabber.org/streams" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
SENT: <stream:stream to="internal.domain" xml:lang="en" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
RECV: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="internal.domain" id="ac392fba" xml:lang="en" version="1.0">
RECV: <stream:features xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session></stream:features>
SENT: <compress xmlns="http://jabber.org/protocol/compress"><method>zlib</method></compress>
RECV: <compressed xmlns:stream="http://etherx.jabber.org/streams" xmlns="http://jabber.org/protocol/compress"/>
SENT: <stream:stream to="internal.domain" xml:lang="en" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
RECV: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="internal.domain" id="ac392fba" xml:lang="en" version="1.0">
RECV: <stream:features xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>NTLM</mechanism><mechanism>PLAIN</mechanism></mechanisms><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session></stream:features>
SENT: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">AHNyaG9kZXMAM1Zlcnl0aGluZw==</auth>
RECV: <success xmlns:stream="http://etherx.jabber.org/streams" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
SENT: <stream:stream to="internal.domain" xml:lang="en" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
RECV: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="internal.domain" id="ac392fba" xml:lang="en" version="1.0">
RECV: <stream:features xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session></stream:features>
SENT: <iq type="set" id="sd58"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>Pandion</resource></bind></iq>

I’m not complicating things by using TLS or SSL.

Is there a solution on the way? Anyone else with these problems?

I use gssapi for sso and it works fine with the newest version. There may be a compatibility issue with the ntlm implementation… However, looking at the install.txt file, make sure you reinstall the security provider in jre/lib/security/java.security. Per the document, that gets overwritten during upgrades.

Thanks for the quick answer. We run Pandion on Citrix via App-V sequencing and although we have sequenced Spark, its not ready for prime time so I hope Pandion works with GSSAPI (a quick google seems to indicate that it does). Now I’m not sure why my previous colleague used the old SASL libraries.

I have carried the settings over from the old installation, including the java.security, openfire.xml, and the saslsspi.dll, sasl-sspi.jar and saslmechanisms.jar.

The instructions here look more complex though but i’ll have a look SSO Configuration . Are these still valid?

you might want to try making sure you have the most current lib

http://norman.rasmussen.co.za/dl/sasl-sspi/

Also, if you’re wanting to use gssapi, for sso, it can be little tricky to get setup. Here is a pretty good doc Openfire+Spark on Windows Server 2008 R2 with SSO

also here is one I threw together How to Setup SSO on Windows Server 2008r2/2012r2 with a Domain level of 2008r2/2012r2

.

Thanks for the help. I’ve switched to the GSSAPI, and followed the guide step by step in the PDF in DOC-2706. Its not working yet though, neither in Spark or Pandion.

Spark

Clipboard01.jpg

Pandion

Clipboard02.jpg

This is the output from Pandion’s console (F12).

EVNT: Connecting to openfiretest.domain.corp
SENT: <?xml version="1.0"?>
SENT: <stream:stream to="domain.corp" xml:lang="en" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
RECV: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="nl010vn0104" id="208f9f09" xml:lang="en" version="1.0">
RECV: <stream:features xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>GSSAPI</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/></stream:features>
SENT: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="GSSAPI">YIINfwYJKoZIhvcSAQICAQBugg1uMIINaqADAgEFoQMCAQ6iBwMFACAAAACjggvzYYIL7zCCC+ugAwIBBaEOGwxUUklPRE9T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xo5KDB7z5iNSF/23T6U8XVBiS0AwpK4Szk7geJWCfRk9Y4JN+WZS4e+kPnzU4fNMOlKiprKDE2fUuw7nM3prkHlhLb6nreZU6UhiLH0i6ikBGJEH2X5wCur3SyWqmTdWQQfcs1fGoBEQMKqRjqc3TiNlefqW+l/i3xKmxjqNit8vT2Omf</auth>
RECV: <failure xmlns:stream="http://etherx.jabber.org/streams" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>
SENT: </stream:stream>
EVNT: Disconnected
RECV: </stream:stream>

The Spark / Smack Debug shows this in the raw packets tab:

<?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="nl010vn0104" id="6dc6f83a" xml:lang="en" version="1.0">
<stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>GSSAPI</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/></stream:features>
<iq type="error" id="RHC3t-13" to="nl010vn0104/6dc6f83a"><ping xmlns="urn:xmpp:ping"/><error code="401" type="auth"><not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

With Pandion login attempts, i also get this in my info.log on the openfire server.

2015.07.28 10:35:00 org.jivesoftware.openfire.net.SASLAuthentication - User Login Failed. Failure to initialize security context

I have created the new service account, setspn, created keytab, changed the group policy for encryption types, added the pointer and host in the reverse lookup, added the gss.conf, added the sasl, gssapi and authorization sections in openfire.xml, the xmpp.fdqn, and the krb5.ini on the server and client, and the registry changes also (with reboots).

The only thing I can think of is that I created the keytab in Java and not Windows.

it looks like the issue is with your keytab file… I would try recreating it windows to see if that resolves your issue.