Open tylerthome opened 4 years ago
Please provide update
Need to complete user flows before defining.
Hi @tylerthome, is this issue still in progress? If not, can you move this issue to the appropriate status column? Thanks!
Hey @tylerthome,
I've done some research into role based endpoint access, and I think I can begin putting together a design to achieve this.
Would it be possible to take over this issue? Thanks
@Joshua-Douglas here's a link to discussion regarding this topic from a little while ago in case it's any help: https://github.com/hackforla/HomeUniteUs/discussions/535
We can't effectively add role based access until we begin authenticating our endpoints. In order to determine if user has the correct role, you first need to verify their identity. This is what authentication helps us achieve.
We can start this issue after #577
Moving this to the dev team, @Joshua-Douglas @erikguntner @paulespinosa completed design and implementation for basic access control and user roles. This sounds like a good issue for someone ready to work with AWS and/or Terraform as we look toward setting up HUU in the incubator
@tylerthome, The user roles PR has been merged. Now each of the endpoints have access to the user's role, and it is easy to implement role-based access control, using naive approaches (e.g. add if user.role != Guest and user.role != Admin: return "invalid user access", 403
).
I can add middleware to encapsulate user access role checks, but that'll take some research. I'm planning to focus on #462, but let me know if more work is required on this issue. Thanks!
Other issues are covering this, but this could be helpful as documentation. Setting as draft until this is turned into an actionable issue. 9/12/24 Ariel Lasry
Overview
Create remaining scopes applicable to each user type within AWS Cognito, and add API route protection in Flask application
Resources/Instructions
Given these resource types:
Create the appropriate scopes in Auth0 and assign appropriate permissions to each role: