Page MenuHomePhabricator

Stop using loginwiki as a configuration source during SUL3 central login
Closed, ResolvedPublic

Description

We are still using loginwiki for some CentralAuth operations, not directly, but via auth.wikimedia.org/loginwiki. loginwiki is fragile due to its nonstandard configuration and inviting that fragility into critical authentication pathways is not great (see e.g. T401843: Logging in on beta metawiki throws `Wikimedia\Services\NoSuchServiceException: No such service: CommunityConfiguration.ProviderFactory`). There were reasons to use that wiki when we still had a fallback to login.wikimedia.org but I don't think there's a reason for it today.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1181766 had a related patch set uploaded (by D3r1ck01; author: Derick Alangi):

[mediawiki/extensions/CentralAuth@master] CentralDomainUtils: Use another wiki for SUL3 domain central instead

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

We may need to introduce a configuration that will be used instead of $wgCentralAuthLoginWiki; we were discussing using metawiki. I've seen some instances of such a concept in our production configuration, like

So maybe something more general for CentralAuth might help here, and can be reused for other similar purposes within the CA codebase, like: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralAuth/+/1176315

Change #1183216 had a related patch set uploaded (by D3r1ck01; author: Derick Alangi):

[operations/mediawiki-config@master] SUL3: Use `metawiki` as central wiki

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

Change #1183216 merged by jenkins-bot:

[operations/mediawiki-config@master] SUL3: Use `metawiki` as central wiki

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

Mentioned in SAL (#wikimedia-operations) [2025-09-01T13:03:50Z] <lucaswerkmeister-wmde@deploy1003> Started scap sync-world: Backport for [[gerrit:1183216|SUL3: Use metawiki as central wiki (T402527)]]

Mentioned in SAL (#wikimedia-operations) [2025-09-01T13:07:42Z] <lucaswerkmeister-wmde@deploy1003> d3r1ck01, lucaswerkmeister-wmde: Backport for [[gerrit:1183216|SUL3: Use metawiki as central wiki (T402527)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-09-01T13:13:27Z] <lucaswerkmeister-wmde@deploy1003> Finished scap sync-world: Backport for [[gerrit:1183216|SUL3: Use metawiki as central wiki (T402527)]] (duration: 09m 36s)

Change #1181766 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Enable using another wiki for SUL3 central login instead

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

Post-deployment testing & monitoring

This seems to be already working on testwiki (checked a few minutes ago). I was able to log in to testwiki successfully and confirm that edge-login works too. Additionally, the checkLoggedIn endpoint is hit with the correct central wiki (when you click the login link).

Screenshot 2025-09-02 at 11.50.56 AM.png (1×3 px, 364 KB)
Screenshot 2025-09-02 at 11.52.53 AM.png (794×3 px, 318 KB)
Screenshot 2025-09-02 at 11.53.21 AM.png (1×3 px, 351 KB)

Thanks for resolving @matmarex.

Post-deployment testing & monitoring

Tested on 2 group1 wikis today (hewiki and metawiki) and everything seems to work as expected.

metawiki-test.png (1×3 px, 408 KB)
hewiki-test.png (1×3 px, 432 KB)
Tgr renamed this task from Stop using loginwiki during SUL3 central login to Stop using loginwiki as a configuration source during SUL3 central login.Sep 5 2025, 9:03 AM
Post-deployment testing & monitoring

Tested on group2 today (enwiki) and everything seems to work as expected.

Screenshot 2025-09-05 at 3.22.17 PM.png (1×3 px, 552 KB)
Screenshot 2025-09-05 at 3.22.56 PM.png (1×3 px, 614 KB)