MQTT: Keep connection open for authz failures (backport #15201)#15203
Merged
michaelklishin merged 5 commits intov4.2.xfrom Jan 2, 2026
Merged
MQTT: Keep connection open for authz failures (backport #15201)#15203michaelklishin merged 5 commits intov4.2.xfrom
michaelklishin merged 5 commits intov4.2.xfrom
Conversation
Adjust mqtt disconnect comment Add a config option to toggle mqtt disconnect on unauthorized topic mqtt.disconnect_on_unauthorized=true(defualt) disconnect the clinet when publish or subscribe unauthorized topic. mqtt.disconnect_on_unauthorized=false subscribe unauthorized topic, reply SUBACK(non-authorized) and send retained messages for the successfully subscribed topics and keep connection. publish unauthorized topic, MQTT v5 and QoS1 reply with PUBACK including an error reason code and keep connection, MQTT v3 and QoS1 reply with PUBACK no error reason code and keep connection, QoS0 drop silently and keep connection. Add a config option to toggle mqtt disconnect on unauthorized topic mqtt.disconnect_on_unauthorized=true(defualt) disconnect the clinet when publish or subscribe unauthorized topic. mqtt.disconnect_on_unauthorized=false subscribe unauthorized topic, reply SUBACK(non-authorized) and send retained messages for the successfully subscribed topics and keep connection. publish unauthorized topic, QoS1 reply with PUBACK(non-authorized) and keep connection, QoS0 drop silently and keep connection. (cherry picked from commit 9255b1d)
(cherry picked from commit 416bf86)
michaelklishin
added a commit
that referenced
this pull request
Jan 2, 2026
Keep the v4.1.x version of mergify.yml. Given that v4.1.x is under community support for only one more month, we don't need to bother with backports that cascade further than v4.1.x.
michaelklishin
added a commit
that referenced
this pull request
Jan 2, 2026
michaelklishin
added a commit
that referenced
this pull request
Jan 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR supersedes #15123.
The first commit contains the changes in #15123 contributed by @iamdrq .
The second commit contains some refactoring.
This is an automatic backport of pull request #15201 done by Mergify.