Skip to content

MQTT: Keep connection open for authz failures (backport #15201) (backport #15203)#15204

Merged
michaelklishin merged 9 commits intov4.1.xfrom
mergify/bp/v4.1.x/pr-15203
Jan 3, 2026
Merged

MQTT: Keep connection open for authz failures (backport #15201) (backport #15203)#15204
michaelklishin merged 9 commits intov4.1.xfrom
mergify/bp/v4.1.x/pr-15203

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify bot commented Jan 2, 2026

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.
This is an automatic backport of pull request #15203 done by Mergify.

iamdrq and others added 5 commits January 2, 2026 20:23
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 c644b66)
(cherry picked from commit 416bf86)
(cherry picked from commit 44640aa)
(cherry picked from commit e1d147c)
(cherry picked from commit 2b41b17)
(cherry picked from commit 355de34)
(cherry picked from commit 350e30a)

# Conflicts:
#	.github/mergify.yml
(cherry picked from commit 7733740)
(cherry picked from commit 828b166)

# Conflicts:
#	.github/mergify.yml
@mergify mergify bot added the conflicts label Jan 2, 2026
@mergify
Copy link
Copy Markdown
Author

mergify bot commented Jan 2, 2026

Cherry-pick of 350e30a has failed:

On branch mergify/bp/v4.1.x/pr-15203
Your branch is ahead of 'origin/v4.1.x' by 3 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 350e30a7f.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   .github/mergify.yml

no changes added to commit (use "git add" and/or "git commit -a")

Cherry-pick of 828b166 has failed:

On branch mergify/bp/v4.1.x/pr-15203
Your branch is ahead of 'origin/v4.1.x' by 4 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 828b16669.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   .github/mergify.yml

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot added the make label 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 michaelklishin added this to the 4.1.8 milestone Jan 2, 2026
@michaelklishin michaelklishin merged commit 57c6bf4 into v4.1.x Jan 3, 2026
543 of 547 checks passed
@michaelklishin michaelklishin deleted the mergify/bp/v4.1.x/pr-15203 branch January 3, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants