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

Support more languages of Casbin like Go Casbin in the editor #129

Open
2 of 7 tasks
hsluoyz opened this issue Jul 3, 2024 · 1 comment
Open
2 of 7 tasks

Support more languages of Casbin like Go Casbin in the editor #129

hsluoyz opened this issue Jul 3, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@hsluoyz
Copy link
Member

hsluoyz commented Jul 3, 2024

We want to use the Casbin editor (this repo) to invoke different languages of Casbin libraries (like Go Casbin, jCasbin, Node-Casbin, PyCasbin, etc.)

How to do this?

Step-1: The editor code in the browser first calls the Casdoor HTTP API of the Casdoor official demo site: https://door.casdoor.com/ (see docs: https://casdoor.org/docs/permission/exposed-casbin-apis).

Step-2: The Casdoor backend (in Go) will call the Casbin CLI (like casbin-go-cli, casbin-java-cli, etc.) via shell/CMD locally:

Image

Step-3: The Casbin CLI will call the Casbin library of its language. Like casbin-go-cli will call Go Casbin via lib. casbin-java-cli will call jCasbin via lib, etc.

The Step-1 and Step-2 are already completed. The remaining part is Step-3: we need to make a new casbin-xxx-cli for each language, to integrate that language of Casbin into the web editor.

When you implement a new casbin-xxx-cli, you can refer to existing code like casbin-go-cli, casbin-java-cli, etc. For example, you learn how casbin-java-cli calls into jCasbin, you will know how casbin-rust-cli should call into Casbin-RS.

The code quality of the new casbin-xxx-cli will be guaranteed by its own test cases and also the result of this Casbin editor (both web UI and the editor's test cases).

See what we have got now: https://editor.casbin.org/

Image

Now we already have the following remote Casbin engines:

@casbin-bot
Copy link
Member

@nodece

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants