Ir al contenido principal
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]

Modelos híbridos de control de acceso

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]

Almacenamiento de políticas flexible

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 adaptadores.

[object Object]

Multi-idiomas y multi-plataformas

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.

Persistencia de políticas

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 adaptadores 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 gestores de roles.
Role manager

¿Quién está usando Casbin?

Hundreds of projects use Casbin, from Fortune 500 companies to new startups. If you want to see what can be built with Casbin, echa un vistazo a estas aplicaciones!