What's new
- Group roles of your own. Create a group role for your project with
POST /api/projects/:id/db-extra-rolesand{ "label": "Authz", "kind": "group" }. The platform names itkb_xg_<hex>. A group role cannot log in, is never a superuser and never bypasses row-level security. You can create up to ten per project. - Least-privilege security-definer functions. Hand a
SECURITY DEFINERfunction to a group role, and give that group a row-level security policy on the tables it reads. The function can then read aFORCE ROW LEVEL SECURITYtable with exactly the group's rights. You no longer need the project owner's orservice_role's rights for it. Your project's owner role can hand functions over to its groups and grant to them, but does not use their rights unless it switches to them on purpose. - Login roles can join groups. List a group in an extra login role's
memberOf, for example["authenticated", "kb_xg_…"]. The login role then has the group's grants, as with an ordinary Postgres group. - Removing a group keeps your objects. Everything the group owns goes back to the project owner first, then its grants are revoked. Nothing your project created is deleted.
The project admin API reference shows a full example, including the schema to keep such functions in.