feat: load process secrets from OpenBao via cert auth

OpenBao 2.7.3 (raft, TLS 1.3 with client certificates) holds the
PostgreSQL role passwords, the Valkey password and the S3 keys; each
process logs in with its own mTLS identity, reads only its paths and
renews its token in the background. Operator init, unseal, configure
and seed go through infra/openbao/bao.py and make bao_*; checks are
make bao_check and driver.py openbao-outage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-26 13:55:09 +03:00
co-authored by Claude Opus 5.5
parent 4dd4a957be
commit 64210dace0
64 changed files with 6709 additions and 321 deletions
+12
View File
@@ -15,8 +15,20 @@ from fakes import (
FakeUnitOfWork,
)
from src.config import settings
from src.infra.secrets import substitute_for_tests
from src.schemas.enums import MetricBucketsEnum
# глобалы клиентов процесса API (src/api/dependencies.py → db/session.py,
# cache/instance.py, s3/instance.py) берут секции с секретами из OpenBao
# (change openbao-secrets): быстрые тесты подставляют их кодом до импорта
# клиентов, OpenBao и сети нет
substitute_for_tests(
"api",
database=settings.database,
cache=settings.cache,
s3=settings.s3,
)
@pytest.fixture
def anyio_backend() -> str: