astarte-platform / astarte_vmq_plugin

Astarte VerneMQ plugin publishes incoming messages on an AMQP exchange with some additional metadata, so they can be processed by other components.
http://astarte-platform.org/
Apache License 2.0
16 stars 10 forks source link

Do not authorize non-devices blindly in auth_on_publish and auth_on_subscribe #1

Closed rbino closed 3 years ago

rbino commented 5 years ago

Right now the Plugin is returning :ok in auth_on_publish and auth_on_subscribe when the username doesn't contain a / (and so it is not considered a device).

Instead, :next should be returned to let another plugin down the chain decide what to do.