Class OpenSearchSink

java.lang.Object
ai.attackframework.tools.burp.sinks.OpenSearchSink

public class OpenSearchSink extends Object
Creates OpenSearch indices from bundled JSON mapping files.

Clients are obtained via OpenSearchConnector and must not be closed here.

  • Constructor Details

    • OpenSearchSink

      public OpenSearchSink()
  • Method Details

    • createIndexFromResource

      public static OpenSearchSink.IndexResult createIndexFromResource(String baseUrl, String shortName)
      Creates an index from the bundled mapping resource for the logical index key.
    • createIndexFromResource

      public static OpenSearchSink.IndexResult createIndexFromResource(String baseUrl, String shortName, String mappingsResourceRoot)
      Creates an index from the bundled mapping resource for the logical index key.
    • createIndexFromResource

      public static OpenSearchSink.IndexResult createIndexFromResource(String baseUrl, String shortName, String mappingsResourceRoot, String username, String password)
      Creates an index from the bundled mapping resource for the logical index key with optional basic auth. When username and password are non-null and non-empty, uses basic auth for the request.
    • createIndexFromResource

      public static OpenSearchSink.IndexResult createIndexFromResource(String baseUrl, String shortName, String fullIndexName, String mappingsResourceRoot, String username, String password)
      Creates an index from the bundled mapping resource for the logical index key with an explicit full name and optional basic auth.
    • createSelectedIndexes

      public static List<OpenSearchSink.IndexResult> createSelectedIndexes(String baseUrl, List<String> selectedSources)
      Creates all indices required by the selected sources.

      Only source keys recognized by IndexNaming.computeIndexBaseNames(List) produce indices. For example, the Exporter index is created only when the exporter source is selected.

    • createSelectedIndexes

      public static List<OpenSearchSink.IndexResult> createSelectedIndexes(String baseUrl, List<String> selectedSources, String username, String password)
      Creates all indices required by the selected sources with optional basic auth. When username and password are non-null and non-empty, uses basic auth.
    • createSelectedIndexes

      public static List<OpenSearchSink.IndexResult> createSelectedIndexes(String baseUrl, List<String> selectedSources, String username, String password, BooleanSupplier shouldContinue)
      Creates all indices required by the selected sources with optional basic auth. Caller may provide a stop signal to cancel between index creations.