Pluggable authorization layer — user RBAC is too coarse for multi-tenant/delegation scenarios #824
Replies: 3 comments
|
Moving this to a Discussion in Ideas -- per CONTRIBUTING.md, feature requests of this scope (RBAC redesign for multi-tenant) need a Discussion before any PR work, and Discussions are a better home for design conversations than the issue tracker. |
|
A concrete instance of this from the plugin side: every non-public route under |
|
Hi — reviving this one from the practical end rather than the design end. I build and run client sites on EmDash, and the thing that keeps coming up isn't multi-tenancy or delegation. It's much smaller: "our HR person should be able to edit Job Postings, and nothing else." Today the honest answer to a client is either "everyone who can edit can edit everything" or "you get a second EmDash instance." The Zanzibar-shaped version in the original post is the right long-term answer, and I suspect that's also why this thread has been quiet since May — it's a big change and nobody wants to start it casually. So I'd like to put something much smaller on the table, and I'd genuinely like to hear whether the shape is acceptable before writing any code. The idea: one optional
|
Uh oh!
There was an error while loading. Please reload this page.
The current user model (Administrator/Editor/Author/Contributor) works for a single-site blog but won't scale to multi-tenant or permission-delegation use cases.
The plugin capability manifest system is well-designed for plugin authZ. The gap is in user/content authZ — e.g. "user A can edit posts in collection X but not Y", or "user A can delegate draft review to user B".
A Zanzibar-style tuple-based authZ model (subject, relation, object) maps cleanly onto D1 and would complement the existing session layer without replacing the authn design.
Proof of concept: zanzojs feat/better-auth-plugin
Question: is the authZ layer intended to be pluggable, or is the 4-role model a fixed design decision?
All reactions