Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/casbin/casbin-hub
The hub for Casbin
https://github.com/casbin/casbin-hub
access-control casbin dashboard permission rbac web
Last synced: 3 days ago
JSON representation
The hub for Casbin
- Host: GitHub
- URL: https://github.com/casbin/casbin-hub
- Owner: casbin
- License: apache-2.0
- Created: 2019-12-20T08:20:53.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-08T05:57:46.000Z (about 1 year ago)
- Last Synced: 2024-10-29T12:56:27.935Z (15 days ago)
- Topics: access-control, casbin, dashboard, permission, rbac, web
- Language: JavaScript
- Homepage: https://dashboard.casbin.com
- Size: 389 KB
- Stars: 88
- Watchers: 7
- Forks: 46
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Casbin-Hub
====Casbin-Hub is the official web UI (admin portal) for Casbin models and policies. A security administrator can use it to view & edit Casbin models and policy rules.
## Demo
https://hub.casbin.com
## Architecture
Casbin-Hub contains 2 parts:
| Name | Description | Language | Source code |
|----------|------------------------------------------|---------------------------------|------------------------------------------------------------|
| Frontend | Web frontend UI for Casbin-Hub | Javascript + React + Ant Design | https://github.com/casbin/casbin-hub/tree/master/web |
| Backend | RESTful API backend for Casbin-Hub | Golang + Beego + MySQL | https://github.com/casbin/casbin-hub |## Installation
- Get the code:
```shell
go get github.com/casbin/casbin-hub
```- Setup database:
Casbin-Hub will store its metadata in a MySQL database named: `casbin_metadata`, will create it if not existed. The DB connection string can be specified at: https://github.com/casbin/casbin-hub/blob/master/conf/app.conf
- Setup Casbin-Hub to enable some third-party login platform
Casbin-forum provide a way to sign up using Github account, so you may have to get your own `GithubAuthClientID`, `GithubAuthClientSecret` first.
You could get them by clicking on this url: https://github.com/settings/developers , You should set `Homepage URL` to fit your own domain address, for local testing, set`http://localhost:3000`. And set the Authorization callback URL, the same domain address as `Homepage URL`, for local testing, set`http://localhost:3000`.
- Modified config files:
Change your own `GithubAuthClientID`, `GithubAuthClientSecret` in conf/app.conf, web/src/conf.js.
```ini
dataSourceName = root:123@tcp(localhost:3306)/
```Casbin-Hub uses XORM to connect to DB, so all DBs supported by XORM can also be used.
- Run backend (in port 8800):
```
go run main.go
```- Run frontend (in the same machine's port 3030):
```
cd web
npm install
npm start
```- Open browser:
http://localhost:3030/