Casbin Forum runs on Casnode, the open-source Discourse-style forum. Try the Casnode demo →
Casbin Forum
F

I was asking for clarification around how to reconcile this contradiction:

  1. Docs say to write one record per-user-per-object-per-permission.
  2. Docs say that a well-written policy reduces the number of rules to < 100.

How would you recommend that developers implement this? Is there some prior work on GitHub, for example, that we could look to for an example?

F

Hi all. I wanted to ask a quick question regarding performance and scaling of Casbin. Online, it seems like the recommendation is for users to keep Casbin's policy table in the range of a few hundred rows. This seems at odds with enterprise applications where policy tables could reach millions of rows easily, and also at odds with Casbin's examples which demonstrate simple bindings per-user-per-object:

p, alice, data1, read
p, bob, data2, write

A well-written model and policy abstracts out the duplicated logic for each user/tenant and reduces the number of rules to a very small level (< 100).

https://casbin.org/docs/performance/

In a sufficiently complex system, how would you recommend that developers implement this? Is there some prior work on GitHub, for example, that we could look to for an example?

Thank you!!