-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
POC try scaling abac rules #121
Conversation
Codecov Report
@@ Coverage Diff @@
## master #121 +/- ##
==========================================
+ Coverage 87.20% 87.23% +0.03%
==========================================
Files 19 19
Lines 2961 2992 +31
==========================================
+ Hits 2582 2610 +28
- Misses 379 382 +3
Continue to review full report at Codecov.
|
@GopherJ very good work! Actually it inspires me about a better grammar: model: [request_definition]
r = sub, obj, act
[policy_definition]
p = sub_rule, obj, act
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = eval(p.sub_rule) && r.obj == p.obj && r.act == p.act policy:
I made this change because |
@hsluoyz I love the new grammar because So just to think about implementation: we should check if |
I think your implementation is simple and correct. Thumbs up! |
ok thanks! |
lgtm |
As next step, we can:
|
This PR allows to define in model some thing like this, I would like to solve: casbin/casbin#354
and in policy we can then write like this:
This policy means that we don't care who is the person sending request, but his/her age should be greater than 18
I made it works in casbin-rs, not sure if we should do like this but I think it may helps solving some problems.
Also can the syntax be better?