lab7: топология RabbitMQ у оператора (import_definitions), relay — только publish; диагностика ротации, логи приложений в доказательствах
This commit is contained in:
@@ -191,10 +191,11 @@ def rabbit_users(worker_cn='worker-g1', relay_cn='relay-g1', drop=()):
|
||||
names = {u['user'] for u in json.loads(users or '[]')}
|
||||
if 'guest' in names:
|
||||
ctl('delete_user', 'guest')
|
||||
perms = {relay_cn: (r'^(attachments|attachments\.dlx|attachment\.process|attachment\.dead)$',
|
||||
r'^(attachments|attachments\.dlx|attachment\.process|attachment\.dead)$',
|
||||
r'^(attachments|attachments\.dlx)$'),
|
||||
worker_cn: ('^$', '^$', r'^attachment\.process$')}
|
||||
# Топологию (exchange, quorum-очереди, DLX, bindings) создаёт оператор импортом
|
||||
# infra/rabbitmq/definitions.json; сервисам configure не нужен вовсе.
|
||||
ctl('import_definitions', '/etc/rabbitmq/lab7-definitions.json')
|
||||
perms = {relay_cn: ('^$', r'^attachments$', '^$'), # только publish в exchange attachments
|
||||
worker_cn: ('^$', '^$', r'^attachment\.process$')} # только чтение своей очереди
|
||||
for u, (conf, write, read) in perms.items():
|
||||
if u not in names:
|
||||
# Пароль случайный и сразу удаляется: вход только SASL EXTERNAL (сертификат).
|
||||
|
||||
Reference in New Issue
Block a user