-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefix not working with files backend #197
Comments
Hi, @flumpt. Could you provide your configuration, passwords (redacted) and acl files to try to reproduce? |
Sure @iegomez. Thank you for your quick response! mosquitto.conf:
passwords: acl:
|
Cool, thanks, I'll take a look when I get a minute. |
Oh, silly me, I just checked your files and noticed the problem: except for JWT, where the token must be a valid one and thus it needs the prefixed stripped, the rest of the backends will look for the entire username, including the prefix. So in this case, your files should look like this:
Acls:
|
@flumpt I see how this can be a bit confusing and users may expect the prefix to be stripped, but it never was the case. I'll consider adding an option to strip the prefix, hopefully sooner than later, but for now that should fix it. Could you try it out to confirm? |
Nevermind, I already opened a PR adding an option to strip prefixes on checks. Once it passes checks, I'll merge both and release a new version. |
@iegomez Thanks for clearing this up and also providing an option to strip the prefix also for other backends. Works like a charm! |
Hello,
i am using the docker image iegomez/mosquitto-go-auth:1.8.0-mosquitto_1.6.14 and am experiencing an issue with the files backend and prefixes.
When i am trying to connect to the server providing the prefix with the username (files_recorder) i get an error "Connection refused: Not authorized". The docker container only prints the following logs with debug level:
On the other hand when i am removing the prefix the connection is established successfully:
I am not that familiar with go code so i hope you can help me find the bug.
The text was updated successfully, but these errors were encountered: