Apache Casbin Editor

Clone this repo:
  1. e5ed076 docs: omit the legacy gopher favicon from release materials (#398) by Emery · 14 days ago master
  2. 8ac0628 ci: prepare unsigned source candidates before release approval (#397) by Emery · 2 weeks ago
  3. a7911c6 fix: serve exported desktop routes through a local app protocol (#396) by Emery · 2 weeks ago
  4. 2968e96 fix: initialize the local engine with the default enforcement context (#395) by Emery · 2 weeks ago
  5. c3585d1 chore: normalize ASF headers in contributed editor files (#394) by Emery · 2 weeks ago

Apache Casbin Editor (Incubating)

Apache Casbin is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Build and Deploy Build Release GitHub issues GitHub forks Sourcegraph License Discord

Apache Casbin Editor is a web-based Casbin model and policy editor. It's based on Next.js + TypeScript.

Use the Casbin-editor to write your Casbin model and policy in your web browser. It provides functionality such as syntax highlighting and code completion, just like an IDE for a programming language.

Try it at either:

  1. Apache Casbin Editor: https://editor.casbin.org/
  2. Apache Casbin website: https://casbin.apache.org/editor

How it works?

Casbin-editor is a pure frontend Javascript project. It uses node-casbin to perform policy enforcement. It's notable that node-casbin can be used either in frontend Javascript or Node.js.

This project can be viewed as an example for using node-casbin in the browser.

Node.js enforcement runs locally in the browser. The other engines send the entered model, policy and requests to the selected remote backend (by default, cli.casnode.com). Use synthetic examples when comparing remote engines, or select a backend you control before entering confidential policy data.

For Dev

yarn install
yarn dev

Open browser: http://localhost:3000/

Production Preview

yarn build

# Make sure port 3000 is not in use
yarn start

Open browser: http://localhost:3000/

For Electron

This project supports being built locally as an Electron app. The standard Electron bundle includes LGPL-licensed FFmpeg and must not be uploaded as an ASF convenience binary; see RELEASING.md.

yarn install
yarn dist

If the packaged app cannot load the local out/ bundle, it falls back to loading https://editor.casbin.org/ in the window.

Release preparation

See RELEASING.md for source candidates, independent approval and promotion of the signed originals. A workflow artifact or historical GitHub download is not evidence of approval for a new Apache release.