Skip to content

P1: DB-level RLS backstop (non-owner role, FORCE RLS, per-request scope) #8

Description

@gnanirahulnutakki

Phase 1 — the DB-level backstop. Implement PostgreSQL RLS that is actually enforced, independent of application code (the predecessor advertised RLS but it was inert).

Tasks

  • App connects as a non-owner DB role
  • ENABLE and FORCE ROW LEVEL SECURITY on every workspace-scoped table
  • Set current workspace per request inside the transaction (set_config('sith.workspace_id', …, true)); policies check it
  • CI guard forbidding un-scoped access to workspace-scoped tables

Acceptance

  • A deliberately app-layer-bypassed cross-workspace query is denied at the DB layer.

Refs: ADR-0003.

Metadata

Metadata

Assignees

No one assigned

    Labels

    governancePDP / audit / decision-ledger / tenancyphase-1Phase 1: read-only federationsecuritySecurity hardening / isolation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions