Skip to content

[RFC] Expose Geo2IP Enrichment feature to other plugins to standardize OpenSearch IP enrichment offering #698

@andy-k-improving

Description

@andy-k-improving

The purpose of this RFC (request for comments) is to gather community feedbacks on a proposal to provide a way to expose the IP enrichment functionality as a registered Action on OpenSearch, which will allow other OpenSearch Plugins to leverage the enrichment, instead of reinventing the wheel.

Problem Statement

At the moment the GeoSpatial plugin do offer IP enrichment feature, however the scope is limited to Document ingestion and also within the GeoSpatial plugin itself.
This segregation will force other Plugin within the eco-system which wish to perform IP conversion to re-invent the wheel to provide the same conversion, even when GeoSpatial plugin is present in the system.
And this result in fragmentation and duplicate effort on the IP enrichment capability for OpenSearch platform as a whole.

Current State

The OpenSearch IP Enrichment under GeoSpatial plugin is only available during document ingestion, however this doesn't cover all the use case, one of the example would be the executing PPL command under the SQL plugin, which there is a need to convert given IP address into location information, such as City name, Country name....etc.
Without the expose of this functionality from GeoSpatial plugin, team from the SQL Plugin will be forced to implement similar if not identical logic, to perform the same operations that GeoSpatial currently provided (Convert the IP string into location data).
This is not desirable from OpenSearch platform perspective, as this will cause further fragmentation on the IP enrichment functionality front.

Proposal

To expose the IP to Geo data conversion into a standalone function and make it accessible via NodeClient.execute( ) during OpenSearch runtime, which allow other plugin to dynamically check and leverage this conversion rather maintaining their own conversion feature.

Approach

To register an new transportAction during the plugin bootstrap time, which is:

  1. A standlone jar module which other plugin can be imported as an interface to perform the IP address lookup.
  2. The jar module should be self contain with all the necessary classes and objects, such as ActionType, ActionRequest and ActionResult.
  3. The jar module should be decoupled with the implementation and allow user (Other plugin) to interact with the CRUD operations of the dataset and perform IP String conversion as needed.

API Design

  • Expose an newlyCreated GeoSpatialNodeClient object which responsible to take an IpEnrichmentActionRequest which is a composite object which contain the following fields:

    • String : IPAddress
    • String / Enum : DataSet provider
  • And return an IpEnrichmentActionResponse which contains:

    • Map<String, Object>: Conversion result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions