Page MenuHomePhabricator

useragent-clienthints API does not work on the SUL3 authentication domain
Closed, ResolvedPublicBUG REPORT

Description

When I set up a local wiki with CentralAuth and CheckUser enabled, and $wgCheckUserLogLogins = true, and a crude approximation of the shared authentication domain, I get

POST https://login.wiki.local.wmftest.net:11048/w/rest.php/checkuser/v0/useragent-clienthints/privatelog/57 500 (Internal Server Error)

This is expected inasmuch as we are intentionally disabling non-authentication-related APIs on the shared domain, but this is sort of authentication related. We should either enable it (that would require adding a new hook to the REST API), or stop CheckUser from making this request (by overriding mw.config.get( 'wgCheckUserClientHintsPrivateEventId' )).

Event Timeline

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

We should either enable it (that would require adding a new hook to the REST API), or stop CheckUser from making this request (by overriding mw.config.get( 'wgCheckUserClientHintsPrivateEventId' )).

It depends on whether this shared authentication domain would ever have CheckUser checks performed. If checks are expected to be performed, for example such as those done currently on login.wikimedia.org by stewards, then we still need to collect this data.

The authentication domain should be acting like the origin wiki and storing the CU data on the origin wiki, i.e., if initiating a login on enwiki, the CU data for that login is stored in the enwiki database, not the authwiki database.

Only account creation CU data is in the loginwiki database, not login events.

It depends on whether this shared authentication domain would ever have CheckUser checks performed.

From the perspective of stewards, the shared domain is not really a thing that exists. They perform the check on some wiki, to get information about actions that happened on that wiki. Some of those actions might have happened via the shared authentication domain; currently gathering client hints for those actions is broken.

Change #1112112 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/CentralAuth@master] Filter REST API endpoints rather than using a blanket ban

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

Change #1112112 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Filter REST API endpoints rather than using a blanket ban

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