Class OpenSearchClientWrapper

java.lang.Object
ai.attackframework.tools.burp.utils.opensearch.OpenSearchClientWrapper

public class OpenSearchClientWrapper extends Object
  • Constructor Details

    • OpenSearchClientWrapper

      public OpenSearchClientWrapper()
  • Method Details

    • testConnection

      public static OpenSearchClientWrapper.OpenSearchStatus testConnection(String baseUrl)
    • testConnection

      public static OpenSearchClientWrapper.OpenSearchStatus testConnection(String baseUrl, String username, String password)
      Tests connectivity with optional basic auth. Performs a raw GET / so logs show the actual HTTP version and status line from the wire; on 200 parses the response body for version/distribution.
    • safeTestConnection

      public static OpenSearchClientWrapper.OpenSearchStatus safeTestConnection(String baseUrl)
    • safeTestConnection

      public static OpenSearchClientWrapper.OpenSearchStatus safeTestConnection(String baseUrl, String username, String password)
    • pushDocument

      public static boolean pushDocument(String baseUrl, String indexName, Map<String,Object> document)
      Pushes a single document. Delegates to the retry coordinator (one attempt, then queue on failure).

      Documents are filtered to include only fields enabled in the Fields panel before push.

      Parameters:
      baseUrl - OpenSearch base URL
      indexName - target index name
      document - the document to index (filtered by ExportFieldFilter)
      Returns:
      true if indexed successfully, false otherwise
    • pushBulk

      public static int pushBulk(String baseUrl, String indexName, List<Map<String,Object>> documents)
      Pushes documents in bulk. Delegates to the retry coordinator (retries with backoff, then queue failed items).

      Documents are filtered to include only fields enabled in the Fields panel before push.

      Parameters:
      baseUrl - OpenSearch base URL
      indexName - target index name
      documents - documents to index (each filtered by ExportFieldFilter)
      Returns:
      number of documents successfully indexed