Skip to main content

Overview

Casbin is an efficient, open-source access control library that enforces authorization and supports multiple access control models.

Implementing rule-based access control is straightforward: define subjects, objects, and permitted actions in a policy file in any format that fits your needs. This pattern is consistent across all Casbin implementations. The model file gives developers and administrators full control over authorization logic—layout, execution flow, and conditions. The Enforcer component evaluates incoming requests against your model and policy.

Languages Supported by Casbin

Casbin provides native support for multiple programming languages so you can integrate it into a wide range of projects and workflows:

golangjavanodejsphp
CasbinjCasbinnode-CasbinPHP-Casbin
Production-readyProduction-readyProduction-readyProduction-ready
pythondotnetc++rust
PyCasbinCasbin.NETCasbin-CPPCasbin-RS
Production-readyProduction-readyProduction-readyProduction-ready

Feature Set by Language

We aim for feature parity across all language implementations; complete uniformity is not yet achieved.

FeatureGoJavaNode.jsPHPPythonC#DelphiRustC++LuaDartElixir
Enforcement
RBAC
ABAC
Scaling ABAC (eval())
Adapter