talira

Compare

CanCanCanPunditApache Casbin
What it isThe authorization Gem for Ruby on RailsMinimal authorization through OO design and pure Ruby classesAn authorization library that supports access control models like ACL, RBAC, ABAC
KindOpen sourceOpen sourceOpen source
Trust0.340.560.76
Stars—851720512
Last commit—2026-10-162026-11-21
LicenceMITMITApache-2.0
PricingFree and open sourceFree and open sourceFree and open source
Free tierYesYesYes
Self-hostableYesYes—
Ways to run it———
SOC 2———
HIPAA———
SSO———
APIYesNo—
Plugins—NoYes
MCP server—No—
Company—VarvetApache Software Foundation
non-profit
Features
  • can and cannot rules in Ability classes, split across files if needed
  • can? and cannot? checks in controllers and views
  • authorize! raising CanCan::AccessDenied
  • accessible_by to fetch authorized records with SQL, with selectable SQL strategies
  • load_and_authorize_resource for RESTful and nested resources
  • hash conditions, block conditions and scopes
  • permitted_attributes and disallowed_attributes
  • action aliases and rules compression
  • All 11 features
  • policy classes per model
  • policy scopes
  • authorize and policy_scope helpers
  • verify_authorized and verify_policy_scoped checks
  • generators
  • 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
Limitations
  • Block conditions can't fetch records: accessible_by raises an exception for a rule defined only by a Ruby block, unless you add SQL