Skip to content

Fully working project with RBAC, ABAC support #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from

Conversation

romitkarmakar
Copy link

basic policy enforcer, model adapter and built-in csv adapter has been added. Expression parsing is being done using recursive descent parsing tree as a replacement for govaluate package. Google tests has been included.

@romitkarmakar
Copy link
Author

@hsluoyz review this pr.

@mnprtpsingh
Copy link

@romitkarmakar i personally feel that it will be good, if we don't create seperate a project for tests as mentioned here. It will help to get all the advantages of dynamic linking/loading along with having a good coverage. What do you think about this?

@hsluoyz
Copy link
Member

hsluoyz commented Mar 11, 2020

No capital letters in file names.

casbin-test instead of casbin-cpp-test

Copy link
Member

@leeqvip leeqvip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR is very valuable, but can the directory structure keep the same style of Casbin (golang)?

@romitkarmakar
Copy link
Author

@techoner Thanks, I will refactor the code acccording to the go directory structure.

@romitkarmakar
Copy link
Author

  • Added google test and test cases for basic enforcement of policy.
  • Removed dependencies to windows.h, so that it can get compiled in Linux. See issue: window.h in ubuntu gives error. #14
  • Enforcer, Model, File adapter, Effector, RBAC, Log built See Issue Enforcer, Model, Adapter, File Adapter should be built first. #2
  • Project has been structured according to the core go lang engine.
  • A custom recursive descent parser has been built to work as an alternative to the govaluate package, and the api has been kept similar with the govaluate package.

@hsluoyz , @techoner can you review this PR ?

@romitkarmakar romitkarmakar requested a review from leeqvip March 23, 2020 21:11
@romitkarmakar
Copy link
Author

@mnprtpsingh Sorry for the late reply, I think we can also test non-exported functions in DLL by statically linking .obj files to the test project. Having a separate test folder gives us better integration testing.

@romitkarmakar romitkarmakar changed the title Added project files and tests Fully working project with RBAC support Mar 29, 2020
@divy9881
Copy link
Member

Nice to know, you have completed the project, but I would like to point out some missing core elements without which a user cannot use this project to the fullest.

  1. AddFunction() API
  2. Watcher

@divy9881
Copy link
Member

I am afraid that your expression evaluator cannot take generic functions with different return types and different arguments. You can refer to more generic evaluators here : issue #3

@romitkarmakar
Copy link
Author

Thanks, @divypatel9881. This is a MVP. I will be adding the watcher and synced enforcer in the next commit. Currently, I am working on the expression evaluator and it is still in development phase, and I will surely try to integrate generic templates and reflection into it.

@romitkarmakar romitkarmakar changed the title Fully working project with RBAC support Fully working project with RBAC, ABAC support Mar 29, 2020
@hsluoyz hsluoyz closed this Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants