Перейти до основного контенту
NEWSv3.4.1 Released

Casbin
Open-source authorization for  applications

A powerful and efficient open-source access control library that supports multiple authorization models

Use Casbin with Multiple Languages

Golang
Java
C/C++
Node.js
Front-end JavaScript
PHP
Laravel
Python
.NET (C#)
Delphi
Rust
Ruby
Swift (Objective-C)
Lua (OpenResty, Kong, APISIX)
Dart (Flutter)
Elixir
Cloud Native (Kubernetes, Istio, Envoy, KubeSphere)
[object Object]

Гібридні моделі контролю доступу

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]

Гнучке зберігання політик

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]

Міжмовні та міжплатформенні

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 Persistence
Policy enforcement at scale

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

Хто використовує Casbin?

Hundreds of projects use Casbin, from Fortune 500 companies to new startups. If you want to see what can be built with Casbin, ознайомтеся з цими додатками!