21 lines
3.0 KiB
Markdown
21 lines
3.0 KiB
Markdown
# Матрица доверия — Lab 7 (БПИ2301, Орлова)
|
|
|
|
TLS шифрует и подтверждает сервер; mTLS также проверяет клиента. При доверенном CA всё равно ограничивается разрешённая identity.
|
|
|
|
| Связь | Минимум на 3 | Дополнительно на 4 | Доказательство / конфиг |
|
|
| --- | --- | --- | --- |
|
|
| Клиент → ingress/LB | TLS :8443, CA `certs/ca.crt`, SAN localhost; Bearer | Login rate limit в Redis (429+Retry-After), logout/expiry | `tests/security.py`, `tests/smoke.py`; HAProxy `infra/haproxy.cfg` |
|
|
| LB → API (все реплики) | mTLS: client `lb`, server `api`, verify CA + allowlist CN/SAN `lb` | Leaf API/LB без пересборки образов (`scripts/bootstrap_pki.py --force`) | `tests/student_mtls.py`; HAProxy `crt lb.pem` + API `tlsutil.server_ssl_context` |
|
|
| API/worker → PostgreSQL | TLS verify-full, `sslrootcert=/certs/ca.crt`, роль messenger | Ротация пароля через secrets + restart | `scripts/postgres-entry.sh`, `secrets/database_url` |
|
|
| API/worker → S3 | HTTPS MinIO, scoped user `messenger-api` policy | Denied prefix в policy; ротация access key в secrets | `scripts/minio-tls-entry.sh`, `infra/minio-api-policy.json` |
|
|
| API/worker → broker | amqps:5671, verify_peer + client certs | Разные identities `api-client` / `worker-client` | `scripts/rabbit-entry.sh`, `BROKER_CLIENT_*` |
|
|
| API/worker → Collector | mTLS через `otel-gateway` (nginx), identities api/worker-client | Чужой leaf того же CA (например `lb`) → 403 | `infra/nginx-otel.conf`, `tests/student_mtls.py` (паттерн) |
|
|
| Collector → telemetry backends | Закрытый Docker network; Tempo/Loki HTTP внутри доверенной сети | N/A (бэкенды не публикуют бизнес-API) | `infra/otel/collector.yaml` |
|
|
| Grafana → data sources | Локальный publish 127.0.0.1:3000, provisioning | Viewer anonymous без admin write | `infra/grafana/provisioning` |
|
|
| API/worker/agent → OpenBao | TLS :8200, AppRole, policies `messenger-api`/`messenger-worker` | TTL 5m, fail-closed при sealed | `scripts/openbao_bootstrap.py`, `src/bao.py` |
|
|
| Оператор → OpenBao/Grafana/S3 admin | OpenBao 127.0.0.1:8200; root/unseal только в `secrets/openbao/` | Разделение operator vs AppRole | REPORT.md bootstrap |
|
|
| API → Redis/Valkey | rediss:// + CA verify | Общий login rate limit по репликам | `scripts/redis-entry.sh`, `store.login_rate_*` |
|
|
| Replication/кластерные каналы | N/A — одиночные инстансы stateful | — | — |
|
|
|
|
Публичный обход API-порта отсутствует: наружу только `127.0.0.1:8443` (LB), admin Grafana/Prometheus/OpenBao на localhost. Health API на `127.0.0.1:8081` внутри контейнера, не опубликован.
|