Skip to content

feat(pg): verify database TLS with the RDS CA bundle - #989

Merged
athvin merged 3 commits into
mainfrom
issue/553-pg-verify-full
Nov 9, 2026
Merged

athvin merged 3 commits into
mainfrom
issue/553-pg-verify-full

Conversation

@athvin

@athvin athvin commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #988

Adds verified PostgreSQL TLS to the Rust control plane and entity CLI, with a checksum-pinned RDS CA bundle in both runtime images. URI sslmode=verify-full now requires an explicit sslrootcert and verifies certificate trust and hostname. Existing require/prefer/disable connections retain their behavior.

The installed postgres.js already handles these DSNs for both the app and migration job; tests pin that behavior. Records the owner's decision to retain production backups for 14 days. Production DSNs and the remaining live acceptance probes stay on #553 until these images deploy.

Validation: local make check passed in full (965 passing tests), make frontend passed (569 functional tests passed, 139 skipped), and cargo deny check passed. A disposable TLS PostgreSQL passed migrations and all five frontend driver tests; both frontend and Rust CLI rejected wrong-hostname connections, and the frontend rejected an untrusted CA. Rust tests cover trust, hostname rejection, malformed configuration, and preservation of Postgres URI encoding. make check-e2e passed in full (403 passing tests) against a disposable local PostgreSQL.

The first CI run caught an unmaintained PEM dependency and a telemetry text-scanner false positive on the parser variable name. Both fixes passed locally and are now pushed together, rebased onto current main.

Risk: changing the Rust connection error type and parsing TLS URI options affects every control-plane connection. The production cutover is separate. Rollback: revert this commit before switching DSNs, or revert the cutover first after it ships.

Post-merge ledger

Closed by: agent · session Codex:01a1be1a-66a7-72f3-8e78-32c20c5e0da9 on Mac-28.lan · 2026-11-09T14:32:57.417844+00:00

Last verified: Codex:01a1be1a-66a7-72f3-8e78-32c20c5e0da9 on Mac.lan at 2026-11-09T06:07:24Z; post-merge watch ran from 05:18Z through 2026-11-09T06:07:24Z.

Specific to this change

  • Local gates — 965 backend / 403 e2e / 569 frontend functional passed (139 skipped); real trusted/wrong-hostname/untrusted-CA probes.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

terraform plan

cfff197 · run log and full plans

env add change destroy
state-backend (plan only) 0 0 0
core 0 0 0
dev 0 0 0
prod 0 0 0

Planned with -refresh=false, so this is the config-versus-state diff and
not out-of-band drift. That is a security choice, not a speed one: a refreshing
plan reads secret values, and the plan role is assumable from any PR branch —
which can edit the workflow it runs under. Drift is caught at apply time, which
refreshes fully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support verified PostgreSQL TLS before the production DSN cutover

2 participants