patchdemo icon indicating copy to clipboard operation
patchdemo copied to clipboard

Allow site config to be overridden by trusted users

Open edg2s opened this issue 4 years ago • 6 comments

Fixes #19

edg2s avatar Sep 17 '20 14:09 edg2s

This does away with the JSON approach of #60 as that adds no real security.

Instead we can maintain a list of trusted OAuth accounts that will be allowed to use the site config feature.

Anyone who is V+2 can be added to this list, as V+2ers can already execute arbitrary code on the server.

To begin with we should use the regex feature to allow / \(WMF\)$/ as I believe these names are protected.

edg2s avatar Sep 17 '20 14:09 edg2s

Would love to be able to do this, but how exactly does the code detect if a user is V+2? OAuth connects to SUL, and being able to vote V+2 is based on gerrit permissions on an account that may not be connected.

DannyS712 avatar Sep 27 '20 05:09 DannyS712

This patch requires us to manually maintain a list of trusted users.

edg2s avatar Sep 27 '20 11:09 edg2s

I like this but I'd also like to avoid maintaining that list for the rest of my life, hmm…

MatmaRex avatar Oct 02 '20 23:10 MatmaRex

One could host the user list in a Gerrit repo, then v+2ers could add themselves.

edg2s avatar Oct 03 '20 00:10 edg2s

One could host the user list in a Gerrit repo, then v+2ers could add themselves.

That would also require CR+2, though that should not be a problem since the two usually go together. That would also ensure that the list only includes those that want to be included and plan to use the tool

Sounds like a good idea to me. New repo, something like mediawiki/tools/patchdemoconfig (in case the actual code from this ever moves, not using patchdemo) inheriting from mediawiki/* with a simple text file that users are told they can self-merge changes to, file just holds a list of allowed user names

DannyS712 avatar Oct 03 '20 00:10 DannyS712