Skeleton contracts / contracts (pull_request) Blocked by required conditions
Smoke/security/grade4/persistence/failover пройдены; REPORT и DEFENSE.
25 lines
1.9 KiB
Markdown
25 lines
1.9 KiB
Markdown
# Матрица доверия — Gavrilenko lab7 (цель 4)
|
|
|
|
| Связь | Минимум на 3 | Дополнительно на 4 | Доказательство / конфиг |
|
|
| --- | --- | --- | --- |
|
|
| Клиент → ingress/LB | TLS, CA + hostname `localhost` | Session expiry; login rate limit Redis | `make test-security`, `middleware/login_limit.go` |
|
|
| LB → API | mTLS + SAN `lb.messenger.lab` | Leaf rotation via `bootstrap-pki.sh` | `infra/haproxy/haproxy.cfg`, `internal/tlslisten` |
|
|
| API/worker → PostgreSQL | TLS возможен; учебно: сеть docker internal + role messenger | Ротация password file | `secrets/database_url.txt` |
|
|
| API/worker → S3 | HTTP inside net + scoped IAM keys | Deny prefix — policy в s3config | `Dockerfile.s3config` |
|
|
| API/worker → broker | TLS планируется | **TODO:** mTLS AMQP | `internal/rabbitmq/client.go` |
|
|
| API/worker → Collector | HTTP OTLP | **TODO:** mTLS OTLP | `internal/telemetry` |
|
|
| Collector → backends | internal HTTP | scoped | `infra/otel/collector.yaml` |
|
|
| Grafana → sources | HTTP internal | viewer role | `compose.yaml` grafana |
|
|
| API/worker → OpenBao | TLS + AppRole | renewal/expiry | `scripts/bootstrap-openbao.sh`, policies |
|
|
| Оператор → OpenBao | TLS localhost:8217 | root только в `secrets/bao-admin/` | bootstrap script |
|
|
| API → Redis | TCP + ACL password | ротация file secret | `secrets/cache_url.txt` |
|
|
| Replication | N/A | N/A | — |
|
|
|
|
## Отрицательные проверки
|
|
|
|
1. HTTPS trusted CA — `make test-security`; untrusted — SSLCertVerificationError.
|
|
2. LB→API: без client cert — handshake fail (прямой `curl https://api:8080` из сети).
|
|
3. **Grade 4 broker/OTel:** в работе (sidecar или native TLS).
|
|
4. ACL — публичный `tests/smoke.py`.
|
|
5. OpenBao deny — `bao kv get` под worker policy (после bootstrap).
|
|
6. Revoke leaf — **TODO:** `scripts/rotate-leaf.sh`. |