forked from mtusi2026/mtusi2026lab7
feat: require TLS to PostgreSQL, Valkey and S3
Storage servers accept only TLS 1.3 (pg_hba hostssl / hostnossl reject, Valkey port 0, S3 gateway HTTPS only) with stand identities postgres, valkey and s3. Clients trust only the stand CA from [client_tls] ca_file and check the host name; no switch to disable verification. Processes exit with code 2 without a CA or with an IP storage address. Temporary stands, CI and bench/ run on TLS storages; make storage_tls_check adds negative checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+12
-1
@@ -14,8 +14,10 @@ CI_HAPROXY_CFG="$(cat infra/haproxy/haproxy.cfg)$nl"
|
||||
# TLS 1.3 на ingress)
|
||||
CI_HAPROXY_OPENSSL_CNF="$(cat infra/haproxy/openssl.cnf)$nl"
|
||||
CI_RABBITMQ_CONF="$(cat infra/rabbitmq/rabbitmq.conf)$nl"
|
||||
# pg_hba.conf стенда (change storage-tls): по сети — только TLS
|
||||
CI_POSTGRES_HBA="$(cat infra/postgres/pg_hba.conf)$nl"
|
||||
export CI_CONFIG_TOML CI_VALKEY_CONF CI_S3_BOOTSTRAP CI_HAPROXY_CFG \
|
||||
CI_HAPROXY_OPENSSL_CNF CI_RABBITMQ_CONF
|
||||
CI_HAPROXY_OPENSSL_CNF CI_RABBITMQ_CONF CI_POSTGRES_HBA
|
||||
# наблюдаемость (design change otel-telemetry, решение 20)
|
||||
CI_OTEL_COLLECTOR="$(cat infra/otel/collector.yaml)$nl"
|
||||
CI_PROMETHEUS_YML="$(cat infra/otel/prometheus/prometheus.yml)$nl"
|
||||
@@ -44,6 +46,15 @@ CI_PKI_HAPROXY_PEM="$(cat "$ci_pki_dir/haproxy.pem")$nl"
|
||||
CI_PKI_INGRESS_PEM="$(cat "$ci_pki_dir/ingress.pem")$nl"
|
||||
export CI_PKI_CA_CRT CI_PKI_CRL_PEM CI_PKI_API_CRT CI_PKI_API_KEY \
|
||||
CI_PKI_HAPROXY_PEM CI_PKI_INGRESS_PEM
|
||||
# серверы хранилищ (change storage-tls): пары postgres, valkey, s3
|
||||
CI_PKI_POSTGRES_CRT="$(cat "$ci_pki_dir/postgres.crt")$nl"
|
||||
CI_PKI_POSTGRES_KEY="$(cat "$ci_pki_dir/postgres.key")$nl"
|
||||
CI_PKI_VALKEY_CRT="$(cat "$ci_pki_dir/valkey.crt")$nl"
|
||||
CI_PKI_VALKEY_KEY="$(cat "$ci_pki_dir/valkey.key")$nl"
|
||||
CI_PKI_S3_CRT="$(cat "$ci_pki_dir/s3.crt")$nl"
|
||||
CI_PKI_S3_KEY="$(cat "$ci_pki_dir/s3.key")$nl"
|
||||
export CI_PKI_POSTGRES_CRT CI_PKI_POSTGRES_KEY CI_PKI_VALKEY_CRT \
|
||||
CI_PKI_VALKEY_KEY CI_PKI_S3_CRT CI_PKI_S3_KEY
|
||||
|
||||
# готовность стенда через LB: /health/ready отвечает 200 от API_REPLICAS
|
||||
# (из .env, по умолчанию 2) разных реплик — X-Instance-Id. Срок 60 с:
|
||||
|
||||
Reference in New Issue
Block a user