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
[Bug/Question]: Webhook service offline send same Mqtt msg as not authorized #2082
Comments
@nicolascampbell Thanks, if I understand you correctly, you're comparing:
We can certainly think about which one of the Connect return codes would be appropriate (supposing this is v3.1.1): Would you return 3, 4 or 5? There is semantic overlap, for sure. And the result will always be the same: the server has to disconnect the client. 👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq |
Hi @ioolkos, sorry for the late reply. Thank you for your fast reply :D |
@nicolascampbell I see; I think that's an acceptable solution. If we can't authenticate the client due to the missing endpoint, we can consider this as "MQTT service non available". 👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq |
@ioolkos Okay, will try myself out, may take some time though :D |
Environment
Current Behavior
Hi!
We use the following webhooks auth_on_register, auth_on_publish and auth_on_subscribe. When auth service offline is tracing is as follows when I make a req:
When I kick the client and try to publish smth
I added this <LONG_ID> so that it doesnt look so bloated.
My client gets for both of this cases: Connection refused: Not authorized
Expected behaviour
I expect vernemq to send different MQTT (not only CONNACK(sp: 0, rc: 5)) messages when webhook returns {error,nxdomain} and the auth_on_register fails with not allowed and status code 401 because the client is no longer allowed.
Maybe I am seeing something wrong or I dont understand some concept correctly so any feedback helps :D
Configuration, logs, error output, etc.
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: