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

Update geoip databases to include data about documentation ranges #2450

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mrodm
Copy link
Contributor

@mrodm mrodm commented Mar 4, 2025

Closes #2414
Follows #2408

This PR includes new GeoIP databases including some entries for the documentation prefixes.

Added entries for the following address blocks for documentation in the GeoLite2 JSON files:

  • 192.0.2.0/24
  • 198.51.100.0/24
  • 203.0.113.0/24
  • 2001:DB8::/32

I've tried to use other "real" cities here (Las Vegas, Amsterdam and Madrid) as well as Greenwich (as mentioned in this blog post), and get the data about them using https://www.geonames.org/

This data set in those JSON files is faked just for testing purposes in elastic-package. This could affect system and pipeline tests.

Data added to the databases can be reviewed in this commit: 906b3a6

Moreover, some tests have been added to the isAllowedIPValue function as well as it has been used an IP of the documentation range in the test package apache.

Author's checklist

  • Add documentation
  • Add documentation prefixes into GeoIP databases
    • This data can be reviewed at: 906b3a6

How to test this PR locally

# ensure there is no stack running before doing "stack up"
elastic-package stack down -v

elastic-package stack up -v -d

# test package "apache" includes now an IP from one of the documentation ranges.
cd test/packages/parallel/apache
elastic-package test -v

elastic-package stack down -v

@mrodm mrodm self-assigned this Mar 4, 2025
@mrodm
Copy link
Contributor Author

mrodm commented Mar 5, 2025

test integrations

@elastic-vault-github-plugin-prod

Created or updated PR in integrations repository to test this version. Check elastic/integrations#12962

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to use "real" cities here in the new entries. And for that, I got the data about them (geo codes or latitute/longitude values) using https://www.geonames.org/

The assignation of this ranges to those cities is faked and it is just for testing purposes in elastic-package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you see any issue of using that data here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it can be checked the specific data added (Las Vegas, Amsterdam and Madrid) and the Greenwich entry from this blog post:
906b3a6

@mrodm
Copy link
Contributor Author

mrodm commented Mar 5, 2025

test integrations

@elastic-vault-github-plugin-prod

Created or updated PR in integrations repository to test this version. Check elastic/integrations#12962

@mrodm
Copy link
Contributor Author

mrodm commented Mar 6, 2025

test integrations

@elastic-vault-github-plugin-prod

Created or updated PR in integrations repository to test this version. Check elastic/integrations#12983

mrodm added 2 commits March 6, 2025 13:59
Include documentation about these GeoLite2 databases and how they should
be generated.
@mrodm mrodm force-pushed the update_geoip_databases branch from 88211de to 906b3a6 Compare March 6, 2025 13:18
@mrodm mrodm changed the title [system tests] Update geoip databases to include data about documentation ranges - WIP [system tests] Update geoip databases to include data about documentation ranges Mar 6, 2025
@mrodm mrodm changed the title [system tests] Update geoip databases to include data about documentation ranges Update geoip databases to include data about documentation ranges Mar 6, 2025
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mrodm

@mrodm mrodm marked this pull request as ready for review March 6, 2025 16:56
@mrodm mrodm requested a review from a team March 6, 2025 16:56
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.

Replace Geo IP database used in testing with dummy data
2 participants