Per-module database roles and boot-time statement prepare #2011

Open
opened 2026-11-15 06:07:02 +00:00 by sam · 0 comments
Owner

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.

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.
sam added the mediumtask labels 2026-11-15 06:07:02 +00:00
sam added a new dependency 2026-11-15 06:07:07 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#2011