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

Add support for the 'Anonymous IP' database to the geoip processor #107287

Merged
merged 14 commits into from
Apr 11, 2024

Conversation

joegallo
Copy link
Contributor

@joegallo joegallo commented Apr 9, 2024

Closes #90789

Adds support for the 'GeoIP2 Anonymous IP' database from MaxMind to the geoip processor.

The geoip processor will automatically download the various 'GeoLite2' databases, but the 'GeoIP2 Anonymous IP' database is not a 'GeoLite2' database -- it's a commercial database available to those with a suitable license from MaxMind.

The support that is being added for it in this PR is in line with the support that we already have for MaxMind's 'GeoIP2 City' and 'GeoIP2 Country' databases -- that is, one would need to arrange their own download management via some custom endpoint or otherwise arrange for the relevant file(s) to be in the $ES_CONFIG/ingest-geoip directory on the nodes of the cluster.

Put the default fields for the city database in the same order as the
valid fields for the city database. Interestingly, the 'TIMEZONE' (and
the 'IP') are the only valid non-default properties.
@joegallo joegallo added >enhancement WIP :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP Team:Data Management Meta label for data/management team v8.14.0 labels Apr 9, 2024
@joegallo joegallo requested a review from masseyke April 9, 2024 20:53
@joegallo
Copy link
Contributor Author

@masseyke and I talked about the source of the GeoIP2-Anonymous-IP-Test.mmdb that I've added here -- it's from https://github.com/maxmind/MaxMind-DB/tree/main/test-data. That's the same as all the rest of our ${whatever}-Test.mmdb files, and we have many of them in little nooks and crannies sprinkled around the Elasticsearch codebase.

As follow up work after this PR, I would like to organize, update, and document all those files so that their provenance is clear.

Rather, they're the object properties under which those values will be
written within a containing 'location' object, if the 'location'
property has been selected.
and use a more general term instead. Maxmind seems to consistently
refer to the GeoLite2 databases as 'GeoLite2 databases' and to their
commercial offerings as 'GeoIP2 databases' -- both of them are 'IP
geolocation databases' (which appears to me to be a generic term that
applies to both their free and commercial databases as well as the
things that others in the industry might provide).
nor are any 'included in the module'.
@joegallo joegallo removed the WIP label Apr 10, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Collaborator

Hi @joegallo, I've created a changelog YAML for you.

@joegallo

This comment was marked as outdated.

@joegallo
Copy link
Contributor Author

I merged in main and accounted for the new work that has to be done to account for #107000 in the merge commit.

@joegallo joegallo merged commit 5266f79 into elastic:main Apr 11, 2024
14 checks passed
@joegallo joegallo deleted the ingest-geoip-processor-anonymous-ip branch April 11, 2024 18:05
@joegallo
Copy link
Contributor Author

Related to #101080

yaauie added a commit to yaauie/logstash-filter-elastic_integration that referenced this pull request Apr 23, 2024
Catches up with Elasticsearch 8.14+ support for user-provided databases:
 - `Anonymous-IP` elastic/elasticsearch#107287
 - `Enterprise` elastic/elasticsearch#107377

When compiled against Elasticsearch < 8.14, these methods neither exist in the
interface nor are reachable by the GeoIP processor.

Co-authored-by: Joe Gallo <joegallo@gmail.com>
yaauie added a commit to elastic/logstash-filter-elastic_integration that referenced this pull request Apr 23, 2024
Catches up with Elasticsearch 8.14+ support for user-provided databases:
 - `Anonymous-IP` elastic/elasticsearch#107287
 - `Enterprise` elastic/elasticsearch#107377

When compiled against Elasticsearch < 8.14, these methods neither exist in the
interface nor are reachable by the GeoIP processor.

Co-authored-by: Joe Gallo <joegallo@gmail.com>
joegallo added a commit to joegallo/elasticsearch that referenced this pull request Jun 3, 2024
The same highlight also serves for elastic#107287, but I don't know an
especially elegant way of making one highlight do double duty, so I
did it the naive way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >enhancement release highlight Team:Data Management Meta label for data/management team v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GeoIP processor support for Maxmind Anonymous-IP-Database
4 participants