OneShot

All packsMulti-Tenant Auth & RBAC CoreSolve

postgres force row level security breaks security definer functions neon

FORCE RLS everywhere breaks the functions bootstrap depends on

Turning on FORCE ROW LEVEL SECURITY on every table sounds strictly safer, but it also binds the SECURITY DEFINER functions the app relies on for org creation and invites.

This is one of the things Multi-Tenant Auth & RBAC Core already handles. Sign-in, organisations, invites and roles — with one customer's data provably unable to reach another's.

Buy for $1492 of 3 clean-room builds passed · full refund if it fails on your machine

Is this you?

FORCE ROW LEVEL SECURITY subjects even the table owner to RLS policies -- which sounds like the maximally safe setting to reach for on every table. But this pack's bootstrap operations (creating an org, accepting an invite) run as SECURITY DEFINER functions that rely on the owner's normal RLS exemption to insert the very first membership row before any membership exists. FORCE it everywhere and those functions break on managed Postgres, where the connecting owner typically isn't a superuser either.

Why this one is easy to get wrong

"More restrictive is safer" is a reasonable-sounding default when an agent is asked to harden RLS, and FORCE is the option that reads as the stricter one in Postgres's own documentation -- without visibility into which specific functions in the codebase depend on the owner-exemption behavior FORCE removes, applying it uniformly looks like a pure improvement.

What you get instead

Core decision 9 applies FORCE only to notes (a table no definer function touches) and leaves orgs, org_members, and invites at plain ENABLE, precisely because is_org_member, accept_invite, and the last-owner trigger all run as definer functions relying on that exemption. The posture is enforced three ways rather than left as a convention: a migration creates the non-owner app_user role, the app refuses to boot on an owner connection, and iso-db-posture asserts it in the verify suite.

Source: ARCHITECTURE.md core decision 9 — checkable in the pack you receive

How you actually use this

You don’t install a library or wire up an SDK. Your own coding agent builds the code in your project, and you keep it — no runtime dependency on us.

  1. Step 1

    Download and unzip

    You get a folder: the docs that tell an agent what to build, a starting skeleton, and the test suite that decides when it's done.

  2. Step 2

    Open it in Claude Code or Cursor

    Point your coding agent at the folder. Nothing to install, no account with us, no API key.

  3. Step 3

    Paste one prompt

    The pack contains the exact prompt. Paste it as your first message and leave it alone — it works through the build itself, choosing a cheaper or stronger model per task.

  4. Step 4

    Run ./verify.sh

    One command. It prints a pass or fail for every check. Green means the build is done — the same script we ran to produce the receipt on this page.

Typical build: about 12 minutes of your agent working, mostly unattended. Then you integrate the working module into your app the way you would any code you’d written yourself.

Why you can believe this

2 of 3 runs passed

We ran this pack from an empty folder 3 times and published exactly what happened — every check, the model, the token cost, the wall time. Not a testimonial, and not our opinion: the same verify.sh you run yourself. Read the full receipt →

Buy for $14914-day refund if verify.sh fails →

Related problems