Casbin
Open-source authorization for
applications
applications
A powerful and efficient open-source access control library that supports multiple authorization models
Key Features
Define authorization models using CONF files with PERM metamodel. Easily modify or upgrade access control logic by updating configuration.
Store policies in memory, files, or databases. Supports 20+ backends including MySQL, PostgreSQL, Redis, and cloud storage. See full list of adapters.
Available in Golang, Java, Node.js, Python, .NET, Rust, and more. Consistent API across all implementations.
Lightweight core library with pluggable adapters for policy storage. Supports third-party adapter contributions.
Filtered policy loading for large-scale applications. Load only relevant policies to optimize performance in multi-tenant environments.
Handle RBAC hierarchies and user-role mappings. Load from Casbin policies or external sources like LDAP, Okta, and Azure AD. See all available role managers.
Who's using Casbin?
Hundreds of projects use Casbin, from Fortune 500 companies to new startups. Check out these apps!