Files
mtusi2026lab7/contracts/trust-matrix.md
T
HellsTomatoandCopilot 2ef0299e34
Skeleton contracts / contracts (pull_request) Canceled after 0s
Complete lab7 grade 4 implementation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-06 15:35:53 +03:00

27 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Матрица доверия
Локальный CA создаётся `scripts/init_pki.sh` и хранится только в `secrets/pki/`.
Leaf certificates живут 14 дней; приложение не имеет CA private key. `api` принимает
только client SAN `lb`, поэтому другой leaf того же CA не становится доверенным LB.
| Связь | Защита и identity | Проверка / отрицательный тест |
| --- | --- | --- |
| Клиент → ingress | TLS 1.2+, SAN `localhost`, Bearer | `make test-security CA_FILE=secrets/pki/ca.crt`; пустой trust store отвергается |
| nginx LB → API | mTLS: server `api`, client SAN `lb`; Java filter allowlists `lb` | без cert/с `api-otel`/чужим CA — 403/handshake failure; `scripts/security-tests.sh` |
| API/worker → PostgreSQL | отдельные app roles, TLS `verify-full`; DB secret scoped | роль worker не может выполнять API DDL; rotation через Bao KV |
| API/worker → S3 | TLS, отдельные API/worker keys и private bucket | `scripts/check-private-bucket.sh`; denied foreign prefix |
| API/worker → broker | TLS+mTLS, SAN `api-broker` / `worker-broker`; RabbitMQ ACL | wrong trusted identity has no vhost permission; no cert rejected |
| API/worker → Collector | OTLP HTTPS+mTLS, SAN `api-otel` / `worker-otel` | collector rejects no/other client SAN |
| Collector → telemetry backends | TLS in internal network; bounded queues | backend outage does not stop message processing |
| API/worker → OpenBao | TLS, AppRole, 15 min token / 10 min SecretID | `bao token capabilities kv/data/messenger/worker` from API token is deny |
| Operator → OpenBao/Grafana | local TLS and operator authentication | root token/unseal shares are not mounted into services |
| Redis | TLS+ACL when enabled; hashed session keys | logout and TTL checks in smoke |
Bootstrap: operator runs `scripts/init_secrets.py`, `scripts/init_pki.sh`, starts OpenBao
with persistent `/openbao/data`, then runs `bao operator init` and unseals interactively.
Only the operator invokes `scripts/bootstrap_openbao.sh`; wrapped short-lived SecretIDs are
delivered out of band. Leaf rotation replaces a `secrets/pki/<identity>.crt/key` pair and
restarts only its consumer. Revocation is enforced for new connections by removing the
identity from the allowlist/CA and reconnecting; existing TLS sessions remain valid until
closed, which is the documented bounded window.