# apache/casbin-jcasbin

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

Repository: https://github.com/apache/casbin-jcasbin
Canonical: https://ross.abutalabs.com/products/casbin-jcasbin
Homepage: https://casbin.org
Language: Java
License: Apache-2.0
License Family: permissive
Topics: casbin, java, access-control, authorization, rbac, abac, acl, auth, authz, permission, xacml
Last push: 2026-08-12T03:26:53+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 70, longevity 100
- inputs: {"age_days": 3281, "days_push": 21, "days_rel": 202, "gap_med": 3, "n_releases_24m": 40}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2652, forks 491 (observed 2026-08-28T04:07:07.086664+00:00)

## What it is
jCasbin is an Apache-licensed Java authorization library that enforces access control using models such as ACL, RBAC, and ABAC defined in configuration files. Policies can be stored in files or databases via adapters, and it shares the same API and behavior as other Casbin language implementations.

## Use cases
- enforce role-based access control in a Java application
- implement ACL permissions for API endpoints
- add ABAC attribute-based authorization to a Spring service
- store authorization policies in MySQL or PostgreSQL
- manage RBAC role hierarchies with domains
- switch authorization models without rewriting code

## When to choose
- you need flexible, model-driven authorization in a JVM/Java project
- you want policies persisted in a database via adapters
- you need RBAC, ABAC, or ACL support with a consistent cross-language API
- you want authorization logic configurable via model files rather than hardcoded

## When to avoid
- you need authentication or identity management - Casbin only handles authorization
- you want a full-featured turnkey admin UI for managing permissions
- you need a non-JVM language - use the Casbin implementation for your stack

## Facets
- artifact type: library
- maturity: stable
- function: authorization, auth, security, middleware
- domain: security, backend, developer-tools
- platform: jvm, cross-platform
- tags: rbac, abac, acl, access-control, casbin, policy-enforcement, permissions

## Member repositories
- apache/casbin-jcasbin (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:07.086664+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:18:40.350483+00:00, confidence not recorded.
  - readme: https://github.com/apache/casbin-jcasbin (fetched 2026-08-28T04:07:07.086664+00:00, sha 4da7ff47a585)
  - homepage: https://casbin.org (fetched 2026-08-29T10:01:35.978389+00:00, sha bf9a21b944e9)
  - site_page: https://casbin.apache.org/docs/overview (fetched 2026-08-29T10:01:35.980910+00:00, sha e6df9330fc66)
  - site_page: https://casbin.apache.org/docs/downloads (fetched 2026-08-29T10:01:35.982756+00:00, sha 34577d2c2ff2)
  - site_page: https://casbin.apache.org/docs/get-started (fetched 2026-08-29T10:01:35.984373+00:00, sha 1cef184398ca)
  - site_page: https://casbin.apache.org/docs/category/access-control-models (fetched 2026-08-29T10:01:35.986182+00:00, sha 323b2c9c0a23)
  - site_page: https://casbin.apache.org/docs/category/storage (fetched 2026-08-29T10:01:35.988584+00:00, sha 36570671a14a)
  - site_page: https://casbin.apache.org/docs/adapters (fetched 2026-08-29T10:01:35.990923+00:00, sha cd140120068d)
  - site_page: https://casbin.apache.org/docs/category/api (fetched 2026-08-29T10:01:35.993559+00:00, sha 4099ba1bb75f)
  - site_page: https://casbin.apache.org/docs/ide-plugins (fetched 2026-08-29T10:01:35.995138+00:00, sha 5a9e92f4f45a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
