-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Add MaxMind GeoIP2 Anonymous IP support #5586
Conversation
Welcome @adiov! |
Hi @adiov. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @bowei |
/ok-to-test |
@adiov please don't assign PRs manually |
/retest |
/lgtm |
@adiov thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adiov, aledbf The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
The NGINX Ingress Controller already has extensive support for many MaxMind's GeoIP2 databases. It is, however, missing support for another crucial MaxMind GeoIP2 database, the GeoIP2 Anonymous IP database. This PR adds support for it in a way that conforms to the way other MaxMind databases are supported.
For those with licence to the GeoIP2 Anonymous IP database, an additional entry to
--maxmind-edition-ids
can be supplied as such:This will trigger the existing database download and checking flow. If the database is downloaded successfully or is made available with a mounted volume, this PR exposes 3 new variables:
$geoip2_is_anon
,$geoip2_is_hosting_provider
, and$geoip2_is_public_proxy
. Those variables can then be freely used in aConfigMap
to add further functionality, such as annotating logs or blocking requests altogether.Types of changes
Which issue/s this PR fixes
How Has This Been Tested?
With the new template loaded, new
proxy_set_header
lines to the deployment'sconfig.yaml
were added as such:After deployment, requests from AWS EC2 and Tor were sent to one of the Ingress endpoints. The forwarded requests were observed to have the correct header values indicating that the requests were "anonymous" or came from a hosting provider.
Checklist: