JaneJeon / objection-authorize

isomorphic, "magical" authorization integration with Objection.js 🎉
https://janejeon.dev/objection-authorize-v4-and-the-future/
GNU Lesser General Public License v3.0
76 stars 6 forks source link

Add json-rule-engine support as an alternative to CASL #152

Open JaneJeon opened 3 years ago

JaneJeon commented 3 years ago

For this we might have to expand the definition of "authorization library", but I know for a fact that there exist "rule engines" that can effectively be used for the same purpose, with the additional benefit of being able to see/build/debug the rules visually in the UI, without having to write test cases which are a pain in the ass.

For starters, I know for a fact that https://github.com/cachecontrol/json-rules-engine can be used to do "if this then that", with the only caveat being that you need to configure "then that" part to tell the objection-authorize plugin to say "DON'T ALLOW THIS", but this is where the pluggable interface comes in!

Plus, it has a nice UI you can use: https://github.com/vinzdeveloper/json-rule-editor

JaneJeon commented 3 years ago

Another mature option is https://www.drools.org, which, given that it's supported by RedHat, can't be any more solid!

e: nvm, it's only for Java. Fuck.

JaneJeon commented 3 years ago

@sssss465 you can take this on, should be simple enough?

sssss465 commented 3 years ago

I'll look at it if I have time 😉

JaneJeon commented 3 years ago

@sssss465 cough