Basics
Tutorials
Casbin Tutorials
Note that certain tutorials address Casbin's model architecture and apply universally across all language implementations, while others target specific programming languages.
Our Papers
This paper provides an in-depth exploration of Casbin's design. If you reference Casbin/PML in academic work, please cite using the following BibTex:
@article{luo2019pml,
title={PML: An Interpreter-Based Access Control Policy Language for Web Services},
author={Luo, Yang and Shen, Qingni and Wu, Zhonghai},
journal={arXiv preprint arXiv:1903.09756},
year={2019}
}This extended paper appears in Journal of Software. Citations in various formats (Refworks, EndNote, etc.) are available at: (another version) Access Control Policy Specification Language Based on Metamodel (in Chinese)
Videos
- A Secure Vault - implementing authorization middleware with Casbin - JuniorDevSG
- Sharing user permissions in a micro-service architecture based on Casbin (in Russian)
- Nest.js - Casbin RESTful RBAC authorization middleware
- Gin Tutorial Chapter 10: Learn Casbin basic models in 30 minutes (in Chinese)
- Gin Tutorial Chapter 11: Coding, API and custom function in Casbin (in Chinese)
- Gin + Casbin: Learning Permissions in Action (in Chinese)
- jCasbin Basics: A simple RBAC example (in Chinese)
- Golang's RBAC based on Casbin (in Chinese)
- Learning Gin + Casbin (1): Opening & Overview (in Chinese)
- ThinkPHP 5.1 + Casbin: Introduction (in Chinese)
- ThinkPHP 5.1 + Casbin: RBAC authorization (in Chinese)
- ThinkPHP 5.1 + Casbin: RESTful & Middleware (in Chinese)
- Quick Start for PHP-Casbin (in Chinese)
- ThinkPHP 5.1 + Casbin: How to use custom matching functions (in Chinese)
- Webman + Casbin: How to use Webman Casbin Plugin (in Chinese)
PERM Meta-Model (Policy, Effect, Request, Matchers)
- Understanding Casbin with different Access Control Model Configurations
- Modeling Authorization with PERM in Casbin
- Designing a Flexible Permissions System with Casbin
- Authorize with Access Control Lists
- Access control with PERM and Casbin (in Persian)
- RBAC? ABAC? .. PERM! New Way of Authorization for Cloud-Based Web Services and Apps (in Russian)
- Practice & Examples of Flexible Authorization Using Casbin & PERM (in Russian)
- Permission management with Casbin (in Chinese)
- Analysis of Casbin (in Chinese)
- Design of System Permissions (in Chinese)
- Casbin: A Permission Engine (in Chinese)
- Implementing ABAC with Casbin (in Chinese)
- Source code analysis of Casbin (in Chinese)
- Permission evaluation with Casbin (in Chinese)
- Casbin: Library of the day for Go (in Chinese)
HTTP & RESTful
Watcher
Beego
- Using Casbin with Beego: 1. Get started and test (in Chinese)
- Using Casbin with Beego: 2. Policy storage (in Chinese)
- Using Casbin with Beego: 3. Policy query (in Chinese)
- Using Casbin with Beego: 4. Policy update (in Chinese)
- Using Casbin with Beego: 5. Policy update (continued) (in Chinese)
Gin
- Authorization in Golang Projects using Casbin
- Tutorial: Integrate Gin with Casbin
- Policy enforcements on K8s with Pipeline
- Authentication and authorization in Gin application with JWT and Casbin
- Backend API with Go: 1. Authentication based on JWT (in Chinese)
- Backend API with Go: 2. Authorization based on Casbin (in Chinese)
- Using Go's authorization library Casbin with Gin and GORM (in Japanese)
Echo
Iris
Argo CD
GShark
Express
Koa
Nest
- How to Create Role-based Authorization Middleware with Casbin and Nest.js
- nest.js: Casbin RESTful RBAC authorization middleware (Video)
- A Demo App of Attribute-based Access Control in Node.js Based on Casbin
- Multi tenant SaaS starter kit with cqrs graphql microservice architecture
