Report this

What is the reason for this report?

Mosquitto-go-auth

Posted on June 19, 2022

How to set mosquitto-go-auth plugin for Mosquitto MQTT broker for JWT verification?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

To set up Mosquitto-go-auth plugin for Mosquitto MQTT broker for JWT verification, you’ll need to follow these steps:

  1. Compiling the Plugin: First of all, you’ll need to compile the plugin with Mosquito. Please ensure that you have a compatible version of Mosquitto and Go installed.
  2. Configuration: Once the plugin is compiled, set it up in the Mosquitto configuration file by adding the auth_plugin directive with the path of your compiled go-auth.so file.
  3. JWT Verification: For JWT verification, enable the jwt backend in the Go-auth configuration file. Configure the jwt_secret and jwt_user_props as necessary.

I would recommend reading the official documentation of mosquitto-go-auth for more detailed instructions and examples:

https://github.com/iegomez/mosquitto-go-auth

Remember that you may need to restart the Mosquitto service after any changes to the configuration files.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Dark mode is coming soon.