Skip to content

Commit f1a5c48

Browse files
committed
add category pages
1 parent f5c96a6 commit f1a5c48

File tree

33 files changed

+576
-157
lines changed

33 files changed

+576
-157
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2+
"title": "Advanced usage",
23
"pages": [
34
"multi-threading",
45
"benchmark",
56
"performance",
67
"k8s-authz",
78
"k8s-gate-keeper",
89
"envoy-authz"
9-
],
10-
"title": "Advanced Usage"
10+
]
1111
}

content/docs/api/_meta.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
2+
"title": "API",
23
"pages": [
34
"api-overview",
5+
"index-api",
46
"management-api",
57
"rbac-api",
68
"rbac-with-domains-api",
79
"rbac-with-conditions-api",
810
"role-manager-api"
9-
],
10-
"title": "API"
11+
]
1112
}

content/docs/api/index-api.mdx

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
id: overview
3+
title: Overview
4+
description: Casbin Overview
5+
keywords: [overview, supported languages]
6+
authors: [hsluoyz]
7+
---
8+
9+
Casbin is an efficient, open-source access control library designed to enforce authorization through support for multiple [access control models](https://en.wikipedia.org/wiki/Access_control#Access_control_models).
10+
11+
Implementing rule-based access control is straightforward: define subjects, objects, and permitted actions in a **_policy_** file using any format that suits your requirements. This pattern remains consistent throughout all Casbin implementations. Through the **_model_** file, developers and administrators maintain full authority over authorization logic, including layout, execution flow, and conditional requirements. To validate incoming requests against your defined policy and model files, Casbin provides an **_Enforcer_** component.
12+
13+
## Languages Supported by Casbin
14+
15+
Casbin offers native support across multiple programming languages, enabling seamless integration into diverse projects and workflows:
16+
17+
| [![golang](/images/langs/golang.png)](https://github.com/casbin/casbin) | [![java](/images/langs/java.png)](https://github.com/casbin/jcasbin) | [![nodejs](/images/langs/nodejs.png)](https://github.com/casbin/node-casbin) | [![php](/images/langs/php.png)](https://github.com/php-casbin/php-casbin) |
18+
|----------------------------------------------------------------------|-------------------------------------------------------------------|---------------------------------------------------------------------------|------------------------------------------------------------------------|
19+
| [Casbin](https://github.com/casbin/casbin) | [jCasbin](https://github.com/casbin/jcasbin) | [node-Casbin](https://github.com/casbin/node-casbin) | [PHP-Casbin](https://github.com/php-casbin/php-casbin) |
20+
| Production-ready | Production-ready | Production-ready | Production-ready |
21+
22+
| [![python](/images/langs/python.png)](https://github.com/casbin/pycasbin) | [![dotnet](/images/langs/dotnet.png)](https://github.com/casbin/Casbin.NET) | [![c++](/images/langs/cpp.png)](https://github.com/casbin/casbin-cpp) | [![rust](/images/langs/rust.png)](https://github.com/casbin/casbin-rs) |
23+
|------------------------------------------------------------------------|--------------------------------------------------------------------------|--------------------------------------------------------------------|---------------------------------------------------------------------|
24+
| [PyCasbin](https://github.com/casbin/pycasbin) | [Casbin.NET](https://github.com/casbin/Casbin.NET) | [Casbin-CPP](https://github.com/casbin/casbin-cpp) | [Casbin-RS](https://github.com/casbin/casbin-rs) |
25+
| Production-ready | Production-ready | Production-ready | Production-ready |
26+
27+
### Feature Set for Different Languages
28+
29+
Our goal is feature parity across all language implementations, though we haven't achieved complete uniformity yet.
30+
31+
Feature | Go | Java | Node.js | PHP | Python | C# | Delphi | Rust | C++ | Lua | Dart | Elixir
32+
:--- | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--:| :--: | :--: | :--:
33+
Enforcement | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
34+
RBAC | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
35+
ABAC | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
36+
Scaling ABAC (`eval()`) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅
37+
Adapter | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌
38+
Management API | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
39+
RBAC API | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
40+
Batch API | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ❌
41+
Filtered Adapter | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ❌
42+
Watcher | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌
43+
Role Manager | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌
44+
Multi-Threading | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌
45+
'in' of matcher | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ✅ | ✅
46+
47+
**Note** - A checkmark (✅) for Watcher or Role Manager indicates that the interface exists in the core library, not necessarily that an implementation is available.
48+
49+
## What is Casbin?
50+
51+
Casbin serves as an authorization library for scenarios requiring controlled access to resources. In typical usage, a `subject` (user or service) requests access to an `object` (resource or entity) to perform an `action` (such as _read_, _write_, or _delete_). Developers define these actions according to their application needs. This represents the "standard" or classic `{ subject, object, action }` authorization flow that Casbin handles most commonly.
52+
53+
Beyond this standard model, Casbin accommodates complex authorization scenarios by supporting [roles (RBAC)](/docs/rbac), [attributes (ABAC)](/docs/abac), and other advanced patterns.
54+
55+
### What Casbin Does
56+
57+
1. Applies policy enforcement in the classic ``{ subject, object, action }`` format or any custom format you define, supporting both allow and deny authorizations.
58+
2. Manages storage for the access control model and associated policies.
59+
3. Handles user-role and role-role relationships (the role hierarchy concept in RBAC).
60+
4. Recognizes built-in superusers such as ``root`` or ``administrator`` who have unrestricted access without requiring explicit permission rules.
61+
5. Supplies various built-in operators for pattern matching in rules—for instance, ``keyMatch`` matches resource key ``/foo/bar`` to pattern ``/foo*``.
62+
63+
### What Casbin Does **NOT** Do
64+
65+
1. User authentication (validating ``username`` and ``password`` credentials during login)
66+
2. User or role list management
67+
68+
Most applications already manage their own user accounts, roles, and credentials. Casbin wasn't designed as a password storage system—it focuses solely on authorization. That said, Casbin does maintain user-role associations when operating in RBAC mode.

content/docs/api/index.mdx

Lines changed: 0 additions & 19 deletions
This file was deleted.

content/docs/basics/_meta.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

content/docs/editor/_meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"pages": ["online-editor", "ide-plugins"],
3-
"title": "Editor"
2+
"title": "Editor",
3+
"pages": ["online-editor", "ide-plugins"]
44
}

content/docs/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: Overview
44
description: Casbin Overview
55
keywords: [overview, supported languages]
66
authors: [hsluoyz]
7+
icon: BookOpen
78
---
89

910
Casbin is an efficient, open-source access control library designed to enforce authorization through support for multiple [access control models](https://en.wikipedia.org/wiki/Access_control#Access_control_models).

content/docs/management/_meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"pages": ["admin-portal", "service", "command-line-tools", "log-error", "frontend-usage"],
3-
"title": "Management"
2+
"title": "Management",
3+
"pages": ["admin-portal", "service", "command-line-tools", "log-error", "frontend-usage"]
44
}

content/docs/meta.json

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
{
22
"title": "Documentation",
33
"pages": [
4-
"basics",
5-
"model",
6-
"storage",
7-
"scenarios",
8-
"plugins",
9-
"api",
10-
"advanced-usage",
11-
"management",
12-
"editor",
13-
"more"
4+
"---The basics---",
5+
"...the-basics",
6+
"---Model---",
7+
"...model",
8+
"---Storage---",
9+
"...storage",
10+
"---Scenarios---",
11+
"...scenarios",
12+
"---Plugins---",
13+
"...plugins",
14+
"---API---",
15+
"...api",
16+
"---Advanced usage---",
17+
"...advanced-usage",
18+
"---Management---",
19+
"...management",
20+
"---Editor---",
21+
"...editor",
22+
"---More---",
23+
"...more"
1424
]
1525
}

content/docs/model/_meta.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2+
"title": "Model",
23
"pages": [
34
"supported-models",
45
"syntax-for-models",
56
"effector",
67
"function",
7-
"rbac",
88
"rebac",
99
"abac",
1010
"pbac",
11-
"mac",
1211
"orbac",
1312
"priority-model",
1413
"ucon",
15-
"super-admin"
16-
],
17-
"title": "Model"
14+
"super-admin",
15+
"mac",
16+
"rbac"
17+
]
1818
}

0 commit comments

Comments
 (0)