Supported Models
Casbin supports the following access control models and patterns:
- ACL (ì ê·¼ ì ì´ ëª©ë¡)
- ìí¼ì ì ê° ìë ACL
- ACL without users â For systems without authentication or user identity (e.g. API-only or device access).
- ACL without resources â When permissions apply to resource types rather than specific instances (e.g. "write-article", "read-log").
- RBAC (Role-Based Access Control)
- RBAC with resource roles â Both users and resources can have roles (or group memberships).
- RBAC with domains/tenants â Users can have different roles in different domains or tenants.
- ABAC (Attribute-Based Access Control) â Uses attributes (e.g.
resource.Owner) in rules. - PBAC (Policy-Based Access Control) â Authorization is driven by rule-based policies for dynamic, context-aware decisions.
- BLP (BellâLaPadula) â Formal model with security labels and clearances.
- Biba â Integrity model that restricts information flow to prevent unauthorized changes.
- LBAC (Lattice-Based Access Control) â Combines confidentiality and integrity in a lattice-based framework.
- OrBAC (Organisation-Based Access Control) â RBAC extended with abstraction layers for multi-organization policies.
- UCON (Usage Control) â Covers ongoing authorization, mutable attributes, obligations, and conditions.
- RESTful â Path patterns (e.g.
/res/*,/res/:id) and HTTP methods (GET, POST, PUT, DELETE). - IP Match â Match by IP address or CIDR for network-level control.
- Deny-override â Both allow and deny policies; deny overrides allow.
- Priority â Policy rules are ordered (e.g. like firewall rules); first match wins.