Relationship based access control for Postgres. Contribute to paulharter/letter development by creating an account on GitHub.

2 points•paulharter•7 days ago•3 comments•

3 comments

paulharter7 days ago
Hi HN,

This extension provides relationship-based access control (ReBAC) for PostgreSQL.

It's a rewrite of the DDLX permissions system I wrote while working at ElectricSQL, but just for internal use in Postgres rather than for a distributed sync system.

It lets you model the kind of permissions you need for complex multi-tenant applications directly inside the DB.

This extension is still just a beta and not production ready, it needs bunch more testing so don't use it with anything important yet.

esafak7 days ago
I'd run some benchmarks to see how well it scales with the number of users and rules.
paulharter7 days ago
I've done some very basic ones and it seems not bad - https://github.com/paulharter/letter/blob/main/bench/walker/... The queries to look up the scope per row are the most expensive and they are made by the planner and cached so at run time they are pretty quick. I need to do some decent full benchmarks and put them in the repo.

Read the full thread on Hacker News →

Related stories