iegomez / mosquitto-go-auth

Auth plugin for mosquitto.
MIT License
519 stars 170 forks source link

GetUser check required for jwt auth in files mode #339

Open december1981 opened 1 week ago

december1981 commented 1 week ago

We need to run a check that the user validates with the passwd in JWT token or jwt authentication in files mode is unusable if GetUser returns a hard false.

This mode doesn't support any further checks on the user (as commented in the code and README - requiring the ACL list to effectively do this) so this change does not regress or modify any behaviour according to the current spec, as far as I can tell.

december1981 commented 1 week ago

The idea makes sense, but please add tests for it.

Will do

december1981 commented 1 week ago

I've added some tests.