Files
mtusi2026lab7/evidence/lab7-tls-matrix.txt
T
zemiles 9cc80d2529 ЛР 7 — БПИ2303 — Лазарев — на 3
Перенесена реализация lab6; бизнес-API без изменений, транспорт — HTTPS.

- Внешний HTTPS (public-ca) на 127.0.0.1:8443; HSTS, TLS >= 1.2.
- Обязательное mTLS LB -> каждая API-реплика: API проверяет цепочку
  internal-ca и SAN клиента (allowlist: lb); health только на 127.0.0.1.
- TLS с проверкой сервера ко всем зависимостям: PostgreSQL verify-full
  (pg_hba только hostssl), HTTPS S3, AMQPS, OTLP/HTTPS с client cert,
  mTLS Collector -> Prometheus/Loki/Tempo, Grafana -> datasources, scrape.
- OpenBao 2.7.2 не в dev-mode: Raft на volume, init/unseal оператором,
  auth/cert с ролью и policy на сервис, TTL 15 мин + renew/re-login.
- Отдельные роли PostgreSQL с грантами по таблицам; разные ключи S3 и
  пользователи брокера выдаются из OpenBao.
- Argon2id (m=19 MiB, t=2, p=1, замер на стенде) и rehash при входе.
- Случайный X-Instance-Id; hardening контейнеров (non-root, cap_drop ALL,
  no-new-privileges, read-only, лимиты); TCP_NODELAY на сокете API.
- Модель угроз, trust matrix, отрицательные тесты TLS/mTLS, API, OpenBao,
  hardening; evidence, в т.ч. прогон из чистого clone.
2026-11-18 23:59:35 +03:00

69 lines
9.1 KiB
Plaintext

API replicas: 2
PASS LB->API[0] no client cert expect=fail got=fail tls_alert:TLSV13_ALERT_CERTIFICATE_REQUIRED
PASS LB->API[0] client cert of rogue CA, SAN lb expect=fail got=fail tls_alert:TLSV1_ALERT_UNKNOWN_CA
PASS LB->API[0] trusted CA, identity intruder expect=fail got=fail closed_after_handshake_no_http_response
PASS LB->API[0] plaintext HTTP to 8443 expect=fail got=fail reset_by_server
PASS LB->API[0] health listener 8081 from network expect=fail got=fail connection_refused
PASS LB->API[0] server cert, wrong expected hostname expect=fail got=fail server_cert_rejected_by_client:Hostname mismatch, certificate is not valid for 'db'.
PASS LB->API[0] identity lb -> /health/ready expect=ok got=ok 200
PASS LB->API[0] identity lb, no Bearer -> business API expect=ok got=ok 401
PASS LB->API[1] no client cert expect=fail got=fail tls_alert:TLSV13_ALERT_CERTIFICATE_REQUIRED
PASS LB->API[1] client cert of rogue CA, SAN lb expect=fail got=fail tls_alert:TLSV1_ALERT_UNKNOWN_CA
PASS LB->API[1] trusted CA, identity intruder expect=fail got=fail closed_after_handshake_no_http_response
PASS LB->API[1] plaintext HTTP to 8443 expect=fail got=fail reset_by_server
PASS LB->API[1] health listener 8081 from network expect=fail got=fail connection_refused
PASS LB->API[1] server cert, wrong expected hostname expect=fail got=fail server_cert_rejected_by_client:Hostname mismatch, certificate is not valid for 'db'.
PASS LB->API[1] identity lb -> /health/ready expect=ok got=ok 200
PASS LB->API[1] identity lb, no Bearer -> business API expect=ok got=ok 401
PASS API/worker->PostgreSQL sslmode=disable (plaintext) expect=fail got=fail connection failed: connection to server at "192.168.0.3", port 5432 failed: fatal: pg_hba.conf rejects connection for h
PASS API/worker->PostgreSQL verify-full, rogue CA as trust expect=fail got=fail server_cert_rejected_by_client
PASS API/worker->PostgreSQL verify-full by IP (SAN mismatch) expect=fail got=fail server_cert_rejected_by_client
PASS API/worker->PostgreSQL verify-full, internal CA, wrong pwd expect=ok got=ok tls_ok_then_password_rejected
PASS API/worker->S3 plaintext HTTP expect=fail got=fail http_400_plain_http_sent_to_https_port
PASS API/worker->S3 HTTPS, rogue CA as trust expect=fail got=fail server_cert_rejected_by_client:unable to get local issuer certificate
PASS API/worker->S3 HTTPS verified, anonymous list expect=ok got=ok 403
PASS API/worker->broker plaintext AMQP 5672 expect=fail got=fail connection_refused
PASS API/worker->broker AMQPS, rogue CA as trust expect=fail got=fail server_cert_rejected_by_client:self-signed certificate in certificate chain
PASS API/worker->broker AMQPS, client cert of rogue CA expect=fail got=fail tls_alert:TLSV1_ALERT_UNKNOWN_CA
PASS API/worker->broker AMQPS verified (без cert), Connection.Start expect=ok got=ok amqp_connection_start
PASS API/worker->broker AMQPS, user worker, wrong password expect=fail got=fail auth_refused
PASS Prometheus->broker metrics HTTPS 15691 without client cert expect=fail got=fail tls_alert:TLSV13_ALERT_CERTIFICATE_REQUIRED
PASS Prometheus->broker metrics plaintext 15692 from network expect=fail got=fail connection_refused
PASS API/worker->Collector plaintext expect=fail got=fail http_400_plain_http_sent_to_https_port
PASS API/worker->Collector TLS without client cert expect=fail got=fail tls_alert:TLSV13_ALERT_CERTIFICATE_REQUIRED
PASS API/worker->Collector TLS, client cert of rogue CA expect=fail got=fail tls_alert:TLSV1_ALERT_UNKNOWN_CA
PASS API/worker->Collector TLS, wrong expected hostname expect=fail got=fail server_cert_rejected_by_client:Hostname mismatch, certificate is not valid for 'api'.
PASS Collector/Grafana->Prometheus plaintext expect=fail got=fail http_400_plain_http_sent_to_https_port
PASS Collector/Grafana->Prometheus TLS without client cert expect=fail got=fail tls_alert:TLSV13_ALERT_CERTIFICATE_REQUIRED
PASS Collector/Grafana->Prometheus TLS, client cert of rogue CA expect=fail got=fail tls_alert:TLSV1_ALERT_UNKNOWN_CA
PASS Collector/Grafana->Prometheus TLS, wrong expected hostname expect=fail got=fail server_cert_rejected_by_client:Hostname mismatch, certificate is not valid for 'api'.
PASS Collector/Grafana->Loki plaintext expect=fail got=fail http_400_plain_http_sent_to_https_port
PASS Collector/Grafana->Loki TLS without client cert expect=fail got=fail tls_alert:TLSV13_ALERT_CERTIFICATE_REQUIRED
PASS Collector/Grafana->Loki TLS, client cert of rogue CA expect=fail got=fail tls_alert:TLSV1_ALERT_UNKNOWN_CA
PASS Collector/Grafana->Loki TLS, wrong expected hostname expect=fail got=fail server_cert_rejected_by_client:Hostname mismatch, certificate is not valid for 'api'.
PASS Grafana->Tempo plaintext expect=fail got=fail http_400_plain_http_sent_to_https_port
PASS Grafana->Tempo TLS without client cert expect=fail got=fail tls_alert:TLSV13_ALERT_CERTIFICATE_REQUIRED
PASS Grafana->Tempo TLS, client cert of rogue CA expect=fail got=fail tls_alert:SSLEOFError
PASS Grafana->Tempo TLS, wrong expected hostname expect=fail got=fail server_cert_rejected_by_client:Hostname mismatch, certificate is not valid for 'api'.
PASS Collector->Tempo OTLP gRPC plaintext expect=fail got=fail closed_without_plaintext_response
PASS Collector->Tempo OTLP gRPC TLS without client cert expect=fail got=fail tls_alert:TLSV13_ALERT_CERTIFICATE_REQUIRED
PASS Collector->Tempo OTLP gRPC TLS, client cert of rogue CA expect=fail got=fail tls_alert:TLSV1_ALERT_UNKNOWN_CA
PASS Collector->Tempo OTLP gRPC TLS, wrong expected hostname expect=fail got=fail server_cert_rejected_by_client:Hostname mismatch, certificate is not valid for 'api'.
PASS Prometheus->LB metrics plaintext expect=fail got=fail closed_without_plaintext_response
PASS Prometheus->LB metrics TLS without client cert expect=fail got=fail tls_alert:TLSV13_ALERT_CERTIFICATE_REQUIRED
PASS Prometheus->LB metrics TLS, client cert of rogue CA expect=fail got=fail tls_alert:TLSV1_ALERT_UNKNOWN_CA
PASS Prometheus->LB metrics TLS, wrong expected hostname expect=fail got=fail server_cert_rejected_by_client:Hostname mismatch, certificate is not valid for 'api'.
PASS internal-only port otel-collector:4317 from network expect=fail got=fail connection_refused
PASS internal-only port otel-collector:8888 from network expect=fail got=fail connection_refused
PASS internal-only port otel-collector:13133 from network expect=fail got=fail connection_refused
PASS internal-only port loki:9095 from network expect=fail got=fail connection_refused
PASS internal-only port tempo:9096 from network expect=fail got=fail connection_refused
INFO API/worker->Collector intruder cert: ('ok', 405)
PASS services->OpenBao plaintext HTTP expect=fail got=fail http_400_plain_http_sent_to_https_port
PASS services->OpenBao TLS, rogue CA as trust expect=fail got=fail server_cert_rejected_by_client:unable to get local issuer certificate
PASS services->OpenBao TLS verified, /v1/sys/health expect=ok got=ok 200
PASS services->OpenBao cert login as role api with intruder cert expect=fail got=fail http_400
PASS services->OpenBao cert login as role api with lb cert expect=fail got=fail http_400
PASS services->OpenBao cert login without client cert expect=fail got=fail http_400
PASS: 67 checks, 0 failed