Casbin = way to authorization
A place for Casbin developers and users
已注册用户请  登录
默认主题样式 ✅
Casbin官方博客站  ›  问与答

How many policies is ok from the perspective of performance?

    mehran · 2年前 · 241 次点击 
    这是一个创建于 716 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Let's say we have about 20 million entities stored in our DB(e.g products, orders, Users,...), now we should assign each entity to specific user for permission to edit|read,...
    For example: product with id:23 can edit just by John
    To set policy for this product, I will insert one policy line which say product with Id:23 is for John.
    Now I want to know it's ok to insert many policies for our entities (each policy contains my entitiy id and user or group who can edit it)

    241 次点击  ∙  0 人收藏  
      Tweet Weibo 忽略主题 
    1 条回复   

    "20 million entities stored in our DB(e.g products, orders, Users,...)" I believe most of these rules are by default (share same patterns between tenants/domains)?

    If yes, then you can setup a set of default rules that apply to multiple users/resources. Then add new rules when a user tries to customize it.

    关于   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   0 人在线   最高记录 30   ·     选择语言  ·     选择编辑器
    World is powered by code
    VERSION: 8a9d12d · 23ms · UTC 01:34 · PVG 09:34 · LAX 18:34 · JFK 21:34
    ♥ Do have faith in what you're doing