From 3255edc7b6f92b696256dbb985e8ab7dd90486ee Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sat, 8 Feb 2025 10:45:33 -0600 Subject: [PATCH] rabbitmq: Configure dch-webhooks/host-provisioner The *dch-webhooks* user is used by *dch-webhooks* in order to publish host information when a new machine triggers its _POST /host/online_ webhook. It therefore needs to be able to write to the _host-provisioner_ queue (via the default exchange). The *host-provisioner* user is used by the corresponding consumer to receive the host information and initiate the provisioning process. --- rabbitmq/definitions.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/rabbitmq/definitions.json b/rabbitmq/definitions.json index 0261acc..7954fcd 100644 --- a/rabbitmq/definitions.json +++ b/rabbitmq/definitions.json @@ -12,6 +12,14 @@ { "name": "xactmon", "tags": [] + }, + { + "name": "host-provisioner", + "tags": [] + }, + { + "name": "dch-webhooks", + "tags": [] } ], "permissions": [ @@ -21,6 +29,20 @@ "configure": "^xactmon\\..*", "read": "^xactmon\\..*", "write": "^xactmon\\..*" + }, + { + "user": "dch-webhooks", + "vhost": "/", + "configure": "^host-provisioner$", + "read": "^host-provisioner$", + "write": "^(host-provisioner|amq\\.default)$" + }, + { + "user": "host-provisioner", + "vhost": "/", + "configure": "^host-provisioner$", + "read": "^host-provisioner$", + "write": "^(host-provisioner|amq\\.default)$" } ] }