Skip to content
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 Access Control #153

Open
Ayush5120 opened this issue Mar 23, 2023 · 0 comments
Open

Add Access Control #153

Ayush5120 opened this issue Mar 23, 2023 · 0 comments
Assignees
Labels
priority: high High priority type: security Related to security workload: days Likely takes days to resolve

Comments

@Ayush5120
Copy link
Contributor

As our system grows, we need to ensure that users only have access to their resources for GET /tasks, GET /tasks/{task-id} and POST /tasks/{task-id}:cancel

Default access control setting would include these rules:

  • For creating a resource (i.e., POST /tasks), we would need to check if a given user is a member of a specific group. We would get this info from the Bearer token. A user creating a resource then becomes its "Owner".

  • Apart from viewing (GET endpoints) and modifying (POST /tasks/{task-id}:cancel) a resource, an "Owner" can also set the access roles for other users for that resource. So for example, if I create a resource and become its "Owner", I could give you an "Owner" role as well.

  • Other roles that *Owners" can assign to other users would be "Maintainer" and "Viewer" (the names of the roles can of course be different, maybe we can find better ones). "Maintainers" would be able to view and cancel jobs, but not modify access permissions. "Viewers" would only be able to view, i.e. get a detailed task info for the particular task, and have it returned to them as part of the list of all tasks.

  • Anyone without any of the roles could not even view the resource. But they may be able to create their own resources (if they are a member of the group).

  • Everyone should be able to access the service info, as long as they are authenticated, i.e., they send along a Bearer token - even if they are not part of the group that grants access to the task/resource creation endpoint.

@Ayush5120 Ayush5120 self-assigned this Mar 23, 2023
@Ayush5120 Ayush5120 added priority: high High priority type: security Related to security workload: days Likely takes days to resolve labels Mar 23, 2023
@Ayush5120 Ayush5120 moved this to Todo in BioHackEU23 Oct 31, 2023
@Ayush5120 Ayush5120 moved this from Todo to In Progress in BioHackEU23 Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high High priority type: security Related to security workload: days Likely takes days to resolve
Projects
Status: In Progress
Development

No branches or pull requests

1 participant