diff --git a/content/docs/basics/tutorial.mdx b/content/docs/basics/tutorial.mdx index 8bda1b6..e5c6752 100644 --- a/content/docs/basics/tutorial.mdx +++ b/content/docs/basics/tutorial.mdx @@ -13,40 +13,27 @@ Note that certain tutorials address Casbin's model architecture and apply univer ### Our Papers -- [PML: An Interpreter-Based Access Control Policy Language for Web Services](https://arxiv.org/abs/1903.09756) +- [PERM: Streamlining Cloud Authorization With Flexible and Scalable Policy Enforcement](https://ieeexplore.ieee.org/abstract/document/11095782) -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: +This paper provides an in-depth exploration of Casbin's design. If you reference Casbin in academic work, please cite using the following BibTex: ```bibtex -@article{luo2019pml, - title={PML: An Interpreter-Based Access Control Policy Language for Web Services}, +@article{luo2025perm, + title={PERM: Streamlining Cloud Authorization With Flexible and Scalable Policy Enforcement}, author={Luo, Yang and Shen, Qingni and Wu, Zhonghai}, - journal={arXiv preprint arXiv:1903.09756}, - year={2019} + journal={IEEE Transactions on Information Forensics and Security}, + year={2025}, + volume={20}, + number={7}, + pages={8481-8496}, + publisher={IEEE} } ``` -- [Access Control Policy Specification Language Based on Metamodel (in Chinese)](https://www.jos.org.cn/jos/article/abstract/5624) - -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)](https://kns.cnki.net/kcms/detail/Detail.aspx?dbname=CJFDLAST2020&filename=RJXB202002012&v=) - ### Videos - [A Secure Vault - implementing authorization middleware with Casbin - JuniorDevSG](https://www.youtube.com/watch?v=OTT84oplR9o) -- [Sharing user permissions in a micro-service architecture based on Casbin (in Russian)](https://www.youtube.com/watch?v=Z5dUxH4PqYM) - [Nest.js - Casbin RESTful RBAC authorization middleware](https://www.youtube.com/watch?v=mWlPNrCgVdE) -- [Gin Tutorial Chapter 10: Learn Casbin basic models in 30 minutes (in Chinese)](https://www.bilibili.com/video/BV1qz4y167XP) -- [Gin Tutorial Chapter 11: Coding, API and custom function in Casbin (in Chinese)](https://www.bilibili.com/video/BV13r4y1M7AC) -- [Gin + Casbin: Learning Permissions in Action (in Chinese)](https://www.jtthink.com/course/132) -- [jCasbin Basics: A simple RBAC example (in Chinese)](https://www.jtthink.com/course/play/2706) -- [Golang's RBAC based on Casbin (in Chinese)](https://www.bilibili.com/video/BV1Kf4y1U7iJ) -- [Learning Gin + Casbin (1): Opening & Overview (in Chinese)](https://www.bilibili.com/video/BV1bp4y1a7je) -- [ThinkPHP 5.1 + Casbin: Introduction (in Chinese)](https://www.bilibili.com/video/BV1kz4y1Z7vd) -- [ThinkPHP 5.1 + Casbin: RBAC authorization (in Chinese)](https://www.bilibili.com/video/BV1A541187M4) -- [ThinkPHP 5.1 + Casbin: RESTful & Middleware (in Chinese)](https://www.bilibili.com/video/BV1uk4y117up) -- [Quick Start for PHP-Casbin (in Chinese)](https://www.bilibili.com/video/BV1dK4y1L7xy) -- [ThinkPHP 5.1 + Casbin: How to use custom matching functions (in Chinese)](https://www.bilibili.com/video/BV1dq4y1Z78g) -- [Webman + Casbin: How to use Webman Casbin Plugin (in Chinese)](https://www.bilibili.com/video/BV1X34y1Q7ZH) ### PERM Meta-Model (Policy, Effect, Request, Matchers) @@ -54,36 +41,13 @@ This extended paper appears in Journal of Software. Citations in various formats - [Modeling Authorization with PERM in Casbin](https://narendraj9.github.io/posts/generalized-authz.html) - [Designing a Flexible Permissions System with Casbin](https://medium.com/silo-blog/designing-a-flexible-permissions-system-with-casbin-f5d97fef17b8) - [Authorize with Access Control Lists](https://medium.com/pragmatic-programmers/authorize-with-access-control-lists-92fbec57a920) -- [Access control with PERM and Casbin (in Persian)](https://virgool.io/@a3dho3yn/%DA%A9%D9%86%D8%AA%D8%B1%D9%84-%D8%AF%D8%B3%D8%AA%D8%B1%D8%B3%DB%8C-%D8%A8%D8%A7-casbin-%D9%88-perm-metamodel-sm3vb9c2cowg) -- [RBAC? ABAC? .. PERM! New Way of Authorization for Cloud-Based Web Services and Apps (in Russian)](https://habr.com/ru/articles/539778/) -- [Practice & Examples of Flexible Authorization Using Casbin & PERM (in Russian)](https://habr.com/ru/articles/540454/) -- [Permission management with Casbin (in Chinese)](http://www.cnblogs.com/wang_yb/archive/2018/11/20/9987397.html) -- [Analysis of Casbin (in Chinese)](https://www.cnblogs.com/xiaohunshi/p/10372881.html) -- [Design of System Permissions (in Chinese)](https://github.com/xizhibei/blog/issues/101) -- [Casbin: A Permission Engine (in Chinese)](https://github.com/xizhibei/blog/issues/102) -- [Implementing ABAC with Casbin (in Chinese)](https://www.cnblogs.com/studyzy/p/11380736.html) -- [Source code analysis of Casbin (in Chinese)](https://www.cnblogs.com/yjf512/p/12200206.html) -- [Permission evaluation with Casbin (in Chinese)](https://cloud.tencent.com/developer/article/1534674) -- [Casbin: Library of the day for Go (in Chinese)](https://juejin.cn/post/6844904191257739277) ### HTTP & RESTful -- [Basic Role-Based HTTP Authorization in Go with Casbin](https://zupzup.org/casbin-http-role-auth) (or [Chinese translation](https://studygolang.com/articles/12323)) - -### Watcher - -- [RBAC Distributed Synchronization via Casbin Watcher (in Chinese)](https://hongker.github.io/2021/02/19/golang-rbac-watcher/) - -### Beego - -- [Using Casbin with Beego: 1. Get started and test (in Chinese)](https://blog.csdn.net/hotqin888/article/details/78460385) -- [Using Casbin with Beego: 2. Policy storage (in Chinese)](https://blog.csdn.net/hotqin888/article/details/78571240) -- [Using Casbin with Beego: 3. Policy query (in Chinese)](https://blog.csdn.net/hotqin888/article/details/78992250) -- [Using Casbin with Beego: 4. Policy update (in Chinese)](https://blog.csdn.net/hotqin888/article/details/80032538) -- [Using Casbin with Beego: 5. Policy update (continued) (in Chinese)](https://blog.csdn.net/hotqin888/article/details/80092285) +- [Basic Role-Based HTTP Authorization in Go with Casbin](https://zupzup.org/casbin-http-role-auth) ### Gin @@ -91,35 +55,18 @@ This extended paper appears in Journal of Software. Citations in various formats - [Tutorial: Integrate Gin with Casbin](https://dev.to/maxwellhertz/tutorial-integrate-gin-with-cabsin-56m0) - [Policy enforcements on K8s with Pipeline](https://outshift.cisco.com/blog/policy-enforcement-k8s) - [Authentication and authorization in Gin application with JWT and Casbin](https://medium.com/@tienbm90/authentication-and-authorization-in-gin-application-with-jwt-and-casbin-a56bbbdec90b) -- [Backend API with Go: 1. Authentication based on JWT (in Chinese)](https://studygolang.com/topics/6998) -- [Backend API with Go: 2. Authorization based on Casbin (in Chinese)](https://studygolang.com/topics/6999) -- [Using Go's authorization library Casbin with Gin and GORM (in Japanese)](https://web.archive.org/web/20211207015104/https://www.zaneli.com/blog/20181203) ### Echo - [Web authorization with Casbin](http://klotzandrew.com/blog/authorization-with-casbin) -### Iris - -- [Iris + Casbin: Practice for permission management (in Chinese)](https://zxc0328.github.io/posts-cn/casbin-iris/) -- [Learning iris + Casbin from scratch](https://learnku.com/articles/41416) - ### Argo CD - [Organizational RBAC in Argo CD with Casbin](https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/) -### GShark - -- [GShark: Scan for sensitive information in Github easily and effectively (in Chinese)](https://mp.weixin.qq.com/s?__biz=MzI3MjA3MTY3Mw==&mid=2247483770&idx=1&sn=9f02c2803e1c946e8c23b16ff3eba757&chksm=eb396fecdc4ee6fa2f378e846f354f45acf6e6f540cfd54190e9353df47c7707e3a2aadf714f&token=115330850&lang=zh_CN#rd) - -### SpringBoot - -- [jCasbin: a more light-weight permission management solution (in Chinese)](https://blog.csdn.net/waynelee0809/article/details/85702551) -- [Integrating jCasbin with JFinal (in Chinese)](http://www.jfinal.com/share/842) - diff --git a/package-lock.json b/package-lock.json index 1e29640..dbecfd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,7 +101,6 @@ "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -1950,7 +1949,6 @@ "resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.6.tgz", "integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==", "license": "MIT", - "peer": true, "dependencies": { "@octokit/auth-token": "^6.0.0", "@octokit/graphql": "^9.0.3", @@ -3895,7 +3893,6 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.8.tgz", "integrity": "sha512-3MbSL37jEchWZz2p2mjntRZtPt837ij10ApxKfgmXCTuHWagYg7iA5bqPw6C8BMPfwidlvfPI/fxOc42HLhcyg==", "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -3906,7 +3903,6 @@ "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", "devOptional": true, "license": "MIT", - "peer": true, "peerDependencies": { "@types/react": "^19.2.0" } @@ -3968,7 +3964,6 @@ "integrity": "sha512-iIACsx8pxRnguSYhHiMn2PvhvfpopO9FXHyn1mG5txZIsAaB6F0KwbFnUQN3KCiG3Jcuad/Cao2FAs1Wp7vAyg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.52.0", "@typescript-eslint/types": "8.52.0", @@ -4485,7 +4480,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -4945,7 +4939,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -6272,7 +6265,6 @@ "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -6373,7 +6365,6 @@ "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", "dev": true, "license": "MIT", - "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -6475,7 +6466,6 @@ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -7158,7 +7148,6 @@ "resolved": "https://registry.npmjs.org/fumadocs-core/-/fumadocs-core-16.4.7.tgz", "integrity": "sha512-oEsoha5EjyQnhRb6s5tNYEM+AiDA4BN80RyevRohsKPXGRQ2K3ddMaFAQq5kBaqA/Xxb+vqrElyRtzmdif7w2A==", "license": "MIT", - "peer": true, "dependencies": { "@formatjs/intl-localematcher": "^0.7.5", "@orama/orama": "^3.1.18", @@ -7321,7 +7310,6 @@ "resolved": "https://registry.npmjs.org/fumadocs-ui/-/fumadocs-ui-16.4.7.tgz", "integrity": "sha512-ShEftF54mj89EW7Wll2wwGcH6bNTmPrPtUUmO+ThakK13skJmY7GSBH3Ft51TzQNLhN3kBKEQipIlJWc7LT5NQ==", "license": "MIT", - "peer": true, "dependencies": { "@fumadocs/ui": "16.4.7", "@radix-ui/react-accordion": "^1.2.12", @@ -9363,7 +9351,6 @@ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.562.0.tgz", "integrity": "sha512-82hOAu7y0dbVuFfmO4bYF1XEwYk/mEbM5E+b1jgci/udUBEE/R7LF5Ip0CCEmXe8AybRM8L+04eP+LGZeDvkiw==", "license": "ISC", - "peer": true, "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } @@ -9424,7 +9411,6 @@ "integrity": "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==", "dev": true, "license": "MIT", - "peer": true, "bin": { "marked": "bin/marked.js" }, @@ -10689,7 +10675,6 @@ "resolved": "https://registry.npmjs.org/next/-/next-16.0.10.tgz", "integrity": "sha512-RtWh5PUgI+vxlV3HdR+IfWA1UUHu0+Ram/JBO4vWB54cVPentCD0e+lxyAYEsDTqGGMg7qpjhKh6dc6aW7W/sA==", "license": "MIT", - "peer": true, "dependencies": { "@next/env": "16.0.10", "@swc/helpers": "0.5.15", @@ -14237,7 +14222,6 @@ "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -14375,7 +14359,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -14385,7 +14368,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz", "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -15027,7 +15009,6 @@ "integrity": "sha512-phCkJ6pjDi9ANdhuF5ElS10GGdAKY6R1Pvt9lT3SFhOwM4T7QZE7MLpBDbNruUx/Q3gFD92/UOFringGipRqZA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@semantic-release/commit-analyzer": "^13.0.0-beta.1", "@semantic-release/error": "^4.0.0", @@ -15993,8 +15974,7 @@ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.18.tgz", "integrity": "sha512-4+Z+0yiYyEtUVCScyfHCxOYP06L5Ne+JiHhY2IjR2KWMIWhJOYZKLSGZaP5HkZ8+bY0cxfzwDE5uOmzFXyIwxw==", "devOptional": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/tapable": { "version": "2.3.0", @@ -16378,7 +16358,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -17050,7 +17029,6 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/src/app/blog/page.tsx b/src/app/blog/page.tsx index 476eb14..6beb6bf 100644 --- a/src/app/blog/page.tsx +++ b/src/app/blog/page.tsx @@ -11,7 +11,12 @@ export const metadata: Metadata = { type BlogPage = InferPageType; export default function Page() { - const pages: BlogPage[] = blogSource.getPages(); + const pages: BlogPage[] = [...blogSource.getPages()].sort((a, b) => { + // Sort by date in descending order (newest first) + const dateA = a.data.date ? new Date(a.data.date).getTime() : 0; + const dateB = b.data.date ? new Date(b.data.date).getTime() : 0; + return dateB - dateA; + }); return ( <>