prebid / prebid-server

Open-source solution for running real-time advertising auctions in the cloud.
https://prebid.org/product-suite/prebid-server/
Apache License 2.0
421 stars 713 forks source link

Do geolookups with unmasked address #3559

Open bretg opened 6 months ago

bretg commented 6 months ago

We got clearance from Prebid legal to do geo-lookups on unmasked IP addresses (ipv4, ipv6) as long as we don’t share the results of the lookup besides these 3 highly aggregated attributes: country, region, and utcoffset.

The flow would be:

  1. Determine whether geo-lookup is necessary. (See flowchart in https://docs.google.com/document/d/1g0zAYc_EfqyilKD8N2qQ47uz0hdahY-t8vfb-vxZL5w/edit#heading=h.8zebax5ncz0t)
  2. Do the geo-lookup on unmasked IP address.
  3. Determine whether IP masking is necessary. (i.e. the transmitPreciseGeo activity, COPPA, LMT, GDPR special purpose 1, etc.) If we need to mask, then:
    1. follow the defined masking rules for ipv4 and ipv6
    2. round device.geo.lat/lon following the defined rules
    3. remove the following device.geo fields: city and zip. (Other fields like accuracy, ipservice, etc are ok)

I believe this is only relevant for PBS-Java since PBS-Go doesn't do geo-lookups.

Note that this is separate from but related to the Extend geolookup feature

bretg commented 5 months ago

Done with PBS-Java 2.13