📄️ 选择模型
用同一个例子对比 ACL、RBAC、ABAC、ReBAC 和 PBAC:各自依据什么判定、优缺点、什么时候选它,以及如何把 RBAC 和 ABAC 结合使用。
📄️ Supported Models
Casbin 支持的访问控制模型:ACL、RBAC、带域的 RBAC、ABAC、ReBAC、PBAC、BLP、Biba、LBAC、OrBAC、UCON、RESTful、IP 匹配、拒绝优先和优先级。
📄️ Model Syntax
Casbin 模型语法参考:CONF 文件中的请求、策略、角色和效果定义以及匹配器,附运算符和示例。
📄️ Effector
Casbin 的 Effector 接口把所有匹配策略规则的效果合并为一个判定,支持允许优先、拒绝优先、优先级和自定义效果。
📄️ Functions
Casbin 匹配器的内置函数:keyMatch、keyMatch2-5、regexMatch、ipMatch、globMatch 和键提取函数,以及如何注册自己的自定义函数。
🗃️ RBAC
1 item
📄️ ReBAC
What relationship-based access control (ReBAC) is, how it relates to Google Zanzibar, how it differs from RBAC and ABAC, and how to model user-resource relationships in Casbin.
📄️ ABAC
What attribute-based access control (ABAC) is, how it differs from RBAC, and how to write ABAC rules in Casbin: compare user, resource and environment attributes in the matcher or store conditions as policy.
📄️ PBAC
What policy-based access control (PBAC) is, how it differs from ABAC and RBAC, and how to store rule expressions as policy in Casbin and evaluate them at runtime with eval().
🗃️ MAC
1 item
📄️ OrBAC
在 Casbin 中实现基于组织的访问控制(OrBAC):按组织把角色、活动和视图映射到具体的用户、操作和对象。
📄️ Priority Model
用 Casbin 优先级模型解决规则冲突:按策略顺序的隐式优先级、显式优先级字段,以及基于角色层级的优先级。