Casbin
Open-source authorization for applications
A powerful and efficient open-source access control library that supports multiple authorization models
![[object Object]](/img/model.png)
Hybrid-Zugriffssteuerungsmodelle
Casbin uses CONF files to define access control models based on the PERM metamodel (Policy, Effect, Request, Matchers). You can change or upgrade your authorization mechanism by modifying the configuration file.
![[object Object]](/img/storage.png)
Flexibler Richtlinienspeicher
Casbin policies can be stored in memory, files, or databases. We support dozens of storage backends including MySQL, Postgres, Oracle, MongoDB, Redis, Cassandra, and AWS S3. See the full list of adapter.
![[object Object]](/img/language.png)
Sprachen und Plattformen übergreifend
Casbin is implemented in multiple languages including Golang, Java, PHP, Node.js, Python, .NET, Rust, and more. All implementations share the same API and behavior.
Try the Casbin Online Editor
Write and test your Casbin model and policy in real-time with the interactive online editor. Try different access control models and see results instantly.
Dauerhaftigkeit der Richtlinien
Casbin stores policies through adapters. To keep the library lightweight, adapter code is separated from the main library (except for the default file adapter). We support third-party adapter contributions. See the full list of adapter for more information.

Policy Enforcement at Scale
Some adapters support filtered policy loading. This means Casbin can load only a subset of policies from storage based on specified filters. This feature is useful for large-scale, multi-tenant applications where loading all policies at once would be inefficient.Role Manager
The role manager handles RBAC role hierarchy (user-role mappings) in Casbin. It can load role data from Casbin policy rules or from external sources like LDAP, Okta, Auth0, Azure AD, etc. To keep the library lightweight, role manager code is separated from the main library (except for the default one). See all available role-manager.
Wer nutzt Casbin?
Hundreds of projects use Casbin, from Fortune 500 companies to new startups. If you want to see what can be built with Casbin, diese Apps ansehen!



























