RabbitMQ User Tags: Common Pitfall with Message Routing and Management Permissions
When troubleshooting message routing or publishing issues (especially with Shovels, Federation, or third-party message headers), a frequent mistake is replacing the administrator tag with the impersonator tag. Because RabbitMQ overwrites tags during updates, this action inadvertently strips away all management permissions—instantly breaking automation scripts, rabbitmqadmin CLI tooling, and Management UI access.
Key Differences:
Tag Name | What It Does | Common Use Case |
administrator | Full management privileges: Create/delete virtual hosts, manage users, configure permissions, define policies, shovels, and federations. Grants complete Management UI access. | Cluster admins, DevOps tooling, and deployment automation scripts (rabbitmqadmin). |
impersonator | Identity Forgery Security Bypassing: Allows publishing messages while forging the user_id property (completely bypasses RabbitMQ's native Validated User-ID protocol checks). | Shovels, federation links, or specialized backend services that must preserve/pass upstream application identities. |
management | Standard Dashboard Access: Provides basic Management UI access and allows managing specific resources within explicitly permitted virtual hosts. | Developers and operations personnel requiring standard dashboard visibility. |
monitoring | Global Cluster Read-Only Access: Grants read-only monitoring access across the entire cluster (can view connections, channel stats, queue depths, and node health). | Monitoring tools, scraping daemons (e.g., Prometheus/Grafana), and read-only support dashboards. |
policymaker | Policy Management Access: Allows users to create and modify cluster policies and runtime parameters (inherits standard management UI permissions). | Infrastructure or engineering teams responsible for setting up High Availability (HA), quorum queues, custom routing rules, or TTL policies. |
Best Practice: Combine Tags When Needed
Administrative service accounts that must both manage cluster features (like dynamic shovels) and process payloads with mismatched identity headers must simultaneously hold both tags.
How to Assign Multiple Tags Safely?
1. Recommended: Check current user tags first
rabbitmqctl list_users | grep <YOUR_USER_ID>2. Set both tags simultaneously (safely overwriting previous states)
rabbitmqctl set_user_tags <YOUR_USER_ID> administrator impersonatorVerification
rabbitmqctl list_users
# Look for the user line to output: [administrator, impersonator]Additional Permission Verification Checks:
rabbitmqctl list_user_permissions <YOUR_USER_ID>
Additional Recommendations
References: