Page MenuHomePhabricator

Create MediaWiki maintenance script to migrate older TOTP devices to modern TOTP + Recovery Codes configuration
Closed, ResolvedPublic

Description

This isn't urgent, as the current refactoring being completed under FY2025-26 WE4.6.2 Multiple Authenticators is being designed to accommodate both the current (soon to be "older") way of storing TOTP keys with scratch tokens and recovery codes as their own factor. But we will want to create a maintenance script to migrate the older TOTP devices within oathauth_devices to the "newer" state, where recovery codes will be decoupled as their own separate factor. The script should also encrypt (introduced in I0aaeb17ed) older TOTP secrets if they have not yet been converted.

Event Timeline

Change #1191390 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/OATHAuth@master] Add maintenance script to migrate recovery tokens to their own device

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

sbassett changed the task status from Open to In Progress.Sep 28 2025, 2:12 PM
sbassett assigned this task to Reedy.

Change #1191390 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@master] Add maintenance script to migrate recovery tokens to their own device

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

Change #1198162 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/OATHAuth@wmf/1.45.0-wmf.24] Add maintenance script to migrate recovery tokens to their own device

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

Change #1198163 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/OATHAuth@wmf/1.45.0-wmf.23] Add maintenance script to migrate recovery tokens to their own device

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

Change #1198162 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@wmf/1.45.0-wmf.24] Add maintenance script to migrate recovery tokens to their own device

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

Change #1198163 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@wmf/1.45.0-wmf.23] Add maintenance script to migrate recovery tokens to their own device

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