mosquitto icon indicating copy to clipboard operation
mosquitto copied to clipboard

plugin: Need CONNECT properties in MOSQ_EVT_BASIC_AUTH handler

Open CharlieReitzel opened this issue 4 years ago • 2 comments

We have an existing plugin that, for MQTT v5 clients use user defined properties to send additional data to the username and password. All values are used to perform authentication. We are moving away from MQTTv3 clients, which append additional data on the client ID.

Currently, we have a locally modified version of Mosquitto 1.6.2 that pulls the additional property values from the CONNECT message and makes them available on the mosquitto structure. We're also trying to move away from a local version of Mosquitto. But our problem is that the CONNECT message properties are not available.

As an enhancement, can a mosquitto_properties struct member be added to mosquitto_evt_basic_auth populated with any properties present on the CONNECT message?

Looking at src/handle_connect.c, the properties are read in (and freed!) before calling mosquitto_unpwd_check. So the data flow is close.

Is this the type of change for which a patch might be reviewed and, possibly, accepted?

CharlieReitzel avatar Jul 29 '21 22:07 CharlieReitzel

That sounds eminently reasonable to me, one of the future pointers can be changed to be a pointer to the properties.

ralight avatar Aug 20 '21 23:08 ralight

Thanks for getting back.

one of the future pointers can be changed to be a pointer to the properties.

Got you. Will do.

CharlieReitzel avatar Sep 11 '21 12:09 CharlieReitzel