docs: add postgres provisioning + RLS conversation transcription #354

Merged
David merged 1 commit from docs/postgres-security-transcription into main 2026-06-24 20:05:34 +02:00
Owner

What

Adds dev-docs/postgres-security.md: a summarized Q/A transcription of the design conversation on how Mokosh provisions its Postgres roles, installs extensions, and enforces row-level security in dev and prod. Kept in prompt/answer form so the path to the answer (including one wrong turn) is the teaching material, not just the conclusion.

Why

A reference artifact for others. The core lessons it captures: verify load-bearing premises against the real system before designing (the "extensions are untrusted" comment was false and drove a wrong plan); the four extensions are trusted in PG13+; RLS enforcement depends on the app role's attributes, not the migration role's; and there are always three identities (admin bootstrap + migrator + app), because you cannot authenticate as a role to create that same role.

Notes

Documentation only, no code or behavior change. Filed without a YouTrack issue at the requester's direction. Related implementation work is tracked in PMS-489 through PMS-494.

## What Adds `dev-docs/postgres-security.md`: a summarized Q/A transcription of the design conversation on how Mokosh provisions its Postgres roles, installs extensions, and enforces row-level security in dev and prod. Kept in prompt/answer form so the path to the answer (including one wrong turn) is the teaching material, not just the conclusion. ## Why A reference artifact for others. The core lessons it captures: verify load-bearing premises against the real system before designing (the "extensions are untrusted" comment was false and drove a wrong plan); the four extensions are trusted in PG13+; RLS enforcement depends on the app role's attributes, not the migration role's; and there are always three identities (admin bootstrap + migrator + app), because you cannot authenticate as a role to create that same role. ## Notes Documentation only, no code or behavior change. Filed without a YouTrack issue at the requester's direction. Related implementation work is tracked in PMS-489 through PMS-494.
docs: add postgres provisioning + RLS conversation transcription
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 1m17s
Check / fmt + clippy + build + tests (pull_request) Successful in 3m12s
Integration / integration tests (pull_request) Successful in 7m8s
Create release / Create release from merged PR (pull_request) Successful in 3s
46f43581b9
Summarized Q/A transcription of the design conversation on how Mokosh provisions Postgres roles, installs extensions, and enforces RLS in dev and prod. Captures the three-identity provisioning model, the trusted-extension finding verified against the real image, and the load-bearing-premise verification lesson, as a teaching artifact under dev-docs/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
David merged commit 7d24578cee into main 2026-06-24 20:05:34 +02:00
David deleted branch docs/postgres-security-transcription 2026-06-24 20:05:34 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!354
No description provided.