- Name: Mohit Singh (@mrunfunny)
- Organisation: Casbin
- Project link: https://summerofcode.withgoogle.com/projects/#4531641566887936
- Repository link: https://github.com/casbin/dart-casbin
- Project Name: Implement a dart version of Casbin.
Casbin is an authorization library that supports access control models like ACL, RBAC, ABAC. Originally written in Golang, it has been implemented in various languages and Dart-Casbin is the Dart implementation of Casbin. The current progress is:
- Now, Dart-Casbin supports almost all functionality of Casbin as of its other implementations and can be used as a module in Dart applications.
- Dart-Casbin supports ACL, RBAC and ABAC as supported by other casbin implementations.
- It has test coverage for all major access models and their edge cases.
- Dart-Casbin is integrated with semantic-release to semantically release newer versions with every patch release through Github Actions.
For the list of all contributions, please scroll to this section.
I started by implementing Config module to load Config from file and text. Next I implemented File Adapter to load policies from file. Then ACL and RBAC were implemented. In the meantime, I wrote tests to cover all possible cases for ACL, RBAC and loading of Config files from both files and text. Next, ABAC was implemented and tests were added for it too. Then, we wrapped up by integrating semantic release with GitHub Actions to release on both GitHub and pub.dev.
feat: added config file, testdata and test for it
feat: added classes and methods to load model from CONF file
Update Linting rules and added license text in each dart file
Implemented basic working Enforce method
feat: added examples of models and policies and added test for basic enforce function.
feat: implemented rbac module and added tests for roles
feat: added github actions for analysing code and running test on PR
feat: implemented proper functioning enforce method and added tests for rbac
feat: added missing methods to model module
feat: added methods to coreEnforcer and Enforcer
feat: implement initial parts of internal and core apis
feat: added methods and tests to enforcer apis
feat: implemented full persist module and enforcer apis
feat: implemented matcher functions and added tests
feat: implemented logger and added tests for it
feat: added more enforce methods and added tests
feat: added support for abac and added tests
refactor: refactored code and exported AbacClass
docs: added link to example app
feat: updated workflow to automate github and pub.dev release
feat: updated files to prepare for new release
Dart-Casbin has almost all functionality as that of other Casbin implementations. However, some more work can be done in following areas:
- some matcher Functions can be added to improve functionality of matchers.
- I'll be looking to implement a front-end module focused on flutter, similar to casbin.js.
- A Middleware for shelf to improve dart-casbin's compatibility with dart-backend shelf.
I would like to thank my mentors hsluoyz, Tomas Arias, and Santhoshivan Amudhan for their continuous support and guidance without which I wouldn't have been able to finish this project on time. I would also thank Google Summer of Code to provide such an excellent opportunity to be able to get started with open source.
