Page MenuHomePhabricator

Automatic global group membership is updated on unrelated local group changes
Open, Needs TriagePublic

Description

Automatic global group membership is sometimes updated on unrelated local group changes:

Another weird case: https://en.wikibooks.org/w/index.php?title=Special:Log&logid=5292619 caused https://en.wikibooks.org/wiki/Special:Log/gblrights even though the relevant local group (CU) wasn't even changed – and local admins shouldn't be able to do anything that affects global groups: All local/global group changes (CU/OS/GS) which trigger granting/removing GTAIV can only be done by stewards.

I suppose this is because the new global group was not initially populated with the users belonging to relevant local groups, so the change took effect the next time the local group membership was changed in any way?

I think we should fix it by populating the groups with a maintenance script. I am already working on one for the 'local-bot' group from T415588: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralAuth/+/1234540. Should we run the script for the 'global-temporary-account-viewer' group as well?

Event Timeline

Stewards didn’t get GTAIV because it’s redundant to our steward permissions. But it turned out most of us still got the permissions once our local groups changed in a wiki where we hold CU/OS permissions (even when the group change was unrelated to CU/OS like in the example above) or when temporarily granting CU/OS permissions to ourselves to perform actions on a wiki without local CU/OS.
As of today there are just four stewards left without GTAIV https://meta.wikimedia.org/wiki/Special:GlobalUsers?username=&group=steward&limit=100

I suppose this is because the new global group was not initially populated with the users belonging to relevant local groups, so the change took effect the next time the local group membership was changed in any way?

Yes, that would explain it.

I think we should fix it by populating the groups with a maintenance script. I am already working on one for the 'local-bot' group from T415588: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralAuth/+/1234540. Should we run the script for the 'global-temporary-account-viewer' group as well?

Thanks. Yes please, it makes sense to run it for 'global-temporary-account-viewer' too.

Change #1234540 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/CentralAuth@master] Add maintenance script to update automatic global group membership

https://gerrit.wikimedia.org/r/1234540

Change #1234540 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Add maintenance script to update automatic global group membership

https://gerrit.wikimedia.org/r/1234540

Next step: wait for train rollout, then run foreachwikiindblist sul CentralAuth:UpdateAutomaticGlobalGroupMembership --local-group=checkuser --local-group=suppress. This will take care of any outstanding memberships in global-temporary-account-viewer that weren't processed before, per this config for local groups: https://gerrit.wikimedia.org/g/operations/mediawiki-config/+/a13355b072b61df5be4e319f3fdaec6479fb3276/wmf-config/CommonSettings.php#4568 (I checked and all users in the global group global-sysop are already members of the new global group, so there's no need to handle that). Changes will be logged at https://meta.wikimedia.org/wiki/Special:Log/gblrights/Maintenance_script.