Bringing MQTT authentication and REST together

For most non-trivial server software which run in production, authentication is a very important. Of course this also applies to MQTT brokers. Luckily the MQTT v3.1 specification includes a username and password authentication mechanism which most MQTT brokers implement.

While username/password files for authentication are sufficient for playing around with MQTT brokers, they are not sufficient for enterprise-grade production systems. When integrating a MQTT broker in existing software landscapes, typically there are existing databases and services.

To demonstrate how dead simple it is to integrate an existing HTTP REST API for MQTT authentication, I created a simple HiveMQ MQTT broker plugin which delegates the authentication mechanism to the REST API (in this case a mock REST API). This API returns a JSON response which we parse in the HiveMQ plugin. It uses the excellent Apache HTTPClient from the HTTP Components project to integrate the authentication mechanism. You can find the project on Github here: https://github.com/dobermai/hivemq-rest-auth-plugin.

HiveMQ + REST API

This shows the whole implementation of the authentication mechanism. Feels like 90% exception handling 😉

The exact same mechanism can be used if you want to integrate MQTT authentication with some SOAP webservices, NoSQL databases, SQL databases, OAuth and anything you can imagine.

Make sure your MQTT broker of choice supports plugins. If you want to give the HiveMQ plugin system a shot, start here.

Ordnerbilder für Fastgallery Gallerien in Drupal

Ich nutze seit geraumer Zeit für eine DrupalInstanz Fastgallery um Bildergallerien auf dieser Drupal Webseite zu realisieren. Das Modul ist recht nützlich, wenn man viele Bilder hochladen will, jedoch auf Features wie Kommentare, Bewertungen oder Ähnliches verzichten kann.

Es hat mich jedoch schon immer ein bisschen gestört, dass bei jedem Upgrade das Modul nicht mehr wirklich abwärtskompatibel ist und ich deshalb schon öfter meine Backups einspielen musste weil es mir dann meine Bildergallerien zerschossen hat :)

Ein Feature was ich bei den alten Version spitze fand ist, dass man Bilder als Gallerieordnerbilder verwenden konnte. Ich dachte immer, dass das Feature verschwunden ist, mit ein bisschen mehr Aufwand geht das ganze jedoch doch:
Weiterlesen

[m2eclipse] Start Eclipse with JDK instead of JRE

If you install the m2eclipse Plugin for the  Maven Integration in Eclipse, this Error could possibly be shown in the Eclipse console:

Eclipse is running in a JRE, but a JDK is required
Some Maven plugins may not work when importing projects or updating source folders.

If you have this issue, you should edit your eclipse.ini and add the following lines (on a Windows System) :

-vm
C:\path\to\JDK\bin\javaw.exe

Now your Eclipse should use the JDK to run with and the m2eclipse plugin should be happy.