Skip to content
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

mosquitto_dynamic_security plugin configuration not applied after restart #1962

Closed
MartinGeier opened this issue Dec 17, 2020 · 4 comments
Closed
Milestone

Comments

@MartinGeier
Copy link

MartinGeier commented Dec 17, 2020

When creating a dynamic_security.json using mosquitto_ctrl everything works fine. Add a new user and the user can login right away. dynamic_security.json is correctly created and contains the newly created user.
After a restart however everyting seems to be lost. The new user can no longer login and using mosquitto_ctrl the admin user is not recognized any longer.

The log file says the mosquitto_dynamic_security.dll has bee successfully loaded.

In my mosquitto.conf file:
plugin C:\Program Files\mosquitto\mosquitto_dynamic_security.dll
plugin_opt_config_file C:\Program Files\mosquitto\dynamic-security.json

@ralight
Copy link
Contributor

ralight commented Dec 17, 2020

Does the config file get updated with your new user? I presume you mean you're adding a new user to the broker when it's running?

@MartinGeier
Copy link
Author

Yes, I mean adding a new user to the broker while running. The json file gets updated correctly and the user can also login. When the broker is restarted the new user is no longer able to login. The json file still contains the new user settings however. Also, the admin user, created when creating the json file for the first time, is no longer able to add user or any other operation.

@MartinGeier
Copy link
Author

Could this be a problem with file security on Windows? I mean, the broker is unable to read the json file but does not report any errors in the log?

@ralight
Copy link
Contributor

ralight commented Dec 18, 2020

It could be, but if that were the case I would expect that it couldn't write the file out in the first session.

@ralight ralight added this to the 2.0.4 milestone Dec 20, 2020
fAuernigg pushed a commit to fAuernigg/mosquitto that referenced this issue Jan 4, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants