Add lookup_private_addresses option to GeoIP processor for internal I…#6770
Conversation
…P enrichment Signed-off-by: Srikanth Padakanti <srikanth_padakanti@apple.com>
|
Hi @dlvenable Please review this. Thanks. |
| }) | ||
| private String whenCondition; | ||
|
|
||
| @JsonProperty("lookup_private_addresses") |
There was a problem hiding this comment.
I think this is a better name than the one from #6769.
The verb here is right - lookup. But we should aim for some consistency with the Confluence change.
See:
https://github.com/opensearch-project/data-prepper/pull/6769/changes#r3196227674
There was a problem hiding this comment.
Kept as lookup_private_addresses — semantically distinct from the Confluence allow_internal_address since this controls MMDB lookup passthrough, not network connectivity validation.
dlvenable
left a comment
There was a problem hiding this comment.
This approach does have slightly different semantics from #6769.
That code has:
if (address.isMulticastAddress() || address.isAnyLocalAddress()) {
throw new BadRequestException(INVALID_URL);
}
So it is disallowing multicast and link-local. I'm not sure we need to disallow that here. But should we aim for closer semantic similarity between the two?
If we are going to allow these, include some unit test cases to make this explicit.
… enabled Signed-off-by: Srikanth Padakanti <srikanth_padakanti@apple.com>
For GeoIP, multicast and link-local won't match MMDB entries so they're harmless to pass through unlike Confluence where connecting to those addresses is a security concern. Added explicit test cases for multicast and link-local to document this is intentional. |
Description
The GeoIP processor currently rejects all private IP addresses, which blocks users who enrich custom MMDB files with internal IPAM data (office, datacenter, department info) from using the processor for internal network traffic like NetFlow or audit logs.
This adds a
lookup_private_addressesconfig option (defaultfalse) to the geoip processor. When set totrue, private and loopback addresses are accepted for enrichment instead of being filtered out.Three production files changed, three test files updated. No new dependencies. Fully backward compatible since the default is false.
Issues Resolved
Resolves #6079
#6079
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.