This is a implementation of a HiveMQ extension to make the Broker a SMOKER (Secure MQTT Broker) using the MQTT 5 enhanced authentication and client-managed authorization. The implementation is based on the BSc Thesis "Client-managed anonymous authentication and authorization for MQTT" or "SMOKER" written by Lukas Läderach and Cédric von Allmen at the Bern University of Applied Sciences. The thesis was finished in January 2020. The resulting papers, which also serve as a basis for the implementation can be found here:
-
Authentication: Authentication Paper
-
Authorization: not published yet
-
Clone this repository into a Java 13 maven project.
-
Run
mvn package
goal from Maven to build the extension -
Move the file: "target/hivemq-smoker-{version}-distribution.zip" to the directory: "HIVEMQ_HOME/extensions"
-
Unzip the file.
-
Make sure that the user, which is running the broker process, has R/W access to the path configured in
store.file.path
config -
Start HiveMQ
-
Connect to broker with TCP (port
1883
) or websocket (port8000
and context/mqtt
)
To run and debug the extension locally you need to have a plain HiveMQ installation on your system.
-
Make sure setting the correct path of your local HiveMQ installation to the
hiveMQDir
property in thepom.xml
-
Make sure that the broker instance has R/W access to the path configured in
store.file.path
property in thesmive.properties
-
Run
mvn clean install -P RunWithHiveMQ
-
If you want to debug, you can attach the debugger to the process started by maven