forked from mtusi2026/mtusi2026lab7
lab7: OpenBao 2.7.3 (не dev, raft на volume, TLS, audit), AppRole и scoped policy для api/relay/worker, секреты только из OpenBao, скрипт оператора и проверка allow/deny
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# OpenBao 2.7 server of the lab 7 stand (compose service `openbao`). NOT dev mode:
|
||||
# * persistent storage: integrated storage (Raft, ONE node - OpenBao 2.7 has no "file" backend
|
||||
# any more) on the named volume baodata (/openbao/file). Everything in it is encrypted by the
|
||||
# barrier key; it starts SEALED after every start and is unsealed by the operator
|
||||
# (scripts/bao_operator.py unseal). Single node = no replication: losing the volume loses the
|
||||
# secrets (they can be re-created from ./secrets by `bootstrap` on a fresh instance).
|
||||
# * TLS listener only (internal CA, SAN openbao + localhost/127.0.0.1 for the operator CLI inside
|
||||
# the container), TLS 1.2+; no plaintext listener, no UI, port not published on the host. The
|
||||
# Raft cluster port 8201 uses OpenBao's own automatic TLS and has no peers here.
|
||||
# * disable_mlock: the container runs without IPC_LOCK (no extra capabilities). The trade-off -
|
||||
# memory pages could be swapped - is accepted on this single-host lab stand: the container has
|
||||
# memswap_limit = memory limit (no swap). See docs/OPERATOR.md.
|
||||
ui = false
|
||||
disable_mlock = true
|
||||
api_addr = "https://openbao:8200"
|
||||
cluster_addr = "https://openbao:8201"
|
||||
log_level = "warn"
|
||||
|
||||
storage "raft" {
|
||||
path = "/openbao/file"
|
||||
node_id = "openbao-1"
|
||||
}
|
||||
|
||||
# Audit log of every request and response (secret values HMAC'ed, never in clear) to the container
|
||||
# stdout: `docker compose logs openbao` shows who read what and every denied request.
|
||||
audit "file" "stdout" {
|
||||
description = "lab 7 audit log"
|
||||
options {
|
||||
file_path = "stdout"
|
||||
}
|
||||
}
|
||||
|
||||
listener "tcp" {
|
||||
address = "0.0.0.0:8200"
|
||||
cluster_address = "0.0.0.0:8201"
|
||||
tls_cert_file = "/run/secrets/openbao.crt"
|
||||
tls_key_file = "/run/secrets/openbao.key"
|
||||
tls_min_version = "tls12"
|
||||
}
|
||||
Reference in New Issue
Block a user