rowstile
v0.1.0-beta.5Check, test, prove and review a rowstile policy: access rules for Postgres row-level security
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
check rowstile check
Compile the policy without a database and report its first mistake, with the file, line and code.
| Parameter | Type | Description |
|---|---|---|
policy | string | the policy file (default: rowstile.toml's `policy`) |
prove rowstile prove
Check every invariant of the policy in many small worlds (no database): the smallest counterexample, or that none was found.
| Parameter | Type | Description |
|---|---|---|
policy | string | the policy file (default: rowstile.toml's `policy`) |
worlds | integer | how many worlds to try (default 400) |
review rowstile review
What the policy change since a git ref does: meaning, access, risk, tests and deploy (the pull request comment, as markdown). Needs git.
| Parameter | Type | Description |
|---|---|---|
base | string | the ref to compare with (default: main) |
policy | string | the policy file (default: rowstile.toml's `policy`) |
test rowstile test
Run the policy's tests, the test files rowstile.toml names (or these), and the invariants, on the database; nothing stays. With coverage, the branches of each permission no test makes true.
| Parameter | Type | Description |
|---|---|---|
coverage | boolean | |
files | array | test files (default: rowstile.toml's `tests`) |
why rowstile why
Whether someone holds a permission on an object, and why; if not, why not, and the smallest changes to the data that would grant it (each tried on the database and undone).
| Parameter | Type | Description |
|---|---|---|
as * | string | who asks: user:42, bot:7 (a principal type and id), or anyone |
id * | string | |
perm * | string | a permission of the type, e.g. view |
type * | string | the policy's type, e.g. folder |
lint rowstile lint
The ways around row-level security the database leaves open (authz.lint()): the app role owning a table, bypassing RLS, tables without rules, grants on masked columns, ...
push rowstile push
Bring the development database to the policy, with the migration production would get. Only a database marked as a development database (a person marks one with rowstile push --development; the first push to one with no policy marks it): production takes migrations (rowstile migrate).
| Parameter | Type | Description |
|---|---|---|
policy | string | the policy file (default: rowstile.toml's `policy`) |