VerneMQ Demo Plugin
This plugin demonstrates how you can develop an Authentication/Authorization plugin for VerneMQ. The important files are:
The rest is the Erlang OTP application boilerplate.
You must have a recent version of Erlang installed (it's recommended to use the same one VerneMQ is compiled for, typically > 17). To compile do:
Then enable the plugin using:
vmq-admin plugin enable --name vernemq_demo_plugin --path <PathToYourPlugin>/vernemq_demo_plugin/_build/default
Depending on how VerneMQ is started you might need
sudo rights to access
<PathToYourPlugin> should be accessible by VerneMQ (file permissions).
Since this demo plugin implements hooks which are already covered by
vmq_acl you might want to disable these in order to see
the effect of this plugin.
vmq-admin plugin disable --name vmq_passwd vmq-admin plugin disable --name vmq_acl