forked from mtusi2026/mtusi2026lab7
Добавить стенд лабораторной 7 с mTLS, OpenBao и least privilege worker.
Закрывает обязательный минимум и трек 1: ротация leaf и секрета, sealed OpenBao и сохранность queued-задачи.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
FROM rabbitmq:3.13.7-management-alpine
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/lab-entrypoint.sh
|
||||
RUN chmod 755 /usr/local/bin/lab-entrypoint.sh \
|
||||
&& rabbitmq-plugins enable --offline rabbitmq_auth_mechanism_ssl
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/lab-entrypoint.sh"]
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"vhosts": [{ "name": "/" }],
|
||||
"exchanges": [
|
||||
{
|
||||
"name": "attachment.process",
|
||||
"vhost": "/",
|
||||
"type": "direct",
|
||||
"durable": true,
|
||||
"auto_delete": false,
|
||||
"internal": false,
|
||||
"arguments": {}
|
||||
}
|
||||
],
|
||||
"queues": [
|
||||
{
|
||||
"name": "attachment.process.v1",
|
||||
"vhost": "/",
|
||||
"durable": true,
|
||||
"auto_delete": false,
|
||||
"arguments": {}
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"source": "attachment.process",
|
||||
"vhost": "/",
|
||||
"destination": "attachment.process.v1",
|
||||
"destination_type": "queue",
|
||||
"routing_key": "attachment.process.v1",
|
||||
"arguments": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
mkdir -p /etc/rabbitmq/certs
|
||||
cp /certs-src/ca.crt /etc/rabbitmq/certs/ca.crt
|
||||
cp /certs-src/server.crt /etc/rabbitmq/certs/server.crt
|
||||
cp /certs-src/server.key /etc/rabbitmq/certs/server.key
|
||||
chown -R rabbitmq:rabbitmq /etc/rabbitmq/certs
|
||||
chmod 640 /etc/rabbitmq/certs/server.key
|
||||
exec docker-entrypoint.sh rabbitmq-server
|
||||
@@ -0,0 +1,17 @@
|
||||
listeners.tcp = none
|
||||
listeners.ssl.default = 5671
|
||||
management.tcp.port = 15672
|
||||
management.tcp.ip = 127.0.0.1
|
||||
prometheus.tcp.port = 15692
|
||||
prometheus.tcp.ip = 127.0.0.1
|
||||
ssl_options.cacertfile = /etc/rabbitmq/certs/ca.crt
|
||||
ssl_options.certfile = /etc/rabbitmq/certs/server.crt
|
||||
ssl_options.keyfile = /etc/rabbitmq/certs/server.key
|
||||
ssl_options.verify = verify_peer
|
||||
ssl_options.fail_if_no_peer_cert = true
|
||||
ssl_options.versions.1 = tlsv1.2
|
||||
ssl_options.versions.2 = tlsv1.3
|
||||
auth_mechanisms.1 = EXTERNAL
|
||||
ssl_cert_login_from = common_name
|
||||
management.load_definitions = /etc/rabbitmq/definitions.json
|
||||
log.console.level = warning
|
||||
Reference in New Issue
Block a user