News for hackers. Stuff that matters.
Re:Casbin: An authorization library that supports authz mode... by Ideabile on Sunday April 25, 2021 @02:43PM (#26935354)
Usually I’m not a detractor, but recently we evaluated Casbin and I would not recommend anybody to use it.
Re:Casbin: An authorization library that supports authz mode... by Ideabile on Sunday April 25, 2021 @04:12PM (#26936209)
Some factors where merely psychological, such a mistrust due to misleading partners listed in the website that should use the lib.

For instance one logo is the one of SpaceX, which sadly is just a user group, nothing official. Another mention is Google which I didn’t find any relevant code that gives a hint that Casbin is used by Google in production.

Someone mentions shortcuts in codes; well didn’t got the time to find back all the notes.

But we find several bugs mainly in the implementations that lead us to look somewhere else.

We end-up with CASL.

That doesn’t mean that I don’t like to use Casbin, but already cost me to much time of debugging.

But let me leave with a disclaimer for a later me:

Code mutates like nature does, what it might be true today might be false tomorrow and viceversa, and if you got the time to improve it, just use it.

Don’t get bend by this merely opinion and just investigate and form your own, and always give a second chance, because times changes everything, and sometimes nothing changes.

Re:Casbin: An authorization library that supports authz mode... by tonyhb on Sunday April 25, 2021 @03:08PM (#26935600)
Agree. I ended up going with https://www.openpolicyagent.org/ - it's way, way, way easier to use and integrate with. Policies read better. They're easier to write. They're individually unit testable. The API for OPA is better. Generally I'd recommend OPA over casbin in a heartbeat.
Re:Casbin: An authorization library that supports authz mode... by 1cvmask on Sunday April 25, 2021 @04:34PM (#26936424)
What other solutions did you look at?
Re:Casbin: An authorization library that supports authz mode... by tonyhb on Tuesday April 27, 2021 @10:22PM (#26964731)
OPA, Casbin, Keto (ORY), CEL from Google.
Re:Casbin: An authorization library that supports authz mode... by TameAntelope on Sunday April 25, 2021 @03:18PM (#26935678)
I also evaluated it and implemented an ABAC system for our Node.js app with Casbin in a day. The tooling wasn’t perfect and I probably took a shortcut or two, but I didn’t see any red flags that’d actively make me recommend others not use it, so I’m interested in what you found.
Re:Casbin: An authorization library that supports authz mode... by _skhan_ on Sunday April 25, 2021 @02:46PM (#26935383)
Can you enumerate why no one should use it?
Re:Casbin: An authorization library that supports authz mode... by gerbyzation on Sunday April 25, 2021 @04:09PM (#26936178)
We gave it a try, but got rid of it because we couldn't make it perform well for our usecase. This was quite specific to the implementation and matcher that we used (pycasbin + keyMatcher), having just a few thousand rules ruined our API response times.