Check API - permissions/authorisation

Stephen Finucane stephen at
Thu Jun 15 20:05:27 AEST 2017

On Thu, 2017-06-15 at 14:37 +1000, Andrew Donnellan wrote:
> On 07/06/17 02:28, Stephen Finucane wrote:
> > On Tue, 2017-06-06 at 21:10 +1000, Daniel Axtens wrote:
> > > What actually is required? We probably want to make this reasonably
> > > granular so that, for example, the 0-day bot can be given the ability
> > > to create checks without needing people to trust them with any other
> > > rights.
> > 
> > We could probably loosen the above conditions: checks are associated
> > with a user and, since we merged '6c0bbe1' and '3fc11fea', it is
> > possible to distinguish which checks a user belongs to. Personally, I
> > would like to use Django Admin's groups or permissions to tag users
> > with CI permissions but this is a good chunk of work and smells of
> > YAGNI. Something even simpler, like letting any registered user create
> > a check, could do the job?
> I'm a little bit uncomfortable with allowing anyone to create checks - 
> the kernel in particular is a large enough project to have contributors 
> who might be well-meaning but will go around contributing unhelpfully 
> and just irritating maintainers. Some of those "contributors" may 
> discover that they can now post checks which label minor static analysis 
> warnings as failures...

Yup, agreed. We don't want to have to reinvent spam filters.

> Maybe that's a problem to solve when we start seeing it, but on the 
> other hand we can expect to be stuck with people running 2.0 for a 
> considerable length of time.

Yes and no. I don't plan to change any dependencies in 2.1, meaning the upgrade
process should be smooth enough. If folks really found this to be an issue, an
upgrade to 2.1 (or whatever version this makes it into) wouldn't be too much of
an ask.

> Russell was talking to mpe today to get the perspective of someone who 
> maintains a fairly important patchwork project, he wasn't overly 
> concerned if we required the user to be a maintainer for the time being, 
> it's a bit annoying to have to ask the patchwork admin to add a new 
> maintainer though.

You're going to have the exact same situation if we add "CI" users. Someone,
somewhere, has to approve these requests if we don't want to simply allow any
user to create checks.

Personally, I think we can keep things as they are now and look towards 2.1
_if_ this is requested by real world Patchwork maintainers. Until then, as
before, YAGNI.


More information about the Patchwork mailing list