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.IpAllowlistMqttPreprocessor
only 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.ExternalRolesCommonPreprocessor
merges 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 jar
task from Gradle to build the customization. -
Copy the
./build/libs/hivemq-enterprise-security-hello-world-customization-4.36.0.jar
file to theHIVEMQ_HOME/extensions/hivemq-enterprise-security-extension/customizations
directory. -
Copy
./src/test/resources/ip-allowlist-config.xml
toHIVEMQ_HOME/extensions/hivemq-enterprise-security-extension/conf/config.xml
. -
Copy
./src/test/resources/ip-allowlist-file-realm.xml
toHIVEMQ_HOME/extensions/hivemq-enterprise-security-extension/conf/file-realm.xml
. -
Delete the
HIVEMQ_HOME/extensions/hivemq-enterprise-security-extension/DISABLED
file (if there is one). -
Execute
export HIVEMQ_LOG_LEVEL=debug
to get better insights during testing. -
Execute
export ALLOWED_CLIENT_IP=127.0.0.1
to allow connecting from the same host. -
Start HiveMQ.
-
Connect with an MQTT client of your choice from the same host with user
my-user
and 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.