SSO neither GSSAPI nor NTLM works

First I’ve tried with Openfire 3.6.4 Spark 2.5.8 and GSSAPI conf explained here http://www.igniterealtime.org/community/docs/DOC-1362 and I gave up on it removed gss.conf replaced the original openfire.xml and then I installed SASL patch 7.02 and tried with pandion 2.6.106 (applied all the changes to config files). When I logon to admin console GSSAPI is still selected as mechs not NTLM. At what place in openfire.xml do I add the patched part? Do I keep the jive line or do I leave it out? I’ve been battling with this for 2 weeks. Please help.

Strangely Pandion started working when I changed sasl.realm to hostaname of the server where openfire is installed instead of full domain name. Now I want to try again with Spark. Openfire server is the same as DC.

Do I need to change every entry where domain.com was used to hostaname (including setspn commands), or should I only change the sasl.realm in Openfire. What should I do to expose my domain,com as a vaild realm so I don’t have to go changing every entry from domain.com to hostaname?

TIA