Class OpenSearchClientWrapper
java.lang.Object
ai.attackframework.tools.burp.utils.opensearch.OpenSearchClientWrapper
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intPushes documents in bulk.static booleanPushes a single document.safeTestConnection(String baseUrl) safeTestConnection(String baseUrl, String username, String password) testConnection(String baseUrl) testConnection(String baseUrl, String username, String password) Tests connectivity with optional basic auth.
-
Constructor Details
-
OpenSearchClientWrapper
public OpenSearchClientWrapper()
-
-
Method Details
-
testConnection
-
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
-
safeTestConnection
public static OpenSearchClientWrapper.OpenSearchStatus safeTestConnection(String baseUrl, String username, String password) -
pushDocument
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 URLindexName- target index namedocument- the document to index (filtered byExportFieldFilter)- Returns:
trueif indexed successfully,falseotherwise
-
pushBulk
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 URLindexName- target index namedocuments- documents to index (each filtered byExportFieldFilter)- Returns:
- number of documents successfully indexed
-