This project contains two example preprocessor implementations that show how to use the customization SDK for the HiveMQ Enterprise Security Extension.
-
The
com.hivemq.extensions.enterprise.security.customizations.helloworld.IpAllowlistMqttPreprocessoronly allows clients with specific IPs to connect. For more insights please see the related test:com.hivemq.extensions.enterprise.security.customizations.helloworld.IpAllowlistMqttPreprocessorTest. -
The
com.hivemq.extensions.enterprise.security.customizations.helloworld.ExternalRolesCommonPreprocessormerges internal and external retrieved roles for connecting clients. For more insights please see the related test:com.hivemq.extensions.enterprise.security.customizations.helloworld.ExternalRolesCommonPreprocessorTest.
-
Clone this repository.
-
Run the
./gradlew jartask from Gradle to build the customization. -
Copy the
./build/libs/hivemq-enterprise-security-hello-world-customization-4.36.0.jarfile to theHIVEMQ_HOME/extensions/hivemq-enterprise-security-extension/customizationsdirectory. -
Copy
./src/test/resources/ip-allowlist-config.xmltoHIVEMQ_HOME/extensions/hivemq-enterprise-security-extension/conf/config.xml. -
Copy
./src/test/resources/ip-allowlist-file-realm.xmltoHIVEMQ_HOME/extensions/hivemq-enterprise-security-extension/conf/file-realm.xml. -
Delete the
HIVEMQ_HOME/extensions/hivemq-enterprise-security-extension/DISABLEDfile (if there is one). -
Execute
export HIVEMQ_LOG_LEVEL=debugto get better insights during testing. -
Execute
export ALLOWED_CLIENT_IP=127.0.0.1to allow connecting from the same host. -
Start HiveMQ.
-
Connect with an MQTT client of your choice from the same host with user
my-userand passwordmy-password.
If you encounter any problems, we are happy to help. The best place to get in contact is our community forum.
HiveMQ Enterprise Security Extension Hello World Customization is licensed under the APACHE LICENSE, VERSION 2.0.
A copy of the license can be found here.