Skip to content

fix(mq): drop the passive exchange declare before binding - #23

Merged
rjd15372 merged 1 commit into
mainfrom
fix/mq-drop-passive-exchange-declare
Nov 19, 2026
Merged

rjd15372 merged 1 commit into
mainfrom
fix/mq-drop-passive-exchange-declare

Conversation

@rjd15372

Copy link
Copy Markdown
Collaborator

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:

ACCESS_REFUSED - configure access to exchange 'obs.events' in vhost 'obs' refused for user 'obs-dashboard'

That build includes the fix for CVE-2026-57221: passive queue and exchange declarations are now authorized, so ExchangeDeclarePassive needs configure permission on the exchange. The consumer account deliberately has read only.

Fix

Remove the ExchangeDeclarePassive call from run(). It was only an existence check: QueueBind already fails with a 404 when the exchange is missing, and needs only read on it. The same code path serves rabbit.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 is mq: connected for the labs instance in the journal on obs01 after the release.

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>
@rjd15372
rjd15372 merged commit c7589e6 into main Nov 19, 2026
5 checks passed
@rjd15372
rjd15372 deleted the fix/mq-drop-passive-exchange-declare branch November 19, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant