Page MenuHomePhabricator

Expand 2FA Opt-In Privileges
Closed, ResolvedPublic

Description

We want to expand the amount of users who have 2FA access. We can do this by creating a hook that will look at user IDs and if that user ID ends in 0, they are added to the oathauth-tester group which only grants the privilege to access 2FA (oathauth-enable). Users will only be added to the oathauth-tester group if they are not already members of another group that grants the oathauth-enable right.

Currently users without email addresses and temporary accounts are not included in this rollout.

Once we have settled at 100% of users have 2FA access we need to remove all of the configuration that made this possible:

  • The percentage setting
  • The code/hook that powers the percentage setting
  • The oathauth-twofactorauth group

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Users will only be added to the oathauth-tester group if they are not already members of any other group.

Any other group?

Not sure how to make that more clear. If a randomly selected user (part of whatever percent rollout we are doing) is not a member of any of the other global groups then they get added to the oathauth-tester group.

Catrope updated the task description. (Show Details)

I've attempted to clarify the task description. I would also suggest that it might be easier not to add the randomly selected users to the oathauth-tester group, but instead to use a UserGetRights hook that just adds the oathauth-enable right directly if the last two digits of the user ID are less than 05 or whatever.

What is the benefit of adding the right directly vs adding users to a group?

What is the benefit of adding the right directly vs adding users to a group?

If not done correctly, it can basically kill the database by adding millions of rows to tables in our production that are already under stress. Maybe there are other reasons too.

Affected users should somehow be awared that they can enable 2FA.

I've separated the implementation of the mechanism into a subtask (T400579), so that we can later add additional subtasks under here for the rollout itself (increasing the percentage of users who have 2FA enabled from 0% to 10%, probably with steps in between).

Affected users should somehow be awared that they can enable 2FA.

@Bugreporter We're actually intentionally rolling this out quietly (though in public for anyone paying attention), so that we can first get a handle on bugs, support load, and general stability before we start proactively evangelizing this to users.

It is confusing if a number of new Wikimedians are friends, some can enable 2FA and some can not. So we should at least describe (to those 2FA available) 2FA for everyone is a preview feature in A/B testing.

Can we put this on User-notice, we don't need to evangelize it yet, but since APIs now return this "secret" user-right 😄, it might be useful to tell people about it so that they are not taken by surprise (had a conversation with folks on the Wikimedia Discord server about the existence of the userright.)

Mstyles added a subscriber: sgrabarczuk.

@Soda I'm working with @sgrabarczuk to figure out the best approach for Tech News. Thank you for bringing it up here

Change #1191100 had a related patch set uploaded (by Mstyles; author: Mstyles):

[operations/mediawiki-config@master] OATHAuth: Increase 2FA opt-in to 20% of users

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

Change #1191100 merged by jenkins-bot:

[operations/mediawiki-config@master] OATHAuth: Increase 2FA opt-in to 20% of users

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

Change #1193941 had a related patch set uploaded (by Mstyles; author: Mstyles):

[operations/mediawiki-config@master] OATHAuth: Increase 2FA opt-in to 40% of users

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

Change #1193941 merged by jenkins-bot:

[operations/mediawiki-config@master] OATHAuth: Increase 2FA opt-in to 40% of users

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

Mentioned in SAL (#wikimedia-operations) [2025-10-07T20:04:24Z] <mstyles@deploy2002> Started scap sync-world: Backport for [[gerrit:1193941|OATHAuth: Increase 2FA opt-in to 40% of users (T399664)]]

Mentioned in SAL (#wikimedia-operations) [2025-10-07T20:08:42Z] <mstyles@deploy2002> mstyles: Backport for [[gerrit:1193941|OATHAuth: Increase 2FA opt-in to 40% of users (T399664)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-10-07T20:13:50Z] <mstyles@deploy2002> Finished scap sync-world: Backport for [[gerrit:1193941|OATHAuth: Increase 2FA opt-in to 40% of users (T399664)]] (duration: 09m 08s)

Change #1203535 had a related patch set uploaded (by Mstyles; author: Mstyles):

[operations/mediawiki-config@master] OATHAuth: Increase 2FA opt-in to 60% of users

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

Change #1203535 merged by jenkins-bot:

[operations/mediawiki-config@master] OATHAuth: Increase 2FA opt-in to 70% of users

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

Mentioned in SAL (#wikimedia-operations) [2025-11-10T23:08:28Z] <catrope@deploy2002> Started scap sync-world: Backport for [[gerrit:rMW1203097935b3|i18n: Update wikimedia-emailauth-login-help to link to Special:AccountRecovery (T399749)]], [[gerrit:1203126|OATHManage: Don't always set the page title to "Create new recovery codes"]], [[gerrit:1203535|OATHAuth: Increase 2FA opt-in to 70% of users (T399664)]]

Mentioned in SAL (#wikimedia-operations) [2025-11-10T23:34:11Z] <catrope@deploy2002> catrope, mstyles: Backport for [[gerrit:rMW1203097935b3|i18n: Update wikimedia-emailauth-login-help to link to Special:AccountRecovery (T399749)]], [[gerrit:1203126|OATHManage: Don't always set the page title to "Create new recovery codes"]], [[gerrit:1203535|OATHAuth: Increase 2FA opt-in to 70% of users (T399664)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can no

Mentioned in SAL (#wikimedia-operations) [2025-11-11T00:11:51Z] <catrope@deploy2002> Started scap sync-world: Backport for [[gerrit:rMW1203097935b3|i18n: Update wikimedia-emailauth-login-help to link to Special:AccountRecovery (T399749)]], [[gerrit:1203126|OATHManage: Don't always set the page title to "Create new recovery codes"]], [[gerrit:1203535|OATHAuth: Increase 2FA opt-in to 70% of users (T399664)]]

Mentioned in SAL (#wikimedia-operations) [2025-11-11T00:15:28Z] <catrope@deploy2002> catrope, mstyles: Backport for [[gerrit:rMW1203097935b3|i18n: Update wikimedia-emailauth-login-help to link to Special:AccountRecovery (T399749)]], [[gerrit:1203126|OATHManage: Don't always set the page title to "Create new recovery codes"]], [[gerrit:1203535|OATHAuth: Increase 2FA opt-in to 70% of users (T399664)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can no

Mentioned in SAL (#wikimedia-operations) [2025-11-11T00:22:47Z] <catrope@deploy2002> Finished scap sync-world: Backport for [[gerrit:rMW1203097935b3|i18n: Update wikimedia-emailauth-login-help to link to Special:AccountRecovery (T399749)]], [[gerrit:1203126|OATHManage: Don't always set the page title to "Create new recovery codes"]], [[gerrit:1203535|OATHAuth: Increase 2FA opt-in to 70% of users (T399664)]] (duration: 10m 56s)

The oathauth-enable right

3rd party wikis may still only allow certain user using 2FA (since they may have few people handling account recovery requests). Alternatively we can assign it to user in Wikimedia projects and MediaWiki default and remove it from other groups currently holding that right.

The oathauth-enable right

3rd party wikis may still only allow certain user using 2FA (since they may have few people handling account recovery requests). Alternatively we can assign it to user in Wikimedia projects and MediaWiki default and remove it from other groups currently holding that right.

@Bugreporter thanks for the heads up. We definitely want to be mindful of 3rd party wikis

Change #1213563 had a related patch set uploaded (by Mstyles; author: Mstyles):

[mediawiki/extensions/OATHAuth@master] Increase 2FA access to most users

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

Change #1213585 had a related patch set uploaded (by Mstyles; author: Mstyles):

[operations/mediawiki-config@master] OATHAuth: Expand 2FA to all users

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

Change #1213585 merged by jenkins-bot:

[operations/mediawiki-config@master] OATHAuth: Expand 2FA to all users

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

Mentioned in SAL (#wikimedia-operations) [2025-12-03T21:17:04Z] <dani@deploy2002> Started scap sync-world: Backport for [[gerrit:1214494|Increase coverage of 2025 Global Readers Survey (non-enwiki) (T410918)]], [[gerrit:1213585|OATHAuth: Expand 2FA to all users (T399664)]]

Mentioned in SAL (#wikimedia-operations) [2025-12-03T21:19:40Z] <dani@deploy2002> dani, mstyles: Backport for [[gerrit:1214494|Increase coverage of 2025 Global Readers Survey (non-enwiki) (T410918)]], [[gerrit:1213585|OATHAuth: Expand 2FA to all users (T399664)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-12-03T21:28:21Z] <dani@deploy2002> Finished scap sync-world: Backport for [[gerrit:1214494|Increase coverage of 2025 Global Readers Survey (non-enwiki) (T410918)]], [[gerrit:1213585|OATHAuth: Expand 2FA to all users (T399664)]] (duration: 11m 18s)

Change #1213563 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@master] Remove configuration for 2FA Opt In

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

Change #1214659 had a related patch set uploaded (by Mstyles; author: Mstyles):

[operations/mediawiki-config@master] OATHAuth: Remove wmgOATHAuthDisableRight

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

Change #1214659 merged by jenkins-bot:

[operations/mediawiki-config@master] OATHAuth: Remove wmgOATHAuthDisableRight

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

Mentioned in SAL (#wikimedia-operations) [2025-12-04T21:14:03Z] <jforrester@deploy2002> Started scap sync-world: Backport for [[gerrit:1215251|[tokwiki] Allow sysops to grant/remove confirmed status (T411683)]], [[gerrit:1214659|OATHAuth: Remove wmgOATHAuthDisableRight (T399664)]], [[gerrit:1214143|Remove /data-parsoid/ endpoint from specs per T393557 (T411517)]], [[gerrit:1215263|Shorten 'close' cookie wait period for enwiki banners (T411800)]]

Mentioned in SAL (#wikimedia-operations) [2025-12-04T21:18:17Z] <jforrester@deploy2002> mstyles, aaron, superpes, jforrester, ejegg: Backport for [[gerrit:1215251|[tokwiki] Allow sysops to grant/remove confirmed status (T411683)]], [[gerrit:1214659|OATHAuth: Remove wmgOATHAuthDisableRight (T399664)]], [[gerrit:1214143|Remove /data-parsoid/ endpoint from specs per T393557 (T411517)]], [[gerrit:1215263|Shorten 'close' cookie wait period for enwiki banners (T411800)]] synced to the t

Mentioned in SAL (#wikimedia-operations) [2025-12-04T21:24:07Z] <jforrester@deploy2002> Finished scap sync-world: Backport for [[gerrit:1215251|[tokwiki] Allow sysops to grant/remove confirmed status (T411683)]], [[gerrit:1214659|OATHAuth: Remove wmgOATHAuthDisableRight (T399664)]], [[gerrit:1214143|Remove /data-parsoid/ endpoint from specs per T393557 (T411517)]], [[gerrit:1215263|Shorten 'close' cookie wait period for enwiki banners (T411800)]] (duration: 10m 04s)

Mstyles moved this task from Backlog to Done on the FY2025-26 WE4.6.3 Global 2FA Opt-In board.

As all of the cleanup work is either merged or deployed and all users have access to 2FA, I'm marking this as resolved.