← Back to team overview

mosquitto-users team mailing list archive

Re: Authentication

 

John

Yes, you must do a connect before publish.

If you want to prototype a quick mosquitto acl plugin, I found the Python
plugin from Martin Bachry particularly useful. It bridges from the C
interface offered by mosquitto into a simple python interface.

https://github.com/mbachry/mosquitto_pyauth

Paul



On 3 June 2014 23:55, John DuPaix <jrdupaix@xxxxxxxxxxx> wrote:

> Quick question.  I would like to use an auth plugin to verify a
> username/password when someone establishes a connection with my mosquitto
> server.  Once they are connected they are able to publish to any topic and
> subscribe to only specific ones.  I know that i can use acl to make sure
> they subscribe to only the permitted ones. The question i have is this -
> Does a user have to connect before they can publish?  For example, is it it
> possible for a user to issue a "publish" command using a valid
> username/password before they issue a "connect" command to mosquitto?  Does
> the same apply to "subscribe"? Or does mosquitto force users to always
> "connect" before they do anything?
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to     : mosquitto-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help   : https://help.launchpad.net/ListHelp
>
>

References