lab 7 openbao

This commit is contained in:
2026-11-23 14:39:13 +03:00
parent 20afc2c790
commit 912a874f00
118 changed files with 12464 additions and 5108 deletions
+6
View File
@@ -0,0 +1,6 @@
# Admin/health client config used INSIDE the kafka and kafka_init containers (identity = the mounted /pki/keystore.pem).
security.protocol=SSL
ssl.keystore.type=PEM
ssl.keystore.location=/pki/keystore.pem
ssl.truststore.type=PEM
ssl.truststore.location=/pki/ca.crt
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# Idempotent broker topology + ACLs. Principals are certificate CNs (ssl.principal.mapping.rules).
# dispatcher = producer only, worker = consumer of the jobs topic and of its own group only. Anybody else (even with a CA-signed cert) is denied.
set -eu
K=/opt/kafka/bin; B="--bootstrap-server kafka:9092 --command-config /client.properties"
$K/kafka-topics.sh $B --create --if-not-exists --topic "$JOBS_TOPIC" --partitions 3 --replication-factor 1 --config min.insync.replicas=1 --config retention.ms=604800000
$K/kafka-acls.sh $B --add --allow-principal User:dispatcher --producer --idempotent --topic "$JOBS_TOPIC"
$K/kafka-acls.sh $B --add --allow-principal User:worker --consumer --topic "$JOBS_TOPIC" --group attachment-workers
$K/kafka-acls.sh $B --list