-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upcoming changes to Mosquitto plugin interface #96
Comments
Hey, @ralight! Thank you very much for the heads up. I'll follow up the release to make the needed changes. |
@ralight Do you happen to have an ETA for the 2.0 release? Also, I'd be very interested in checking out the upcoming changes you mention to start planning how to support them, are there any docs you can point me to for those? I was meaning to ask you about both but had a super busy and exhausting week at work with a global production rollout, and will probably be focused on that for a few days to come, but will get to it as soon as I get the time. Thanks again! |
This month. I'm still working on the docs, but you can see the rough state of play in the Honestly though, all you need to do for now is to change |
Gotcha! 🙇♂️ |
@ralight Now that I've got some time to check, I saw a user couldn't compile against 1.4.x because I'm explicitly returning Thanks! |
What a mess, sorry. I'm still surprised when people are running that old version. How about something like this?
|
@ralight So v2.0 returns 5? Ha, much to figure out yet, but I'll follow your advice in the meantime. Thanks again! |
Right, I've just changed it so that MOSQ_AUTH_PLUGIN_VERSION will only ever be 4 from now on, because the interface has changed to be more generic not just auth/acl. So MOSQ_PLUGIN_VERSION will be 5 onwards, and in fact I could have just not mentioned anything to you at all and it would just work. So sorry again for messing you about. |
Hello,
Thanks for spending your time working on this, it's a valuable project! I thought you ought to be aware that the plugin interface is changing in the upcoming 2.0 release of Mosquitto. The older versions will remain supported, but there is a change that you should make. The documentation for
mosquitto_auth_plugin_version()
stated that you should returnMOSQ_AUTH_PLUGIN_VERSION
, which you have done. That means that a plugin compiled against the old headers will still work with a newer broker, but if you compile the plugin with the newer headers then the compilation will succeed, but the plugin will be reporting the the broker that it is the incorrect version. TLDR: Please changemosquitto_auth_plugin_version()
so that it returns4
, or the version of the plugin interface that you support.In case you're interested, the plugin support is changing so it is not just about authentication and access control, but covers a new $CONTROL topic mechanism, and message inspection and modification. There are just three functions you need to implement in your plugin (for version, init, and cleanup), then you register callbacks for different events. I hope it should be much simpler to develop for, and more extensible in the future without needing to change the interface.
The text was updated successfully, but these errors were encountered: