Skip to content

hivemq/hivemq-enterprise-security-hello-world-customization

Repository files navigation

HiveMQ Enterprise Security Extension Hello World Customization

Extension Type GitHub release (latest by date) GitHub

Purpose

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.

Installing the IpAllowlistMqttPreprocessor

  • 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 the HIVEMQ_HOME/extensions/hivemq-enterprise-security-extension/customizations directory.

  • Copy ./src/test/resources/ip-allowlist-config.xml to HIVEMQ_HOME/extensions/hivemq-enterprise-security-extension/conf/config.xml.

  • Copy ./src/test/resources/ip-allowlist-file-realm.xml to HIVEMQ_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.

Manually Test Your IpAllowlistMqttPreprocessor

  • Connect with an MQTT client of your choice from the same host with user my-user and password my-password.

Need Help?

If you encounter any problems, we are happy to help. The best place to get in contact is our community forum.

License

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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages