Lewati ke konten utama

RBAC Overview

Overview

Role-Based Access Control (RBAC) grants permissions to users based on organizational roles. Casbin implements RBAC with flexibility and power.

RBAC Features in Casbin

Casbin provides comprehensive RBAC support with advanced features:

  • Basic RBAC: Define role hierarchies and user-role assignments
  • RBAC with Pattern: Use pattern matching for flexible role assignments
  • RBAC with Domains: Implement multi-tenancy with domain-specific roles
  • RBAC with Conditions: Add conditional logic to role-based permissions
  • RBAC96 Compliance: Compare Casbin RBAC implementation with the NIST RBAC96 standard

Getting Started

Implement RBAC in Casbin by:

  1. Defining role hierarchy in the model configuration
  2. Assigning users to roles through policies
  3. Using the RBAC API to manage roles and permissions

Browse the subsections in this category to learn about each RBAC feature and implementation approach.