-
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
Files backend issue #291
Comments
The only way to reload static files without restart is via SIGHUP signal which is watched and intercepted here: https://github.com/iegomez/mosquitto-go-auth/blob/master/backends/files/files.go#L102C31-L102C31 Other than that, the Files backend is not meant for dynamic changes, other backends are better suited for that. |
@iegomez thanks for the response cold you please share how to achieve this with SIGHUP part else if i use JS backend will that dynamically load the user and acl part. Thanks in advance |
As far as I remember, you can send a SIGHUP like this: As for the other question, every backend that's not the static files one is dynamic in nature, e.g. your JS functions will run on each check with whatever logic they have, or the Postgres checks will query the current state of the DB which can be changed externally, etc. |
HI @iegomez , thanks for your help on above as we are running customised docker image one quite tedious to run the HUP command so planning to go for JS one, have few questions on it with JS does caching works ? Our requirent is we dont want to use any DB to save credentials so we need some kind of alterative where we can communicate with vault to get credentials instead of DB and we will update our valut from our other bakend apis any suggestions on above Thanks in advance |
Caching is not tied to any specific backend, so yes, it works. Check the readme for more details on how to set it up. |
And I don't have any suggestions because that's highly dependent on your team, context, product, etc., so it could range from "sure, JS is fine" to "I'd fork or create my own implementation". |
HI @iegomez , thanks for your help will proceed with JS backend as we need dynamic part so checking on otto's file reading properties |
I am using files as a backend providing all relevent configurations with all file and password file.
I am using passwor and all files as a docker mount
On broker start I have added one user able to login with that
Now I have added one more user in password file
I am not able to login, if I restart I can login with new user.
So is there a fix or how can we achieve use and all addition dynamically without restarting the broker.
Thanks in advance.
The text was updated successfully, but these errors were encountered: