Implement Lab 7 security and infrastructure
Skeleton contracts / contracts (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
This commit is contained in:
+22
-4
@@ -1,7 +1,25 @@
|
||||
# OpenBao — реализовать конфигурацию и политики
|
||||
# OpenBao bootstrap (non-dev, persistent)
|
||||
|
||||
Добавьте non-dev конфигурацию listener/storage/TLS, API/worker policies, bootstrap и rotation scripts. Credentials и unseal material создаются локально; здесь нет готового root token или private key.
|
||||
OpenBao uses file storage in the `openbao_data` volume and HTTPS on 8200. The operator owns initialization, unseal shares and the initial root token. They are never stored in Git, `.env`, images or application configuration.
|
||||
|
||||
Решение должно показать реальную сервисную аутентификацию и получение нужного secret по ограниченной policy; просто работающий контейнер OpenBao не засчитывается. На 3 статический KV secret допустим. На 4 покажите expiry/renewal/rotation и allow/deny. Путь KV v2 data/metadata и ACL должен соответствовать фактическому mount; не копируйте широкое `path "*"` для приложения.
|
||||
## First initialization (PowerShell)
|
||||
|
||||
Документируйте шаги оператора init/unseal и восстановление после restart. Скрипт не должен печатать tokens/shares или хранить их в Git. См. contracts/trust-matrix.md и REPORT.md.
|
||||
1. Generate local TLS files with `scripts/bootstrap-certs.ps1`.
|
||||
2. Start only OpenBao: `docker compose up -d openbao`.
|
||||
3. Initialize once and save the output securely offline:
|
||||
|
||||
`docker compose exec openbao bao operator init -key-shares=3 -key-threshold=2`
|
||||
|
||||
4. Unseal using two distinct shares:
|
||||
|
||||
`docker compose exec openbao bao operator unseal`
|
||||
|
||||
Repeat with the second share. Never put shares in scripts or source control.
|
||||
5. Run `scripts/bootstrap-openbao.ps1`. It prompts for the root token without echoing it, creates KV v2, policies and AppRole roles, then writes short-lived SecretIDs and RoleIDs to ignored local files under `secrets/bao/`.
|
||||
6. Start API/worker after bootstrap. Each service authenticates with its own AppRole and reads only its own KV path. The application never receives the root token or unseal material.
|
||||
|
||||
## Restart
|
||||
|
||||
The storage volume persists. After an ordinary restart, check `bao status`. If sealed, an operator must unseal with two shares. Do not automate unseal by placing shares beside the container.
|
||||
|
||||
KV v2 secrets are static for this lab-3 baseline. Rotate AppRole SecretIDs by generating new IDs, updating the local files and restarting the affected service. Dynamic credentials and zero-downtime rotation are outside the selected grade.
|
||||
|
||||
Reference in New Issue
Block a user