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 /opensearch/mappings/<shortName>.json.
    • createIndexFromResource

      public static OpenSearchSink.IndexResult createIndexFromResource(String baseUrl, String shortName, String mappingsResourceRoot)
      Creates an index from <mappingsResourceRoot>/<shortName>.json.
    • createIndexFromResource

      public static OpenSearchSink.IndexResult createIndexFromResource(String baseUrl, String shortName, String mappingsResourceRoot, String username, String password)
      Creates an index from <mappingsResourceRoot>/<shortName>.json with optional basic auth. When username and password are non-null and non-empty, uses basic auth for the request.
    • createSelectedIndexes

      public static List<OpenSearchSink.IndexResult> createSelectedIndexes(String baseUrl, List<String> selectedSources)
      Creates all indices required by the selected sources; always includes "tool".
    • 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.