Repository navigation
fix(mq): drop the passive exchange declare before binding - #23
Merged
Merged
Conversation
Brokers with the fix for CVE-2026-57221 (rabbitmq-server 4.1.5-160000.3.1 on the labs instance) authorize passive declarations, so ExchangeDeclarePassive now needs configure permission on the exchange. The consumer account has read only, and the labs consumer failed with a 403 on every reconnect. The declare was only an existence check. QueueBind already fails with a 404 when the exchange is missing and needs only read on it. Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
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.
Problem
Since the labs RabbitMQ broker was upgraded to
rabbitmq-server-4.1.5-160000.3.1, the labs MQ consumer never connects. It retries every 30s with:That build includes the fix for CVE-2026-57221: passive queue and exchange declarations are now authorized, so
ExchangeDeclarePassiveneeds configure permission on the exchange. The consumer account deliberately has read only.Fix
Remove the
ExchangeDeclarePassivecall fromrun(). It was only an existence check:QueueBindalready fails with a 404 when the exchange is missing, and needs only read on it. The same code path servesrabbit.opensuse.org, where the change is equally safe.Also adds a changelog entry and a dated correction to the multi-instance verification notes, which said a passive declare works with read permission alone.
Testing
Backend
go test ./...passes. No test covers the connect sequence, and there is no broker in the test setup, so this is not verified against a real broker. The real check ismq: connectedfor the labs instance in the journal on obs01 after the release.