Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ip address geolocation lookup #3887

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

aptxx
Copy link

@aptxx aptxx commented Aug 27, 2024

Support ip to geo location #2350

Looking for reviews

MaxMind is implemented. The MaxMind reader returns a 3166-1 Alpha2 country code. We've added a mapping for countrycode that converts the parsed Alpha2 code to Alpha3. To align with prebid-server-java and make it easier for non-developers to configure, the mapping data is stored in the country-codes.csv file within the code repository. This file is will be packaged into the binary at compile time.

The configuration files are mostly ported from the Java version to maintain consistency, so the default configurations are identical. The URL https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz is no longer valid. You now need to register a MaxMind account and get download link.

However, you can anonymously download the MMDB file from here: https://github.com/P3TERX/GeoLite.mmdb. But please remember, you will need to package it yourself into a .tar.gz format.

Configs

New section example:

geolocation:
    enabled: false
    type: maxmind
    maxmind:
        remote_file_syncer:
            http_client:
                max_connections_per_host: 0
                max_idle_connections: 40
                max_idle_connections_per_host: 2
                idle_connection_timeout_seconds: 60
            download_url: "https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz"
            save_filepath: "/var/tmp/prebid/GeoLite2-City.tar.gz"
            tmp_filepath: "/var/tmp/prebid/tmp/GeoLite2-City.tar.gz"
            retry_count: 3
            retry_interval_ms: 3000
            timeout_ms: 300000
            update_interval_ms: 0

GeoLocation feature need actived at account side. For example, actived in default account

account_defaults:
    geolocation:
        enabled: true

Privacy

Considering that the IP needs to be checked for privacy status before use, and to avoid unnecessary processing of private information, we've extracted a more general method to determine the privacy status.

Additionally, following the traffic diagram from Prebid Server and GDPR, we've also implemented the consent_string_means_in_scope configuration option, which can be configured in both account GDPR and global GDPR settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants