We need to create user permissions exactly like on Trello. Are there any APIs, libraries, tools or do we have to build it from scratch? This seems like a daunting task, any recommendations would be highly appreciated!
https://help.trello.com/article/791-changing-permissions-on-a-board
thanks, guys
Django comes with permissions. Nominal use is 1. Create group, 2. Assign permissions to groups, 3. Add users to groups. Whether you use it or not the docs can give you one view.
Thanks for the answer Rab!
You may find some solutions out there, and most of the are likely undeveloped or don't really sufficiently support in-depth use cases. For instance you can go with Django, but you'll find in a few weeks/months that it doesn't grant you what you really need.
You might also find that some authN providers give you claims. That also isn't going to get you what you need and is also a terrible user experience.
The reason I say is my experience in the development of permissions models. We specifically went out and tried to find good solutions to problems like this, but ended up needing to build our own. We tried open source versions and still got us no where. As a result we've opened up our implementation as something that others can utilize which comes with all the features and flavors of user permissions you could ever need.
Even using something built into your framework, you'll likely end up on this unfortunate path
Lol you share a pretty pessimistic but nonetheless insightful view on implementing user identity with a 3rd party Auth. Would you mind sharing the authN providers you've experimented with?
AuthN is different from AuthZ. You asked the best way to handle AuthZ in your post, I'm biased because we are the leader in IAMaaS space, so I'll hold off mentioning our product.
For AuthN, pretty much everything:
We have tons of experience because we have to integrate with any AuthN that our users ask for and our engineers generally have been responsible for security in previous enterprise companies. So lot's of pain to go around :).
Is Django the one that makes it difficult to implement granular permissions or is that keycloak?
Roles/permissions can definitely be large task, especially if they weren't considered from the get go. I would definitely see if there are any libraries in your chosen programming language and/or framework that you can leverage to start you off. For example, I'm currently using Rails and have used Pundit (https://github.com/varvet/pundit) with much success.
That being said, Pundit in particular doesn't make any assumptions about how a user's roles/permissions are stored, but you may be able to find one that does. This StackOverflow answer with an SQL schema for storing RBAC data also seems to be a good starting point: https://stackoverflow.com/q/190257/583478
With anything authentication/authorization based, I generally find Auth0 to be
a good resource. Even if you don't end up using their service they typically have informative articles, and, at the very least, you could consider modeling your own system like theirs: https://auth0.com/docs/users/assign-permissions-to-users
Thanks Chris! much appreciated
Authentication at the server (JWTs) and authorization at the database (row level security).
thanks bryce I'll look into that
I've read that you're using Node.js and I'm assumung you're using dome kind of library/framework that supports middleware.
I'd write a custom middleware that accepts or rejects a request based on what group does user authenticated user belongs to.
Thanks adem! good idea
Both what @rab and @cbaclig are good answers.
A couple questions:
Both matter for whether you outsource or build.
Thanks for taking the time David!
1 - We'd like to control the user rights (admin, normal, observer), we use forestadmin for our admin panel.
2 - I forgot to mention it! Nodejs, react and MongoDB