← Back to team overview

mosquitto-users team mailing list archive

Mosquitto Plugin ACL check improvements

 

Hi,

By playing with the Mosquitto plugin and the function mosquitto_auth_acl_check, I found curious that every single publication is verified from both part, the publisher and the subscriber. Wouldn't it be nicer to be able to intercept "wrong" subscriptions directly when the client tries to subscribe to a topic ?
I suppose it would not be a lot of work, considering it would be possible to reuse the function mosquitto_acl_check using a third parameter pointing to a subscribe event (MOSQ_ACL_READ / MOSQ_ACL_WRITE / MOSQ_ACL_SUB ? ). The function would be called with this parameter in "mqtt3_handle_subscribe" (read_handle_server.c) around line 500.
I tried to send a pull request on bitbucket so you can have a look at my proposal, but it seems it is not possible to clone the repository at the moment (URL not valid).

Regards,
Remi

Follow ups