Page MenuHomePhabricator

Switching mock data in IP Info for live data
Closed, ResolvedPublic5 Estimated Story PointsOct 20 2020

Description

This task is for us to integrate Maxmind's geoip2 library. The task for security approval on the library is here: T262963: Security Readiness Review For geoip2/geoip2

  1. Add the library to the extension with composer
  2. Add a config variable to where the file is located in the filesystem
  3. Use the freely licensed database for testing
  4. Integrate the library into the extension's InfoManager service
  5. Return the location data through the API from the MaxMind free database

Details

Event Timeline

Niharika triaged this task as Medium priority.Oct 7 2020, 3:54 PM
Niharika created this task.
Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptOct 7 2020, 3:54 PM
ARamirez_WMF set the point value for this task to 5.Oct 7 2020, 4:23 PM
dbarratt removed the point value for this task.
dbarratt set the point value for this task to 5.
ARamirez_WMF changed the subtype of this task from "Task" to "Deadline".

Change 634083 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/IPInfo@master] Replace mock data with data from GeoLite2 database

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

@dbarratt For local reviewing/testing you'll need to do a few things:

  • Get the GeoLite2 databases: https://dev.maxmind.com/geoip/geoip2/geolite2/
  • Put the .mmdb files in the same directory (similar to T264838#6534393)
  • Set $wgIPInfoGeoIP2Path to the database file paths, up to the last common part of the filenames (actually, might want to rethink that to just the path, but that's how the patch currently works...)

Tagging @dom_walden too, but maybe we can set this up on TheGoodPlace so you won't need to test locally.

Change 634083 merged by jenkins-bot:
[mediawiki/extensions/IPInfo@master] Replace mock data with data from GeoLite2 database

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

@dom_walden This can be tested on thegoodplace (thanks to @dbarratt) - let me know if you have any questions.

thegoodplace now shows IP information from MaxMind's GeoLite2.

There are a few errors which are blocking some of the testing of this, e.g. T267398, T267056, T267015.

I haven't tested this on languages other than English, as I don't think we have any translations.

Test Environment: MediaWiki 1.36.0-alpha (4044f5f), CheckUser 2.5 (47b45c2).