How to Spectrum IM support for OF [Alternativ for Kraken]

Hey guys,

since *Kraken *is no longer supported it is a matter for time until *Kraken will not work any longer. So Daniel Henninger (the guy who developed kraken) has moved to another project called_ Spectrum IM. _

Spectrum IM does basically the same as *Kraken *did but it is a standalone external component for XMPP Servers.

Daniel mentioned that it should be possible to use Spectrum IM for gateways instead of Kraken.

Therefore we started develop a plugin for OF to support *Spectrum IM *and Remote Roster Management.

********* UPDATE **********

Spectrum 1.x no longer supported, so you might better use spectrum 2.x! The Spectrum website has been updated so you might have to search for the informations you need. I am trying to keep the disscussion up to date. If you have trouble to configure your spectrum 2 as i described it you may have a closer look to gary’s post:

********* UPDATE **********

**Currently we are in a very early stage of development and we need YOU to support us. We need some testers out there because it is impossible to test everything on our own. **

To keep this as easy as possible I will provide a little HowTo setting *Spectrum *and Openfire up to get them work together using Remote Roster.

I am currently using Spectrum on a Ubuntu Linux machine, so you may find some linux specific configuration settings.*
*

**
**

Step 1. Installing Spectrum
Install Spectrum on your favorite machine. (Linux highly recommended)

Keep in mind that you need at least Spectrum 1.4.7 (better use Spectrum 2.x in gateway mode) and Openfire 3.7.0 to get Remote Roster support.

Spectrum docu: http://hanzz.github.com/libtransport/documentation/

You could follow the installation routines described in the Spectrum IM wiki:

Installation:

Ubuntu/Debian:http://hanzz.github.com/libtransport/documentation/installation/debian_ubuntu.ht ml

CentOS/Fedora/RHEL:http://hanzz.github.com/libtransport/documentation/installation/fedora_rhel.html

Step 2. Enable external components in Openfire

To allow Spectrum to connect to our Openfire we need to enable external components in OF. Login into your admin panel and browse to:

Server → Server Settings → External Components

Your setting should look like this:

Step 3. Configure Spectrum

Have look at http://hanzz.github.com/libtransport/documentation/tutorials/gateway_mode.html

This should be quite easy. Specify the protocol you want to use and set up to host, port and password you set up in Step 2. If you used a shared secret just enter it. The OF** default port** for external components is** 5275 **

*!!! You should set the component id of your spectrum config according to your protocol and openfire hostname like: icq.my-jabber-server.com *Otherwise you may lost messages between your networks. Especially Sparks maps the known gateways to the subdomain of the received components. !!! *****


** **In my case it looks like this for a XMPP Spectrum component:

component JID

jid=xmpp.dew08299

component secret

password=secret

component port

port=5275

Start spectrum & check if it is connected

If your created your config file in* /etc/spectrum/xmpp.cfg *you could easily start spectrum using following bash command:

user@server:~$ spectrum -n xmpp

-n disables the background daemon mode so we could check if everything is setup properly.

Now we could check if Spectrum successfully connects to our Openfire. Open your admin panel and browse to:

Sessions → Component Sessions

If Spectrum is connected it shoud look like this:

Step 4. Installing Remote Roster Plugin

Now we would like to have Remote Roster support for our gateway. Therefore we need to get the Openfire Plugin.

**The file is attached, see below. **(remoteRoster.jar)

Open your Openfire admin panel and install the plugin via Plugins → Plugins. There you could select your file and upload it. Openfire should automatically install the plugin but you may need to restart Openfire.

If it is successfully installed the plugin will appear in the Plugin Admin view:

Step 5. Enable Remote Roster plugin for specified Spectrum IM

If RemoteRoster plugin is installed you will find the config menu in

Server → Server Settings → Remote Roster

You should see your external component with its identifier. You have to enable the external component that should get remote roster support. It is disabled by default.

We also implemented some hacks for Spark to get it work properly, like Kraken did. If you are using Spark within your network you should enable the Spark specific configuration.

This is highly recommended, otherwise Spark user won’t be able to logout from their legacy accounts.

The feature should not harm other Clients.

Step 6. Done?

If everything is installed you may login to your Openfire using Spark or some other client. The transports should be available to you. When you type in some login information you might have a look at the spectrum console, started in Step 3. During the login process the following line should appear in the spectrum terminal:

[12/06/11 13:07:52] test@dew08299 This server supports remoter-roster XEP

If you’re logged in to the legacy network but you are getting a subscription request for every contact something went terribly wrong

You may have a look to the trouble shooting section.

*) What is Remote Roster Management XEP-xxxx?

This is still a prototype of a XMPP Standard for easy roster exchange between servers and components. This is very useful for Spectrum because it is allowed to edit your Roster without asking for permissions every time. Spectrum IM will push all your contact from your legacy network to your roster if you want it to. If you want to have more information about it, you can check following websites:

Remote Roster Plugins currently supports** 2.3, 2.4** and **2.5 **of the XMPP standard. There is no implementation for 2.1 and 2.2 because it is not yet supported by Spectrum IM.

TODO

  • Whitelisting for contacts. (not every one should be allowed to use transports)
  • Non persistent contact. (contacts should disappear if your not connected to legacy network)
  • Multiple support for contacts in legacy network
  • Mirror contact remove / subs to legacy network

Troubleshooting

Enable Debug Log in Server → Logs and check if the plugin is loaded.

Since there are less experiences with Spectrum and Openfire feel free** to report your problems.**

There is already a Jira Ticket for Remote Roster related problems over here:

We’re working with Spectrum 1.4.8 & Openfire 3.7.1 (both linux vm’s) and sucessfully tested xmpp, icq, aim, yahoo

Thanks

Special thanks to* Daniel Henninger*. He started the project and made the initial svn import. Thanks for answering all my more or less stupid questions.

*) Spectrum IM http://spectrum.im/

Thanks for your how to! Perfect!

Working fine here!

Just a doubt, I see in http://issues.igniterealtime.org/browse/OF-490 a sub task for “Restrict the use of gateway to an existing user group” status “Resolved”… but inside openfire i try to use this feature

“You can limit the access to the external component to an existing group” for limit access…but does not work for me…

Exists a bug or a extra configuration to do in spectrum or like this?

Thankz again

Just a small question ? Can spectrum be installed on same windows machine which has opnefire ?

hey skycrash,

it is working for me. you should type the name of the group into the input box. (ajax should auto complete)

if the group exisit there should appear a green check symbol.

don’t forget to save the settings!

my conf:

Spark 2.6.3

Openfire 3.7.1

GoJara 1.1.0 Alpha

yep,

of course, but keep in mind that there is only Spectrum 0.1 available for windows that does NOT support remote roster exchange!

hi, have you some raccomandation for configure gadu-gadu gateway with this plugin because in my server work but not import the remote roster

is the spectrum instance listed in the “Connected Gateway” table under Server -> Server Settings -> GoJara?

if it is successfully connected but not activated you should get a subscription request from every user on the remote roster.

maybe you could post some more informations. OF version? Spectrum 2 or 1? unix or windows?

Gadu-Gadu specific settings for spectrum:

You can use those variables in [purple] section in Spectrum config file.

Key: nick

Type: string

Description: Nickname

Default value: Gadu-Gadu User

Key: gg_server

Type: string

Description: GG server

Default value:

openfire 3.7.1

spectrum2

debian server

i can connect gg gateway but the user are not imported

i never configured gg gateway by myself. seems to be a problem with spectrum/libpurple backend.

maybe you could ask the guys from spectrum.im in their chatroom spectrum@conference.spectrum.im.

Hi holger,

Thanks for the great guide, worked fine =) Just needed a few changes for spectrum 2 but was no problem.

Two questions really.

Firstly, is spectrum@conference.spectrum.im the email address to request help? Or is there a chatroom somewhere? A bit confused about that.

Secondly, have you managed to have this working with twitter?

Thank you.

Kind Regards,

Gary Shergill

Hi Gary,

maybe you could tell me your changes to get it properly work with spectrum 2.

So others may also want to use it with spectrum 2.

spectrum@conference.spectrum.im is a xmpp mutli user chat room. If you already have a jabber account out there you should be able to join this conference room. (should also work with googletalk)

I am not using twitter so I have never tried to use it with spectrum. Seems to be a more spectrum related question. Maybe the guys from spectrum@conf… could help you getting it work.

Hi holger,

As of Friday, the website of Spectrum has changed (meaning the links in the original post have become obsolete).

I actually installed Spectrum on Wednesday on my own, but the new website basically details everything needed for Spectrum 2, as Spectrum 1 is no longer maintained.

The new links are below.

Installation:

Ubuntu/Debian: http://hanzz.github.com/libtransport/documentation/installation/debian_ubuntu.ht ml

CentOS/Fedora/RHEL: http://hanzz.github.com/libtransport/documentation/installation/fedora_rhel.html

Gateway Configuration:

http://hanzz.github.com/libtransport/documentation/tutorials/gateway_mode.html

I installed Spectrum on the same server as the Openfire, was having some issues otherwise.

So for Openfire;

jid: This is the jid for the spectrum transport instance, e.g. msn.hostname.domain (msn.openfireserver.example.com).

password: External component password.

server: IP or hostname of the Openfire server (in my case 127.0.0.1).

port: External component port (default is 5275).

Scroll down until you see the database option, and for a default install choose sqlite3

[database]

Database backend type

“sqlite3”, “mysql”, “pqxx”, or “none” without database backend

type = sqlite3

You also need to change the protocol, i.e. protocol=prpl-msn

As well as the type, i.e. type=msn

The name can be anything, e.g. Spectrum MSN Transport.

I think that’s everything… Make sure you save it to the right place.

Example command would be:

cp /etc/spectrum2/transports/spectrum.cfg.example /etc/spectrum2/transports/msn.cfg

Hope that helps.

Best,

Gary Shergill

Hi holger,

Forgot to mention, I managed to connect to the chat room using jappix and it’s ok.

Asking them about twitter now, hoepfully can get it working soon (Skype as well).

Thanks again…

Kind Regards,

Gary Shergill

Hi gary,

gojara is currently saving the contacts permanently to the users roster. That is not my preferred way. A non persistent handling for external contacts is already implemented in gojara but not active at all.

Therefore we need to manually pull the contacts from spectrum which is not supported yet.

But please be patient, we are working close together with the spectrum developers to support non persistent remote contacts as you konw from the kraken plugin.

That means: you did nothing wrong!

There is also an issue for that you might want to follow:

http://issues.igniterealtime.org/browse/OF-494

Hi holger,

Sorry, I deleted the post asking that question after HanzZ mentioned on the chat channel that it isn’t implemented on the Spectrum side and he doesn’t use a workaround.

Thank you for the reply, was thinking was from my side because it works on Kraken, glad to know it isn’t.

Good luck =)

Kind Regards,

Gary Shergill

Hey guys

we want to give you some updates about the current state of GoJara:

While there still remain some Issues we have not fixed yet, we also made some progress by working close with the Spectrum2 team.

I will upload a new version of GoJara with this post, it would be nice if somebody would try it out. If you encounter any bugs or you have any questions, please feel free to email me or Holger. We are in need of feedback, as we are just starting to test this with a bigger userbase ourselves.

Non-Persistant Roster should work now, also Users being in multiple Groups should not cause any problems. Spectrum2 currently has a small issue which results in some redundand traffic upon login, which could matter for Users with large Rosters. As Spectrum2 / GoJara is worked on nearly every day, this probably will be fixed in the next days / week.

            • important - - - - - - -

When you already have GoJara installed, you probably need to restart the OF-Server after deleting & / updating GoJara. We experienced some cases where Gojara would not correctly unload, which could be caused through this Issue http://issues.igniterealtime.org/browse/OF-197

In this case multiple Instances of Gojara would run, producing unnecessary traffic.

We will try to find a workaround for older Versions, can’t give an ETA though.

I will use this thread for further updates until we have a better way to keep things up to date and provide answers, although the Guide and posts already sum up most of the needed Info.

Please contact us if you have any problems or questions. I’m also regulary in the Spectrum2 conference room, spectrum@conference.spectrum.im

How to use Acess-Restriction with Gojara

  1. If you did not already do it, create a Group at Users/Groups -> Groups -> Create new Group, for example ICQWhiteList.
  2. normally you dont want groupmembers to see other groupmembers, so disable contact-list group-sharing. http://www.m-i-u.de/images-i41219b5yrgg.jpg
  3. At** Server -> Server Settings -> GoJara** add the Group to the corresponding transport-whitelist & save settings. http://www.m-i-u.de/images-i41218bf8zca.jpg

The group should also show up in System-Properties:plugin.remoteroster.permissiongroup.$transport.

Now the transport should only be visible to groupmembers of whitelisted groups. You may need to restart your client.

If this is not working for you or you have any other Problems please feel free to contact us.

EDIT : We fixed a bug concerning Acess-Control, it should work now. New .jar in attachment.

First production day of GoJara and Spectrum.im has passed. Migration from Kraken was smooth.

Great work by Axel and Holger.

GoJara 2.0 is out, mainly a stability & performance update.

For updating to 2.0 please stop OF server, remove gojara.jar / gojara folder and put the new jar in plugins directory. From 2.0 on unloading works fine and there should be no problems anymore with updating it from the OF-Console plugin panel.

For whole changelog see http://issues.igniterealtime.org/browse/OF-635

hello!

I have a problem in integration between Spectrum2 IM and Openfire.

I use Spark to login. As soon as I enter, I click the button to record the account msn, gtalk or whatever. He shows me an error:

“unable to register with transport”

what can be the problem?