Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Crowdin updates #4

Open
wants to merge 62 commits into
base: l10n_master2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
1c8dda3
New translations ABAC.md (French)
VBeytok Nov 18, 2021
198adbb
New translations PolicySubsetLoading.md (Ukrainian)
VBeytok Nov 18, 2021
8c8852e
New translations OnlineEditor.md (French)
VBeytok Nov 18, 2021
16ec51c
New translations OnlineEditor.md (Ukrainian)
VBeytok Nov 18, 2021
057dc87
New translations Overview.md (French)
VBeytok Nov 18, 2021
c979854
New translations Overview.md (Ukrainian)
VBeytok Nov 18, 2021
9293a87
New translations Performance.md (French)
VBeytok Nov 18, 2021
0d93c9f
New translations Performance.md (Ukrainian)
VBeytok Nov 18, 2021
b1fcb92
New translations PolicyStorage.md (French)
VBeytok Nov 18, 2021
38c29e4
New translations PolicyStorage.md (Ukrainian)
VBeytok Nov 18, 2021
f2b8d65
New translations PolicySubsetLoading.md (French)
VBeytok Nov 18, 2021
14fe3f9
New translations PrivacyPolicy.md (French)
VBeytok Nov 18, 2021
e2fd3dc
New translations MultiThreading.md (French)
VBeytok Nov 18, 2021
e3a63cb
New translations PrivacyPolicy.md (Ukrainian)
VBeytok Nov 18, 2021
37b0635
New translations RBAC.md (French)
VBeytok Nov 18, 2021
a67b63b
New translations RBAC.md (Ukrainian)
VBeytok Nov 18, 2021
b4cdee8
New translations RBACAPI.md (French)
VBeytok Nov 18, 2021
746d526
New translations RBACAPI.md (Ukrainian)
VBeytok Nov 18, 2021
0ffeb3e
New translations RBACWithDomains.md (French)
VBeytok Nov 18, 2021
4ee68af
New translations RBACWithDomains.md (Ukrainian)
VBeytok Nov 18, 2021
890121e
New translations RoleManagers.md (French)
VBeytok Nov 18, 2021
0c146c3
New translations RoleManagers.md (Ukrainian)
VBeytok Nov 18, 2021
881e087
New translations Service.md (French)
VBeytok Nov 18, 2021
1af7af4
New translations MultiThreading.md (Ukrainian)
VBeytok Nov 18, 2021
bc4786b
New translations ModelStorage.md (Ukrainian)
VBeytok Nov 18, 2021
8b4dbc0
New translations ABAC.md (Ukrainian)
VBeytok Nov 18, 2021
35aad5f
New translations Function.md (French)
VBeytok Nov 18, 2021
f2792e1
New translations Adapters.md (French)
VBeytok Nov 18, 2021
c34eccc
New translations Adapters.md (Ukrainian)
VBeytok Nov 18, 2021
fffbe71
New translations AdminPortal.md (French)
VBeytok Nov 18, 2021
1581de2
New translations AdminPortal.md (Ukrainian)
VBeytok Nov 18, 2021
4d27275
New translations Adopters.md (French)
VBeytok Nov 18, 2021
30fa7dd
New translations Adopters.md (Ukrainian)
VBeytok Nov 18, 2021
1592c91
New translations Benchmark.md (French)
VBeytok Nov 18, 2021
9c0c05c
New translations Benchmark.md (Ukrainian)
VBeytok Nov 18, 2021
eb1b34b
New translations Dispatchers.md (French)
VBeytok Nov 18, 2021
2b78dde
New translations Dispatchers.md (Ukrainian)
VBeytok Nov 18, 2021
1cfe2aa
New translations Function.md (Ukrainian)
VBeytok Nov 18, 2021
cb958f0
New translations ModelStorage.md (French)
VBeytok Nov 18, 2021
c25cf20
New translations GetStarted.md (French)
VBeytok Nov 18, 2021
e886522
New translations GetStarted.md (Ukrainian)
VBeytok Nov 18, 2021
ffe0501
New translations HowItWorks.md (French)
VBeytok Nov 18, 2021
c522123
New translations HowItWorks.md (Ukrainian)
VBeytok Nov 18, 2021
6712fcc
New translations LogError.md (French)
VBeytok Nov 18, 2021
ddbf0a7
New translations LogError.md (Ukrainian)
VBeytok Nov 18, 2021
d9fae65
New translations ManagementAPI.md (French)
VBeytok Nov 18, 2021
886d18f
New translations ManagementAPI.md (Ukrainian)
VBeytok Nov 18, 2021
ffed9e9
New translations Middlewares.md (French)
VBeytok Nov 18, 2021
db483d4
New translations Middlewares.md (Ukrainian)
VBeytok Nov 18, 2021
48407ae
New translations Service.md (Ukrainian)
VBeytok Nov 18, 2021
7a074fa
New translations SupportedModels.md (French)
VBeytok Nov 18, 2021
f2a2b6b
New translations SupportedModels.md (Ukrainian)
VBeytok Nov 18, 2021
c63a473
New translations SyntaxForModels.md (French)
VBeytok Nov 18, 2021
e9454ea
New translations SyntaxForModels.md (Ukrainian)
VBeytok Nov 18, 2021
483e5ea
New translations TermsOfService.md (French)
VBeytok Nov 18, 2021
8f946fa
New translations TermsOfService.md (Ukrainian)
VBeytok Nov 18, 2021
487012b
New translations Tutorial.md (French)
VBeytok Nov 18, 2021
44a7a62
New translations Tutorial.md (Ukrainian)
VBeytok Nov 18, 2021
fb6afd8
New translations Watchers.md (French)
VBeytok Nov 18, 2021
5dd5ee6
New translations Watchers.md (Ukrainian)
VBeytok Nov 18, 2021
67d6e08
New translations WebpageController.md (French)
VBeytok Nov 18, 2021
f33d1c1
New translations WebpageController.md (Ukrainian)
VBeytok Nov 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions website/translated_docs/fr-FR/ABAC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
id: abac
title: ABAC
---

## What is the ABAC model actually?

ABAC is `Attribute-Based Access Control`, meaning you can use the attributes (properties) of the subject, object or action instead of themselves (the string) to control the access. You may already hear of a complicated ABAC access control language named XACML. Compared to XACML, Casbin's ABAC is very simple: in ABAC, you can use structs (or class instances based on the programming language) instead of string for model elements.

Use the official ABAC example for example:

```ini
[request_definition]
r = sub, obj, act

[policy_definition]
p = sub, obj, act

[policy_effect]
e = some(where (p.eft == allow))

[matchers]
m = r.sub == r.obj.Owner
```

We use `r.obj.Owner` instead of `r.obj` in the matcher. The `r.obj` passed in the `Enforce()` function will be a struct or class instance instead of string. Casbin will use reflection to retrieve the `obj` member variable in that struct or class for you.

Here is a definition for the `r.obj` struct or class:

```go
type testResource struct {
Name string
Owner string
}
```

## How to use ABAC?

Simply speaking, to use ABAC, you need to do two things:

1. Specify the attributes in the model matcher.
2. Pass in the struct or class instance for the element as the argument in Casbin's `Enforce()` function.

:::warning Currently, only request elements like `r.sub`, `r.obj`, `r.act` and so on support ABAC. You cannot use it on policy elements like `p.sub`, because there is no way to define a struct or class in Casbin's policy. :::

:::tip You can use multiple ABAC attributes in a matcher, for example: `m = r.sub.Domain == r.obj.Domain`. :::

## Scaling the model for complex and large number of ABAC rules.

The above instance of ABAC implementation is at its core very simple, but oftentimes the authorization system needs a very complex and large number of ABAC rules. To fit this necessity the above implementation will increase the verbosity of the model to a large extent. So, it’s wise to add the rules in the policy instead of in the model. This is done by introducing a `eval()` functional construct. Below is the example instance to manage such ABAC models.

This is the definition of the `CONF` file used for defining the ABAC model.

```ini
[request_definition]
r = sub, obj, act

[policy_definition]
p = sub_rule, obj, act

[policy_effect]
e = some(where (p.eft == allow))

[matchers]
m = eval(p.sub_rule) && r.obj == p.obj && r.act == p.act
```

Here, `p.sub_rule` is of type struct or class(user-defined type) which consists of necessary attributes to be used in the policy.

This is the policy that is used against the model for `Enforcement`. Now, you can use the object instance which is passed to `eval()` as a parameter to define certain ABAC constraints.

```
p, r.sub.Age > 18, /data1, read
p, r.sub.Age < 60, /data2, write
```
321 changes: 321 additions & 0 deletions website/translated_docs/fr-FR/Adapters.md

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions website/translated_docs/fr-FR/AdminPortal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
id: admin-portal
title: Admin Portal
---

We provide a [web-based portal called Casdoor](https://github.com/casbin/casdoor) for model management and policy management:

![model editor](https://hsluoyz.github.io/casbin/ui_model_editor.png)

![policy editor](https://hsluoyz.github.io/casbin/ui_policy_editor.png)

There are also 3rd-party admin portal projects that use Casbin as authorization engine. You can get started to build your own Casbin service based on these projects.

<!--DOCUSAURUS_CODE_TABS-->

<!--Go-->
| Project | Author | Frontend | Backend | Description |
| ---------------------------------------------------------- | -------------------------------------------- | ------------------ | ------- | ---------------------------------------------------------------- |
| [Casdoor](https://github.com/casbin/casdoor) | Casbin | React + Ant Design | Beego | Based on Beego + XORM + React |
| [gin-vue-admin](https://github.com/piexlmax/gin-vue-admin) | [@piexlmax](https://github.com/piexlmax) | Vue + Element UI | Gin | Based on Gin + GORM + Vue |
| [gin-admin](https://github.com/LyricTian/gin-admin) | [@LyricTian](https://github.com/LyricTian) | React + Ant Design | Gin | RBAC scaffolding based on Gin + GORM + Casbin + Ant Design React |
| [go-admin](https://github.com/hequan2017/go-admin) | [@hequan2017](https://github.com/hequan2017) | None | Gin | Go RESTful API gateway based on Gin + GORM + JWT + RBAC (Casbin) |
| [zeus-admin](https://github.com/bullteam/zeus-admin) | [bullteam](https://github.com/bullteam) | Vue + Element UI | Gin | Unified Permission management platform based on JWT + Casbin |
| [IrisAdminApi](https://github.com/snowlyg/IrisAdminApi) | [@snowlyg](https://github.com/snowlyg) | Vue + Element UI | Iris | Backend API based on Iris + Casbin |

<!--Node.js-->
| Project | Author | Frontend | Backend | Description |
| ---------------------------------------------------------------------------------------------- | -------------------------------------------- | ------------------- | ------- | ------------------------------------------------------------------------------------------------- |
| [Casbin-Role-Mgt-Dashboard-RBAC](https://github.com/alikhan866/Casbin-Role-Mgt-Dashboard-RBAC) | [@alikhan866](https://github.com/alikhan866) | React + Material UI | Express | Beginner friendly RBAC management with Enforcer integration to check enforcement result on the go |

<!--Python-->
| Project | Author | Frontend | Backend | Description |
| ---------------------------------------------------------------------------- | ------ | --------- | ------- | --------------------- |
| [openstack-policy-editor](https://github.com/casbin/openstack-policy-editor) | Casbin | Bootstrap | Django | The Web UI for Casbin |

<!--PHP-->
| Project | Author | Frontend | Backend | Description |
| -------------------------------------------- | ---------------------------------------- | -------- | -------- | ------------------------------------------------------ |
| [Tadmin](https://github.com/techoner/tadmin) | [@techoner](https://github.com/techoner) | AmazeUI | ThinkPHP | Non-intrusive backend framework based on ThinkPHP 5.1+ |

<!--END_DOCUSAURUS_CODE_TABS-->
50 changes: 50 additions & 0 deletions website/translated_docs/fr-FR/Adopters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
id: adopters
title: Our Adopters
---

## Direct integration

<!--DOCUSAURUS_CODE_TABS-->

<!--Go-->
| Name | Description | Model | Policy |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [VMware Harbor](https://github.com/goharbor/harbor) | VMware's open source trusted cloud native registry project that stores, signs, and scans content. | [Code](https://github.com/goharbor/harbor/blob/master/src/pkg/permission/evaluator/rbac/casbin.go#L24-L44) | [Beego ORM](https://github.com/goharbor/harbor/blob/master/src/replication/dao/policy.go#L24-L26) |
| [Intel RMD](https://github.com/intel/rmd) | Intel's resource management daemon. | [.conf](https://github.com/intel/rmd/blob/master/etc/rmd/acl/url/model.conf) | [.csv](https://github.com/intel/rmd/blob/master/etc/rmd/acl/url/policy.csv) |
| [VMware Dispatch](https://github.com/vmware/dispatch) | A framework for deploying and managing serverless style applications. | [Code](https://github.com/vmware/dispatch/blob/master/pkg/identity-manager/handlers.go#L46-L55) | [Code](https://github.com/vmware/dispatch/blob/master/pkg/identity-manager/handlers_test.go#L35-L45) |
| [Skydive](https://github.com/skydive-project/skydive) | An open source real-time network topology and protocols analyzer. | [Code](https://github.com/skydive-project/skydive/blob/master/config/config.go#L136-L140) | [.csv](https://github.com/skydive-project/skydive/blob/master/rbac/policy.csv) |
| [Zenpress](https://github.com/insionng/zenpress) | A CMS system written in Golang. | [.conf](https://github.com/insionng/zenpress/blob/master/content/config/rbac_model.conf) | [Gorm](https://github.com/insionng/zenpress/blob/master/model/user.go#L53-L77) |
| [Argo CD](https://github.com/argoproj/argo-cd) | GitOps continuous delivery for Kubernetes. | [.conf](https://github.com/argoproj/argo-cd/blob/master/util/rbac/model.conf) | [.csv](https://github.com/argoproj/argo-cd/blob/master/util/rbac/builtin-policy.csv) |
| [Muxi Cloud](https://github.com/muxiyun/Mae) | PaaS of Muxi Cloud, an easier way to manage Kubernetes cluster. | [.conf](https://github.com/muxiyun/Mae/blob/master/conf/casbinmodel.conf) | [Code](https://github.com/muxiyun/Mae/blob/master/pkg/casbin/initPolicy.go#L21-L95) |
| [EngineerCMS](https://github.com/3xxx/EngineerCMS) | A CMS to manage knowledge for engineers. | [.conf](https://github.com/3xxx/EngineerCMS/blob/master/conf/rbac_model.conf) | [SQLite](https://github.com/3xxx/EngineerCMS/blob/master/database/engineer.db) |
| [Cyber Auth API](https://github.com/CyberlifeCN/cyber-auth-api) | A Golang authentication API project. | [.conf](https://github.com/CyberlifeCN/cyber-auth-api/blob/master/conf/authz_model.conf) | [.csv](https://github.com/CyberlifeCN/cyber-auth-api/blob/master/conf/authz_policy.csv) |
| [IRIS Community](https://github.com/irisnet/iris-community) | Website for IRIS Community Activities. | [.conf](https://github.com/irisnet/iris-community/blob/master/authz/authz_model.conf) | [.csv](https://github.com/irisnet/iris-community/blob/master/authz/authz_policy.csv) |
| [Metadata DB](https://github.com/Bnei-Baruch/mdb) | BB archive metadata database. | [.conf](https://github.com/Bnei-Baruch/mdb/blob/master/data/permissions_model.conf) | [.csv](https://github.com/Bnei-Baruch/mdb/blob/master/data/permissions_policy.csv) |
| [Qilin API](https://github.com/ProtocolONE/qilin.api) | ProtocolONE's licenses managemen tool for game content. | [Code](https://github.com/ProtocolONE/rbac/blob/master/model.go) | [.csv](https://github.com/ProtocolONE/rbac/tree/master/conf) |
| [Devtron Labs](https://github.com/devtron-labs/devtron) | Software Delivery Workflow For Kubernetes. | [.conf](https://github.com/devtron-labs/devtron/blob/main/auth_model.conf) | [Xorm](https://github.com/devtron-labs/devtron/blob/main/internal/casbin/Adapter.go) |

<!--Java-->
| Name | Description | Model | Policy |
| ---------------------------------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
| [lighty.io](https://github.com/PantheonTechnologies/lighty-core) | OpenDaylight's solution for SDN controller. | [README](https://github.com/PantheonTechnologies/lighty-core/blob/6f2ceaae6a68e08c96d14d2fa8ee060ad9f61606/lighty-examples/lighty-controller-springboot-netconf/README.md#security) | N/A |

<!--Node.js-->
| Name | Description | Model | Policy |
| ------------------------------------------ | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| [Notadd](https://github.com/notadd/notadd) | A micro-service development architecture based on Nest.js. | [.conf](https://github.com/notadd/notadd/blob/e58d0a0cf5d691c3fe20170e94cdd8e2c627abd4/apps/nest-upms/src/casbin/rbac_model.conf) | [DB adapter](https://github.com/notadd/notadd/blob/e58d0a0cf5d691c3fe20170e94cdd8e2c627abd4/apps/nest-upms/src/casbin/adapter.ts) |

<!--Python-->
| Name | Description | Model | Policy |
| --------------------------------------------- | --------------------------- | --------------------------------------------------------------------------------------------- | ------ |
| [dtrace](https://github.com/EduScaled/dtrace) | EduScaled's tracing system. | [Commit](https://github.com/EduScaled/dtrace/commit/6e8d6b52ec2fa120e8ad63f84a4aecc3eae14c02) | N/A |

<!--END_DOCUSAURUS_CODE_TABS-->


## Integration via plugin

| Name | Description | Plugin | Model | Policy |
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| [Docker](https://github.com/docker/docker) | The world's leading software container platform | [casbin-authz-plugin](https://github.com/casbin/casbin-authz-plugin) ([recommended by Docker](https://docs.docker.com/engine/extend/legacy_plugins/#authorization-plugins)) | [.conf](https://github.com/casbin/casbin-authz-plugin/blob/master/examples/basic_model.conf) | [.csv](https://github.com/casbin/casbin-authz-plugin/blob/master/examples/basic_policy.csv) |
| [Gobis](https://github.com/orange-cloudfoundry/gobis) | [Orange](https://github.com/orange-cloudfoundry)'s lightweight API Gateway written in go | [casbin](https://github.com/orange-cloudfoundry/gobis-middlewares/tree/master/casbin) | [Code](https://github.com/orange-cloudfoundry/gobis-middlewares/blob/master/casbin/model.go#L52-L65) | [Request](https://github.com/orange-cloudfoundry/gobis-middlewares/blob/master/casbin/adapter.go#L46-L64) |
26 changes: 26 additions & 0 deletions website/translated_docs/fr-FR/Benchmark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
id: benchmark
title: Benchmarks
---

The overhead of policy enforcement is benchmarked in [model_b_test.go](https://github.com/casbin/casbin/blob/master/model_b_test.go). The testbed is:

```
Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2601 Mhz, 4 Core(s), 8 Logical Processor(s)
```

The benchmarking result of `go test -bench=. -benchmem` is as follows (op = an `Enforce()` call, ms = millisecond, KB = kilo bytes):

| Test case | Rule size | Time overhead (ms/op) | Memory overhead (KB) |
| ------------------------- | ---------------------------------------- | --------------------- | -------------------- |
| ACL | 2 rules (2 users) | 0.015493 | 5.649 |
| RBAC | 5 rules (2 users, 1 role) | 0.021738 | 7.522 |
| RBAC (small) | 1100 rules (1000 users, 100 roles) | 0.164309 | 80.620 |
| RBAC (medium) | 11000 rules (10000 users, 1000 roles) | 2.258262 | 765.152 |
| RBAC (large) | 110000 rules (100000 users, 10000 roles) | 23.916776 | 7,606 |
| RBAC with resource roles | 6 rules (2 users, 2 roles) | 0.021146 | 7.906 |
| RBAC with domains/tenants | 6 rules (2 users, 1 role, 2 domains) | 0.032696 | 10.755 |
| ABAC | 0 rule (0 user) | 0.007510 | 2.328 |
| RESTful | 5 rules (3 users) | 0.045398 | 91.774 |
| Deny-override | 6 rules (2 users, 1 role) | 0.023281 | 8.370 |
| Priority | 9 rules (2 users, 2 roles) | 0.016389 | 5.313 |
Loading