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

UpdateQueue should require the user to have a queue-specific permission #187

Open
sync-by-unito bot opened this issue Apr 7, 2023 · 1 comment
Open

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Apr 7, 2023

Right now, all a user needs in order to update a queue is permissions.CreateQueue:

https://github.com/G-Research/armada/blob/1476c18bec337b77434c038ec8dea6458ba253ff/internal/armada/server/submit.go#L158-L172

This seems wrong. If I can update a queue, I can change who owns it and who has what permissions, or its resource limits so it can't do useful work. All that seems well beyond the scope of a permission called CreateQueue, which I'd say should allow you only to create queues, not to mess with existing queues.

I propose:

  • adding a queue-specific queue.PermissionVerb called queue.PermissionVerbUpdate
  • renaming global permission permissions.DeleteQueue to permissions.ModifyQueue
  • changing submit.UpdateQueue() to require both queue.PermissionVerbUpdate and permissions.ModifyQueue (but not permissions.CreateQueue

┆Issue is synchronized with this Jira Task by Unito

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Apr 7, 2023

➤ Kevin Hannon commented:

I think this sounds good but should we also keep permissions for deleting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants