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:
@@ -382,8 +382,9 @@ async def test_deadline_in_second_block_single_record(
|
||||
async with TcpProxy(*proxy_target) as proxy:
|
||||
proxied = create_engine(
|
||||
dependencies.settings.database.model_copy(
|
||||
update={"host": "127.0.0.1", "port": proxy.port},
|
||||
update={"host": "localhost", "port": proxy.port},
|
||||
),
|
||||
ca_file=dependencies.settings.client_tls.ca_file,
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
dependencies,
|
||||
@@ -506,7 +507,10 @@ async def test_code_order_with_postgres_down(
|
||||
down_settings = dependencies.settings.database.model_copy(
|
||||
update={"port": 1, "connect_timeout_seconds": 1},
|
||||
)
|
||||
down = create_engine(down_settings)
|
||||
down = create_engine(
|
||||
down_settings,
|
||||
ca_file=dependencies.settings.client_tls.ca_file,
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
dependencies,
|
||||
"session_factory",
|
||||
|
||||
Reference in New Issue
Block a user