forked from mtusi2026/mtusi2026lab7
Реализация на 5
This commit is contained in:
@@ -5,3 +5,7 @@
|
||||
Решение должно показать реальную сервисную аутентификацию и получение нужного secret по ограниченной policy; просто работающий контейнер OpenBao не засчитывается. На 3 статический KV secret допустим. На 4 покажите expiry/renewal/rotation и allow/deny. Путь KV v2 data/metadata и ACL должен соответствовать фактическому mount; не копируйте широкое `path "*"` для приложения.
|
||||
|
||||
Документируйте шаги оператора init/unseal и восстановление после restart. Скрипт не должен печатать tokens/shares или хранить их в Git. См. contracts/trust-matrix.md и REPORT.md.
|
||||
|
||||
## Реализованный workflow
|
||||
|
||||
`server.hcl` задаёт persistent file storage, TLS и declarative audit. Отдельные API/worker/dispatcher policies находятся рядом. `scripts/bao.py` делает operator init/unseal и provisioning; начальный root token отзывается после успеха. Приложение использует cert auth, scoped KV и dynamic database credentials. CA key и unseal shares не монтируются сервисам. После restart оператор выполняет `python3 scripts/bao.py unseal`; recovery и отказ sealed проверяются отдельным сценарием. Подробности и ограничения — в [REPORT.md](../../REPORT.md).
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
path "secret/data/api" { capabilities = ["read"] }
|
||||
path "database/creds/api" { capabilities = ["read"] }
|
||||
path "auth/token/renew-self" { capabilities = ["update"] }
|
||||
path "auth/token/revoke-self" { capabilities = ["update"] }
|
||||
path "sys/leases/renew" { capabilities = ["update"] }
|
||||
@@ -0,0 +1,5 @@
|
||||
path "secret/data/dispatcher" { capabilities = ["read"] }
|
||||
path "database/creds/dispatcher" { capabilities = ["read"] }
|
||||
path "auth/token/renew-self" { capabilities = ["update"] }
|
||||
path "auth/token/revoke-self" { capabilities = ["update"] }
|
||||
path "sys/leases/renew" { capabilities = ["update"] }
|
||||
@@ -0,0 +1,14 @@
|
||||
ui = false
|
||||
api_addr = "https://openbao:8200"
|
||||
storage "file" { path = "/openbao/data" }
|
||||
listener "tcp" {
|
||||
address = "0.0.0.0:8200"
|
||||
tls_cert_file = "/run/identity/tls.crt"
|
||||
tls_key_file = "/run/identity/tls.key"
|
||||
tls_client_ca_file = "/run/identity/ca.crt"
|
||||
tls_min_version = "tls12"
|
||||
}
|
||||
|
||||
audit "file" "local" {
|
||||
options { file_path = "/openbao/data/audit.json" }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
path "secret/data/worker" { capabilities = ["read"] }
|
||||
path "database/creds/worker" { capabilities = ["read"] }
|
||||
path "auth/token/renew-self" { capabilities = ["update"] }
|
||||
path "auth/token/revoke-self" { capabilities = ["update"] }
|
||||
path "sys/leases/renew" { capabilities = ["update"] }
|
||||
Reference in New Issue
Block a user