Page MenuHomePhabricator

Add proxy information to the API for pulling it in the IP Information box
Closed, ResolvedPublic3 Estimated Story Points

Description

Goal

This task is to add the "proxy" field to the IP Information box.

image.png (648×1 px, 129 KB)

Event Timeline

Niharika triaged this task as Medium priority.Dec 9 2020, 3:25 PM
Niharika created this task.
Niharika renamed this task from Add proxy information to the IP Information box to Add proxy information to the API for pulling it in the IP Information box.Dec 9 2020, 4:13 PM
Niharika updated the task description. (Show Details)

Change 648526 had a related patch set uploaded (by STran; owner: STran):
[mediawiki/extensions/IPInfo@master] [WIP] Add proxy types to the IPifo API call

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

As of writing, the patch only adds the proxy information to the API. @Prtksxna based on T269268#6675315 this data point requires explanation text for the tooltip. Could you provide that text? Should the information tooltip change depending on what value is returned? Which values should be what colors?

It sounds like there can be a few values for proxy type (I'm omitting a few from documentation and the tests' source data actually show there can be some other types but conflicting documentation shows those as either deprecated or doesn't mention them at all):

5 => string 'isAnonymous' (length=11) // Supposedly a catch-all that refers to any proxy use but in the testing data, an IP can return isLegitimateProxy as true but isAnonymous as false
7 => string 'isAnonymousVpn' (length=14)
8 => string 'isHostingProvider' (length=17)
9 => string 'isLegitimateProxy' (length=17) // Refers to corporate proxies
11 => string 'isPublicProxy' (length=13)
12 => string 'isResidentialProxy' (length=18)
14 => string 'isTorExitNode' (length=13)

I also made the assumption that this data is available in the City db as part of the trait attribute. I found evidence that suggested it's only available as part of the Enterprise db but since they share a similar model, we'll just need to change the reader file if that's the case (assuming we can procure the Enterprise db).

Some references I used:
https://dev.maxmind.com/geoip/geoip2/web-services/ This technically describes the web service but it's a fairly comprehensive analog w/most values possible.
https://geoip2.readthedocs.io/en/latest/ This is similar to the documentation provided at https://dev.maxmind.com/geoip/geoip2/web-services/ but contains documentation for enterprise values (explicitly isLegitimateProxy in the Enterprise-Test.mmdb)
https://www.maxmind.com/en/solutions/geoip2-enterprise-product-suite/anonymous-ip-database A db specifically regarding proxies
https://github.com/maxmind/MaxMind-DB/blob/master/source-data/GeoIP2-City-Test.json This City example that does have access to the trait properties
https://github.com/maxmind/MaxMind-DB/blob/master/source-data/GeoIP2-Enterprise-Test.json This Enterprise example that has a lot more traits
https://www.maxmind.com/en/solutions/geoip2-enterprise-product-suite/enterprise-database The exclusive data we might need for this ticket and others
https://www.maxmind.com/en/geoip2-precision-insights More exclusive data points (they have a db version)

As of writing, the patch only adds the proxy information to the API. @Prtksxna based on T269268#6675315 this data point requires explanation text for the tooltip. Could you provide that text? Should the information tooltip change depending on what value is returned? Which values should be what colors?

If it helps, we can add text for all the tooltips as i18n messages in T269766: Display the new pieces of information in the Special:Contributions infobox.

Hey @STran! Could you confirm that I've understood this correctly. The possible values are:

  • Anonymous (what does this mean, aren't all IPs anonymous?)
  • Anonymous VPN
  • Hosting Provider
  • Corporate proxy (or legitimate proxy)
  • Public proxy
  • Residential proxy
  • Tor exit node

Will there only ever be one of these values, or could it be a combination of these too?

@cwylo could you confirm that these values map to what people were looking for in the interviews?


As of writing, the patch only adds the proxy information to the API. @Prtksxna based on T269268#6675315 this data point requires explanation text for the tooltip. Could you provide that text? Should the information tooltip change depending on what value is returned? Which values should be what colors?

If it helps, we can add text for all the tooltips as i18n messages in T269766: Display the new pieces of information in the Special:Contributions infobox.

Yeah, lets do that. I think we can skip the colors for now too (I've noted both these tasks as things I need to figure out)

@Prtksxna

The only information I have regarding the "anonymous" value is from maxmind's docs, which state "This is true if the IP address belongs to any sort of anonymous network." It's unclear to me if in practice, the db actually works this way. I was unable to confirm/deny with the data I do have. We might want to wait and see before we decide to use this more general parameter.

Based on this test data from maxmind (https://github.com/maxmind/MaxMind-DB/blob/master/source-data/GeoIP2-Anonymous-IP-Test.json) it looks like more than one can return true however I do not know what database we'll ultimately end up using and therefore I have absolutely no idea if this level of detail is available to us. Other non-specific test data for databases show a more reductive view (I see a lot of is_anonymous_proxy without further detail. I would like to point out that the documentation states that is a deprecated value!)

tl;dr - maybe 😭

Change 648526 merged by jenkins-bot:
[mediawiki/extensions/IPInfo@master] Add proxy types to the IPinfo API call

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