forked from mtusi2026/mtusi2026lab7
Перенесена реализация 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.
422 lines
7.6 KiB
JSON
422 lines
7.6 KiB
JSON
{
|
|
"checked_at": "2026-11-18T20:28:13Z",
|
|
"total": 83,
|
|
"failed": 0,
|
|
"results": [
|
|
{
|
|
"check": "status.initialized_unsealed",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "status.storage_raft_persistent",
|
|
"pass": true,
|
|
"detail": "raft"
|
|
},
|
|
{
|
|
"check": "status.shares_threshold",
|
|
"pass": true,
|
|
"detail": "t=2 n=3"
|
|
},
|
|
{
|
|
"check": "status.not_dev_mode",
|
|
"pass": true,
|
|
"detail": "[\"bao\",\"server\",\"-config=/openbao/config/openbao.hcl\"] null"
|
|
},
|
|
{
|
|
"check": "api.login_policies",
|
|
"pass": true,
|
|
"detail": "default,messenger-api"
|
|
},
|
|
{
|
|
"check": "api.token_ttl_bounded",
|
|
"pass": true,
|
|
"detail": "ttl=900"
|
|
},
|
|
{
|
|
"check": "api.read_own_path_200",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "api.own_fields_exact",
|
|
"pass": true,
|
|
"detail": "POSTGRES_PASSWORD,S3_ACCESS_KEY_ID,S3_SECRET_ACCESS_KEY"
|
|
},
|
|
{
|
|
"check": "api.deny_read_other_service",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "api.deny_read_migrate_admin",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "api.deny_list_metadata",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "api.deny_write_own_secret",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "api.deny_write_policy",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "api.deny_create_token",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "api.deny_seal",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "api.deny_list_auth_roles",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "api.renew_self",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "api.revoked_token_denied",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "api.no_token_in_env",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "api.only_tls_identity_mounted",
|
|
"pass": true,
|
|
"detail": "internal-ca.crt,service.crt,service.key"
|
|
},
|
|
{
|
|
"check": "api.db_role_not_privileged",
|
|
"pass": true,
|
|
"detail": "api_svc TLSv1.3"
|
|
},
|
|
{
|
|
"check": "worker.login_policies",
|
|
"pass": true,
|
|
"detail": "default,messenger-worker"
|
|
},
|
|
{
|
|
"check": "worker.token_ttl_bounded",
|
|
"pass": true,
|
|
"detail": "ttl=900"
|
|
},
|
|
{
|
|
"check": "worker.read_own_path_200",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "worker.own_fields_exact",
|
|
"pass": true,
|
|
"detail": "BROKER_URL,POSTGRES_PASSWORD,S3_ACCESS_KEY_ID,S3_SECRET_ACCESS_KEY"
|
|
},
|
|
{
|
|
"check": "worker.deny_read_other_service",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "worker.deny_read_migrate_admin",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "worker.deny_list_metadata",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "worker.deny_write_own_secret",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "worker.deny_write_policy",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "worker.deny_create_token",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "worker.deny_seal",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "worker.deny_list_auth_roles",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "worker.renew_self",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "worker.revoked_token_denied",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "worker.no_token_in_env",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "worker.only_tls_identity_mounted",
|
|
"pass": true,
|
|
"detail": "internal-ca.crt,service.crt,service.key"
|
|
},
|
|
{
|
|
"check": "worker.db_role_not_privileged",
|
|
"pass": true,
|
|
"detail": "worker_svc TLSv1.3"
|
|
},
|
|
{
|
|
"check": "relay.login_policies",
|
|
"pass": true,
|
|
"detail": "default,messenger-relay"
|
|
},
|
|
{
|
|
"check": "relay.token_ttl_bounded",
|
|
"pass": true,
|
|
"detail": "ttl=900"
|
|
},
|
|
{
|
|
"check": "relay.read_own_path_200",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "relay.own_fields_exact",
|
|
"pass": true,
|
|
"detail": "BROKER_URL,POSTGRES_PASSWORD"
|
|
},
|
|
{
|
|
"check": "relay.deny_read_other_service",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "relay.deny_read_migrate_admin",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "relay.deny_list_metadata",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "relay.deny_write_own_secret",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "relay.deny_write_policy",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "relay.deny_create_token",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "relay.deny_seal",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "relay.deny_list_auth_roles",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "relay.renew_self",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "relay.revoked_token_denied",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "relay.no_token_in_env",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "relay.only_tls_identity_mounted",
|
|
"pass": true,
|
|
"detail": "internal-ca.crt,service.crt,service.key"
|
|
},
|
|
{
|
|
"check": "relay.db_role_not_privileged",
|
|
"pass": true,
|
|
"detail": "relay_svc TLSv1.3"
|
|
},
|
|
{
|
|
"check": "janitor.login_policies",
|
|
"pass": true,
|
|
"detail": "default,messenger-janitor"
|
|
},
|
|
{
|
|
"check": "janitor.token_ttl_bounded",
|
|
"pass": true,
|
|
"detail": "ttl=900"
|
|
},
|
|
{
|
|
"check": "janitor.read_own_path_200",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "janitor.own_fields_exact",
|
|
"pass": true,
|
|
"detail": "POSTGRES_PASSWORD,S3_ACCESS_KEY_ID,S3_SECRET_ACCESS_KEY"
|
|
},
|
|
{
|
|
"check": "janitor.deny_read_other_service",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "janitor.deny_read_migrate_admin",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "janitor.deny_list_metadata",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "janitor.deny_write_own_secret",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "janitor.deny_write_policy",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "janitor.deny_create_token",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "janitor.deny_seal",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "janitor.deny_list_auth_roles",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "janitor.renew_self",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "janitor.revoked_token_denied",
|
|
"pass": true,
|
|
"detail": "403"
|
|
},
|
|
{
|
|
"check": "janitor.no_token_in_env",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "janitor.only_tls_identity_mounted",
|
|
"pass": true,
|
|
"detail": "internal-ca.crt,service.crt,service.key"
|
|
},
|
|
{
|
|
"check": "janitor.db_role_not_privileged",
|
|
"pass": true,
|
|
"detail": "janitor_svc TLSv1.3"
|
|
},
|
|
{
|
|
"check": "worker.has_own_s3_key",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "worker.no_admin_or_api_s3_key",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "worker.db_no_users_sessions_messages",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "api.db_no_ddl_truncate",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "sealed.after_restart_sealed",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "sealed.running_api_keeps_serving",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "sealed.restarted_replica_not_healthy",
|
|
"pass": true,
|
|
"detail": "unhealthy"
|
|
},
|
|
{
|
|
"check": "sealed.restarted_replica_waits_for_openbao",
|
|
"pass": true,
|
|
"detail": ""
|
|
},
|
|
{
|
|
"check": "sealed.lb_serves_from_other_replica",
|
|
"pass": true,
|
|
"detail": "r-752aa9a6c1"
|
|
},
|
|
{
|
|
"check": "sealed.replica_healthy_after_unseal",
|
|
"pass": true,
|
|
"detail": "11.5s after unseal (total 42s)"
|
|
},
|
|
{
|
|
"check": "sealed.kv_persisted_after_restart",
|
|
"pass": true,
|
|
"detail": ""
|
|
}
|
|
]
|
|
} |