Casbin AI & MCP security gateway for HTTP, online demo: https://door.caswaf.com

Clone this repo:
  1. 9152178 fix(channel): stop doubling the /v1 prefix in upstream urls by Yang Luo · 7 hours ago master
  2. 2f09a1c fix(web): make the records page reach the whole window and stop it flickering by Yang Luo · 2 days ago
  3. 4ef0a8a perf(agentmonitor): keep status off the poll path and prune stale cursors by Yang Luo · 2 days ago
  4. b9bff1c feat(agentmonitor): make the record window and poll interval configurable by Yang Luo · 2 days ago
  5. cc37cf4 feat(agentpatch): tell operators what patching Claude Code changes by Yang Luo · 2 days ago

Online demo

Documentation

https://caswaf.org

Architecture

Casbin Gateway contains 2 parts:

NameDescriptionLanguageSource code
FrontendWeb frontend UI for Casbin GatewayJavascript + Reacthttps://github.com/apache/casbin-gateway/tree/master/web
BackendRESTful API backend for Casbin GatewayGolang + Beego + MySQLhttps://github.com/apache/casbin-gateway

Installation

Casbin Gateway uses Casdoor to manage members. So you need to create an organization and an application for Casbin Gateway in a Casdoor instance.

Deployment Options

  • Kubernetes Deployment: Deploy Casbin Gateway on Kubernetes with complete manifests and guide
  • Docker Compose: Use the provided docker-compose.yml for quick local setup
  • Manual Installation: Build and run from source

Necessary configuration

Get the code

go get github.com/casdoor/casdoor
go get github.com/apache/casbin-gateway

or

git clone https://github.com/casdoor/casdoor
git clone https://github.com/apache/casbin-gateway

Setup database

Casbin Gateway will store its users, nodes and topics information in a MySQL database named: caswaf, will create it if not existed. The DB connection string can be specified at: https://github.com/apache/casbin-gateway/blob/master/conf/app.conf

dataSourceName = root:123@tcp(localhost:3306)/

Casbin Gateway uses XORM to connect to DB, so all DBs supported by XORM can also be used.

Configure Casdoor

After creating an organization and an application for Casbin Gateway in a Casdoor, you need to update clientID, clientSecret, casdoorOrganization and casdoorApplication in app.conf.

Run Casbin Gateway

Optional configuration

Setup your WAF to enable some third-party login platform

Casbin Gateway uses Casdoor to manage members. If you want to log in with oauth, you should see casdoor oauth configuration.

OSS, Mail, and SMS services

Casbin Gateway uses Casdoor to upload files to cloud storage, send Emails and send SMSs. See Casdoor for more details.

Contribute

For Casbin Gateway, if you have any questions, you can open Issues, or you can also directly start Pull Requests(but we recommend opening issues first to communicate with the community).

License

Apache-2.0