armada
armada copied to clipboard
UpdateQueue should require the user to have a queue-specific permission
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.PermissionVerbcalledqueue.PermissionVerbUpdate - renaming global permission
permissions.DeleteQueuetopermissions.ModifyQueue - changing
submit.UpdateQueue()to require bothqueue.PermissionVerbUpdateandpermissions.ModifyQueue(but notpermissions.CreateQueue
I think this sounds good but should we also keep permissions for deleting.
Closing, no activity.