NEW RasterizedDB 1.1.0 is out: sharding and the gateway, the message broker, roles and row-level security, compression, .NET on NuGet, and the enterprise edition. What's new ›
ROLE SYSTEM NEW IN 1.1.0

PostgreSQL's privileges, down to the row.

Roles, grants, column privileges and row-level security with PostgreSQL's syntax and meaning, behind every protocol, in an engine-owned catalogue that no SQL can read or write.

1 / 3

Roles and grants

  • GRANT and REVOKE on tables, columns, sequences, functions, types, domains and the database
  • WITH GRANT OPTION, CASCADE and RESTRICT
  • SET ROLE, SET SESSION AUTHORIZATION, current_user and session_user
  • SECURITY DEFINER and INVOKER functions
SQL
CREATE ROLE support LOGIN PASSWORD 'secret';
GRANT SELECT (id, name, email) ON customers TO support;
GRANT reporting TO alice WITH INHERIT TRUE;
ALTER DEFAULT PRIVILEGES GRANT SELECT ON TABLES TO reporting;
REASSIGN OWNED BY bob TO alice;  DROP OWNED BY bob;
2 / 3

Row-level security

  • CREATE, ALTER and DROP POLICY; ENABLE, DISABLE and FORCE ROW LEVEL SECURITY; BYPASSRLS
  • Applied wherever a table appears: CTEs, MERGE, INSERT … SELECT, UPDATE … FROM, subqueries
SQL
ALTER TABLE orders ENABLE ROW LEVEL SECURITY;
CREATE POLICY own_orders ON orders
  USING (owner = current_user);
3 / 3

Every protocol, one model

Checked once, where an object is resolved, from an in-memory snapshot of the ACL, so a point read pays almost nothing for it. The security core is always built; it cannot be compiled out.

  • MySQL's CREATE USER and GRANT, and SHOW GRANTS read from the real ACL
  • T-SQL's CREATE LOGIN, CREATE USER and GRANT
  • A role is known on every shard of a cluster
  • rdb_studio's Roles tab, and a typed admin API in the Rust client
✓ page rendered in 82 µs axum + tera + htmx · no other javascript