Casbin
An authorization library that supports access control models like ACL, RBAC, ABAC, ReBAC, BLP, Biba, LBAC, UCON, Priority, RESTful for Golang, Java, C/C++, Node.js, Javascript, PHP, Laravel, Python, .NET (C#), Delphi, Rust, Ruby, Swift (Objective-C), Lua (OpenResty), Dart (Flutter) and Elixir
![[object Object]](/img/model.png)
ハイブリッドアクセス制御モデル
Casbin abstracts access control models into CONF files based on the PERM metamodel (Policy, Effect, Request, Matchers). Switching or upgrading your project's authorization mechanism is as simple as modifying a configuration file.
![[object Object]](/img/storage.png)
柔軟なポリシーストレージ
Casbin policies can be stored in memory, files, or numerous databases. We currently support dozens of storage backends including MySQL, Postgres, Oracle, MongoDB, Redis, Cassandra, and AWS S3. View the complete list of supported アダプター.
![[object Object]](/img/language.png)
クロスランゲージ&クロスプラットフォーム
Casbin is available in multiple programming languages including Golang, Java, PHP, Node.js, Python, .NET, Rust, and more. All implementations share a consistent API and behavior, allowing you to learn once and use everywhere.
Try Casbin Online Editor
Write and test your Casbin model and policy in real-time with our interactive online editor. Experiment with different access control models and see results instantly.
政策の永続性
Casbin implements policy storage through adapters (middleware components). To maintain a lightweight core, adapter code is not included in the main library (except for the default file adapter). We welcome third-party adapter contributions. For a complete list of available adapters and detailed documentation, please refer to: アダプター.

Policy Enforcement at Scale
Some adapters support filtered policy management, meaning Casbin loads only a subset of policies from storage based on specified filters. This enables efficient policy enforcement in large, multi-tenant environments where loading the entire policy set would create a performance bottleneck.Role Manager
The role manager handles RBAC role hierarchies (user-role mappings) in Casbin. It can retrieve role data from Casbin policy rules or external sources such as LDAP, Okta, Auth0, Azure AD, and others. We support multiple role manager implementations. To maintain a lightweight core, role manager code is not included in the main library (except for the default implementation). View the complete list of available ロールマネージャー.
誰がCasbinを使用していますか?
Hundreds of projects use Casbin, from established Fortune 500 companies to innovative startups. If you're curious to see what can be accomplished with Casbin, これらのアプリをチェックしてください!



















