Files
mtusi2026lab7/evidence/lab7-api-security.json
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

173 lines
3.3 KiB
JSON

{
"checked_at": "2026-11-18T20:27:20Z",
"base_url": "https://localhost:8443",
"total": 33,
"failed": 0,
"results": [
{
"check": "tls.trusted_ca_and_hostname",
"pass": true,
"detail": "TLSv1.3"
},
{
"check": "tls.wrong_hostname_rejected",
"pass": true,
"detail": "Hostname mismatch, certificate is not valid for 'evil.example'."
},
{
"check": "tls.internal_ca_does_not_validate_ingress",
"pass": true,
"detail": "unable to get local issuer certificate"
},
{
"check": "tls.tls11_refused",
"pass": true,
"detail": "tls_error TLSV1_ALERT_PROTOCOL_VERSION"
},
{
"check": "setup.attachment_ready",
"pass": true,
"detail": "ready"
},
{
"check": "outsider.chat_404",
"pass": true,
"detail": "404"
},
{
"check": "outsider.history_404",
"pass": true,
"detail": "404"
},
{
"check": "outsider.attachment_metadata_404",
"pass": true,
"detail": "404"
},
{
"check": "outsider.attachment_content_404",
"pass": true,
"detail": "404"
},
{
"check": "outsider.attachment_thumbnail_404",
"pass": true,
"detail": "404"
},
{
"check": "outsider.attach_foreign_file_404",
"pass": true,
"detail": "404"
},
{
"check": "outsider.post_into_foreign_chat_404",
"pass": true,
"detail": "404"
},
{
"check": "outsider.chat_list_hides_foreign",
"pass": true,
"detail": ""
},
{
"check": "spoof.x_user_id_ignored",
"pass": true,
"detail": "me=eve"
},
{
"check": "spoof.x_user_id_alone_401",
"pass": true,
"detail": ""
},
{
"check": "auth.basic_on_business_endpoint_401",
"pass": true,
"detail": ""
},
{
"check": "auth.unknown_token_401",
"pass": true,
"detail": "Bearer realm=\"messenger\""
},
{
"check": "auth.same_401_unknown_user_and_wrong_password",
"pass": true,
"detail": ""
},
{
"check": "auth.error_has_no_credentials_or_internals",
"pass": true,
"detail": ""
},
{
"check": "logout.204",
"pass": true,
"detail": ""
},
{
"check": "logout.token_revoked_401",
"pass": true,
"detail": ""
},
{
"check": "logout.repeat_401",
"pass": true,
"detail": ""
},
{
"check": "expiry.expired_session_401",
"pass": true,
"detail": "rows=1"
},
{
"check": "argon2.stored_format",
"pass": true,
"detail": "$argon2id$v=19$m=19456,t=2,p=1$<salt>$<hash>"
},
{
"check": "argon2.unique_salt",
"pass": true,
"detail": ""
},
{
"check": "argon2.rehash_legacy_scrypt_on_login",
"pass": true,
"detail": "$argon2id$v=19$m=19456,t=2,p=1"
},
{
"check": "limits.json_body_over_1mib_413",
"pass": true,
"detail": "payload_too_large"
},
{
"check": "limits.upload_over_10mib_413",
"pass": true,
"detail": "payload_too_large"
},
{
"check": "headers.instance_alias_random",
"pass": true,
"detail": "r-4676e5ef75"
},
{
"check": "headers.no_server_banner",
"pass": true,
"detail": "None"
},
{
"check": "headers.hsts",
"pass": true,
"detail": ""
},
{
"check": "ratelimit.login_429_with_retry_after",
"pass": true,
"detail": "first 429 at attempt 19, Retry-After=10, code=rate_limited"
},
{
"check": "ratelimit.recovers_after_window",
"pass": true,
"detail": ""
}
]
}