-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add Role-Based Access Control (RBAC) to auth? #27
Comments
@SimonLab good question. Thank you for opening this issue for us to capture the discussion/research. Short/Quick AnswerYes, we are going to have RBAC system built-in to Auth as "auth" stands for both "authentication" and "authorisation" which is synonymous for permission. We don't need to over-think it, we just need the concept of Roles, Content Types and levels of Permissions. Longer AnswerThe best way of thinking about Auth is in the context of an Example Application: "Blog". Let's consider a typical publishing platform like Medium. https://en.wikipedia.org/wiki/Medium_(website)
By default we should have at least 7 Roles in the Roles table/schema:
|
Given that we need the concept of roles, privileges and grants in order to regulate access to doors @home dwyl/smart-home-auth-server#1 I'm going to focus on this today. |
If you google for "rbac database schema": https://www.google.com/search?q=rbac+database+schema&tbm=isch Some are more complex than others. Let's create the Database Schemas (Tables) to store our RBAC data,
Next
Next create the
Now create the
|
By putting the roles and permissions resources in an |
Taking a little detour to refresh my knowledge of testing as I want to add the helper function to the |
Didn't learn anything new from reading the official docs. Going to keep searching. 🔍 |
Before:
After:
With 100% coverage. Next: create associations between the Roles and Permissions Schemas. |
Default roles summarised in: #82 (comment) included in next PR. 🔜 #85 🚧 |
Roles deployed to https://dwylauth.herokuapp.com/roles The original question of this issue is answered: Closing. ✅ Any further questions: please open new issues. (thanks!) |
We discuss this morning having a role-based access control system (https://en.wikipedia.org/wiki/Role-based_access_control)
Do we want to have the RBAC implemented inside the auth package or should we create another repository/package for it?
The text was updated successfully, but these errors were encountered: