Per-module database roles and boot-time statement prepare #2011
Notifications
Due Date
No due date set.
Blocks
Reference: sam/archie#2011
Reference in new issue
Block a user
ARCHITECTURE.md 2.7 gives each module its own schema and a role that holds USAGE and DML on that schema only, with one small pool per role, and each module prepares its statements at boot against the live schema so a statement that reaches another module's tables fails at boot. The first modules land on the single runtime role; this adds the per-module roles (provisioned at boot by the owner, sharing the runtime credential since this is accident prevention, not a security boundary), switches each module to its own pool, and adds the boot prepare.
Done when: each module connects as its own role, a module statement that names another module's table fails at boot, and the total pool size stays below max_connections, checked at boot.