Refactor Casbin.js and other optimizations on pycasbin and node-casbin
- Mentors
- Zihui Liu, Sefriol, ZiXuan Liu, Jon Lee, abichinger, Yang Luo
- Organization
- Casbin
In the last GSoC, kingiw created an initial version of casbin.js. This version has a CASL-like API. He also adds support to go-casbin and node-casbin.
However, casbin.js relies on an insufficient way to share permissions between the frontend and backend. The backend needs to send the whole policy definition model to the frontend, which will use node-casbin to check the permission. This method requires a heavy data transfer in between, and has potential security problems.
To build a production-ready frontend permission control library, we need to
- Design a new data structure to only store one-user permission.
- Add a full set of API to operate on the data structure.
- Implement integration with the frontend frameworks like React or Vue.js.
- Add util function in different implementations of Casbin.