packit / packit-service

Packit provided as a service
https://packit.dev
MIT License
37 stars 48 forks source link

Listen to copr `request-permission` and grant admin/builder privilege to packager #2456

Open LecrisUT opened 3 months ago

LecrisUT commented 3 months ago

Description

I occasionally find myself needing to delete older copr build in a packit generated project. Would be nice if packit could listen to a request-permission (probably different event name) and grant builder/admin to the linked project packager.

Not sure if admin can grant further admin privilege, or if packit would need to manage those as well.

What is the impacted category (job)?

Copr builds, General

Workaround

Participation

lachmanfrantisek commented 3 months ago

HIi@LecrisUT !

We've quickly discussed this within a team and it's not so simple:

So, since this would require untrivial work to do right and we can give the permissions manually, I would go with the manual requests for now and if we realise there is a high number of requests, we can think about a proper solution.

What do you think? Do you have any simple solution in mind we can use to reliably+safely provide this to the correct users?

LecrisUT commented 3 months ago

For the case where I needed it, it was because I was:

What do you think? Do you have any simple solution in mind we can use to reliably+safely provide this to the correct users?

There is already ACL between github user and github project, where it checks that the Fedora user has the Github user exposed. What about hooking in the same checks, where we go from Fedora user -> Github user and if the Github user is authorized in the project, then grant admin permissions (if requested)?

lachmanfrantisek commented 3 months ago

@LecrisUT finally getting back to this. Since you mentioned package_review, I have been thinking for some time about having a dedicated project (with Packit setup) for exactly this purpose. The review can happen in the form of a pull request (with CI (build+checks) and human suggestions. I finally need to prepare a prototype of this.

There is already ACL between github user and github project, where it checks that the Fedora user has the Github user exposed. What about hooking in the same checks, where we go from Fedora user -> Github user and if the Github user is authorized in the project, then grant admin permissions (if requested)?

Yes, sounds valid. I am putting it into the backlog and wait if others would be interested in this.