wiomoc / mosquitto-jwt-auth

Mosquitto Auth Plugin which enables authentication via JWTs and authorisation via ACLs stored in JWT claims
MIT License
40 stars 12 forks source link

Not able to publish after configuring jwt token #15

Closed bhavyashah98 closed 2 years ago

bhavyashah98 commented 2 years ago

mosquitto_pub -h localhost -t test -m "hello world" -u "root" -P "eyJhbGciOiJIUzI1NiJ9.eyJVc2VybmFtZSI6InJvb3QiLCJleHAiOjE2NTU5MDYwODcsImlhdCI6MTY1NTY0Njg4N30.LVRjr3uW_VZv_hbBQUijGELVgKkEZSGdSOBOR0L2EPo" -p 8083

When I publish, I am getting Error: The connection was lost. I am able to subscribe to it with JWT Token.

Do I need to configure ACL for this as I currently have no ACL file?

wiomoc commented 2 years ago

The JWT misses a sub claim and the ACL.

See: https://github.com/wiomoc/mosquitto-jwt-auth#custom-claims