# Apache Casbin

> An authorization library that supports access control models like ACL, RBAC, ABAC

Source: https://talira.ai/catalog/apache-casbin-q0j8c46t
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [security / auth / authorization](https://talira.ai/categories/security/auth/authorization)
- Licence: Apache-2.0[^1][^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Plugins: yes[^1]
- Backed by: [Apache Software Foundation](https://talira.ai/orgs/apache-software-foundation.md)
- Funding: non-profit[^3]

Casbin is an access control library that enforces authorization policies in your application, with implementations in Go, Java, Node.js, Python, PHP, .NET, Rust, C++, Lua and more that share the same API and behaviour. Access control models (ACL, RBAC, ABAC and variants) are written as configuration files on its PERM metamodel (policy, effect, request, matchers), so a model can change without rewriting code. Policies live in memory, files or databases through adapters for MySQL, Postgres, Oracle, MongoDB, Redis, Cassandra, S3 and others, with filtered loading for large multi-tenant systems, and role managers can read roles from LDAP, Okta, Auth0 or Azure AD. It's Apache-2.0 licensed and an Apache Software Foundation incubating project; its site lists AWS, Intel, NVIDIA, Docker and Cisco among users.

## Links

- Website: https://casbin.apache.org/
- GitHub: https://github.com/casbin/casbin
- Docs: https://casbin.apache.org/docs/overview/

## Problems it solves

- add role-based access control to my Go API without writing permission checks everywhere
- enforce the same authorization rules across services written in different languages
- change our permission model from roles to attributes without rewriting the code
- store authorization policies in Postgres and change them at runtime
- check whether a user can perform an action on a resource with one function call
- multi-tenant permissions where each customer defines its own roles
- pull users' roles from LDAP or Okta into our app's permission checks
- protect REST endpoints by path and HTTP method with a policy file

## Features

- ACL, RBAC and ABAC models
- models as CONF files on the PERM metamodel
- implementations in Go, Java, Node.js, front-end JavaScript, Python, PHP, .NET, Rust, C++, Ruby, Swift, Lua, Dart, Elixir and Delphi
- same API and behaviour across implementations
- policy adapters for files, MySQL, Postgres, Oracle, MongoDB, Redis, Cassandra and S3
- filtered policy loading for multi-tenant systems
- role managers backed by LDAP, Okta, Auth0 or Azure AD
- integrations for Kubernetes, Istio, Envoy, OpenResty, Kong and APISIX

## Capabilities

- Takes plugins: plan not known
- Has official SDKs: plan not known

## Trust

Overall: 0.50 out of 1.
Signals: backing 0.75, extensibility 0.20.

- backed by Apache Software Foundation
- funding: non-profit
- used by AWS, Intel, NVIDIA, Docker
- has a plugin system

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [Cerbos](https://talira.ai/catalog/cerbos-830ttkxr.md): Authorize every identity. Govern every action.
- [OpenFGA](https://talira.ai/catalog/openfga-72p8a9hd.md): Fine-grained authorization
- [Open Policy Agent](https://talira.ai/catalog/open-policy-agent-rerf6ac8.md): An open source, general-purpose policy engine that unifies policy enforcement across the stack
- [Pundit](https://talira.ai/catalog/pundit-sdyy04t7.md): Minimal authorization through OO design and pure Ruby classes
- [CanCanCan](https://talira.ai/catalog/cancancan-fdzdzsq8.md): The authorization Gem for Ruby on Rails
- [SpiceDB](https://talira.ai/catalog/spicedb-zzj7ehpm.md): Open-source, Google Zanzibar-inspired database for fine-grained authorization

## Sources

[^1]: https://casbin.apache.org/ (checked 22 Nov 2026)
[^2]: https://github.com/casbin/casbin/blob/master/LICENSE (checked 22 Nov 2026)
[^3]: https://www.apache.org/foundation/ (checked 20 Nov 2026)
