web-arm: replace powersync pg_hba trust rule with scram password (ADR-0012 follow-up) #336
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos#336
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
hosts/web-arm/modules/powersync/default.nix authenticates the powersync container to host PG14 with a passwordless trust rule scoped to db+role+subnet:
The module itself documents the condition for hardening: 'a generated-password + scram rule is the documented hardening follow-up (ADR-0012) should a second container ever join v6egress.' The planned central OneCLI deployment on web-arm is that second container, so the condition is now met: any container on the v6egress bridge can currently obtain full read/write on powersync's bucket-storage DB without credentials.
Fix per the documented follow-up:
Blast radius today is powersync's DB only (the rule matches exactly that db+role pair; other DBs fall through to defaults and are refused), so this is hardening, not an active incident.