Page MenuHomePhabricator

Provide fallbacks when source is missing data
Closed, DeclinedPublic

Description

As of writing, we've deprecated use of the Enterprise MaxMind database in favor of IPoid (Spur) (T361884: Remove $wgIPInfoGeoIP2EnterprisePath from production config). From T355392: Confirm and update what information IPInfo users should be able to see, Spur's database is missing IPs (see other ticket for details) which could be covered by MaxMind's GeoLite2 databases.

Historically, we decided to prefer MaxMind's location/asn/isp data over Spur but 1. never wrote in fallback functionality and 2. never returned that data from Spur. However now that we no longer use the Enterprise dataset, we might instead choose to prioritize Spur in all cases and fall back to MaxMind's Asn/City databases when Spur lacks the data( specifically, this is happening when Spur is missing the entire IP object as opposed to just the location/organization data, which it flat out isn't passing back).

Acceptance Criteria:

  • Confirm that GeoLite2 data is being passed through (the handlers already exist but may not be in use)
  • Implement a fallback to MaxMind data when Spur is missing the data (location from City.mmdb, asn from ASN.mmdb)

Bonus Criteria:

  • Pass back location/org data from Spur (They're already being saved to the database)
  • Implement Spur as a source for these data points in widgets

Event Timeline

STran renamed this task from Investigate: Should IPInfo fallback to IPoid values if MaxMind doesn't provide them? to Provide fallbacks when source is missing data.May 21 2024, 2:39 PM
STran updated the task description. (Show Details)

Change #1036304 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/IPInfo@master] DefaultPresenter: Only allow users with "view full" ability to see IPoidInfo

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

Change #1036305 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/IPInfo@master] DefaultPresenter: Copy asn, location, organization fields into "view basic"

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

IPInfo, with "view basic" right:

master branch
image.png (1×1 px, 206 KB)
using GeoLite2 data
with patch
image.png (1×1 px, 216 KB)
ASN, organization, and more detailed location information provided

IPInfo, with "view full" right:

master branch{
image.png (1×1 px, 237 KB)
size=fit}
using GeoLite2 + IPoid data
with patch
image.png (1×1 px, 237 KB)
(no difference)

@kostajh did you accidentally use the screenshot for IPInfo, with "view full" right twice or is there actually no difference?

@kostajh did you accidentally use the screenshot for IPInfo, with "view full" right twice or is there actually no difference?

There's no difference, so I reused the same file in the screenshot. I updated my comment to clarify that.

The patches in this task are on hold pending clarification from the Legal, Safety & Security Service Center

kostajh changed the task status from Open to Stalled.Jun 25 2024, 10:42 AM

The patches in this task are on hold pending clarification from the Legal, Safety & Security Service Center

I've asked @Niharika to have a look at this thread in Asana. I think we can move this to next sprint.

Noting here that the conversation with Legal is in progress. We'll likely need to push this to the next sprint.

Noting here that the conversation with Legal is in progress. We'll likely need to push this to the next sprint.

This conversation concluded, so next step is to update the task description with the outcome.

Change #1036305 abandoned by Kosta Harlan:

[mediawiki/extensions/IPInfo@master] DefaultPresenter: Copy asn, location, organization fields into "view basic"

Reason:

T375086

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

Change #1036304 abandoned by Kosta Harlan:

[mediawiki/extensions/IPInfo@master] DefaultPresenter: Only allow users with "view full" ability to see IPoidInfo

Reason:

T375086

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