-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Auth plugin NEVER receive callback when using password_file #1215
Comments
kuldeepdhaka
added a commit
to kuldeepdhaka/mosquitto
that referenced
this issue
Mar 30, 2019
mosquitto_unpwd_check_default() should return MOSQ_ERR_PLUGIN_DEFER instead MOSQ_ERR_AUTH if no username matched so that auth plugin can handle it. According to docs: "If password_file, or acl_file are used in the config file alongsize auth_plugin, the plugin checks will run after the build in checks." Fixes eclipse#1215
kuldeepdhaka
added a commit
to kuldeepdhaka/mosquitto
that referenced
this issue
Mar 30, 2019
mosquitto_unpwd_check_default() should return MOSQ_ERR_PLUGIN_DEFER instead MOSQ_ERR_AUTH if no username matched so that auth plugin can handle it. According to docs: "If password_file, or acl_file are used in the config file alongsize auth_plugin, the plugin checks will run after the build in checks." Fixes eclipse#1215 Signed-off-by: Kuldeep Singh Dhaka <[email protected]>
6 tasks
kuldeepdhaka
changed the title
Auth plugin ALWAYS not receiving callback when using password_file
Auth plugin NEVER receive callback when using password_file
Mar 31, 2019
You're right (as in the PR), but it does need more work to fix properly and won't be in 1.6. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As per https://mosquitto.org/man/mosquitto-conf-5.html
"If password_file, or acl_file are used in the config file alongsize auth_plugin, the plugin checks will run after the build in checks."
mosquitto/src/security_default.c
Lines 833 to 886 in 2d360fd
In above code, if no user is found (having a hash table),
mosquitto_unpwd_check_default()
returnMOSQ_ERR_AUTH
(the last line of function)shouldn't it actually return
MOSQ_ERR_PLUGIN_DEFER
(at last line) since it suppose to defer it to other as per the docs)?mosquitto_auth_unpwd_check()
will never receive the callback ifpassword_file
is used inmosquitto.conf
Note: im very new to the code and based on heuristic this fixes my auth plugin not getting any callback.
The text was updated successfully, but these errors were encountered: