Casbin
Open-source authorization for applications
A powerful and efficient open-source access control library that supports multiple authorization models
![[object Object]](/https/www.casbin.org/img/model.png)
Модели контроля гибридного доступа
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]](/https/www.casbin.org/img/storage.png)
Гибкое хранение политики
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 адаптеры.
![[object Object]](/https/www.casbin.org/img/language.png)
Межязыковые и кросс-платформенные
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.
Сохранение политики
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 адаптеры 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 ролевые менеджеры.
Кто использует Casbin?
Hundreds of projects use Casbin, from Fortune 500 companies to new startups. If you want to see what can be built with Casbin, проверить эти приложения!



























