Class OpenSearchSink
java.lang.Object
ai.attackframework.tools.burp.sinks.OpenSearchSink
Creates OpenSearch indices from bundled JSON mapping files.
Clients are obtained via OpenSearchConnector and must not be closed here.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResult of an index creation attempt. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenSearchSink.IndexResultcreateIndexFromResource(String baseUrl, String shortName) Creates an index from the bundled mapping resource for the logical index key.static OpenSearchSink.IndexResultcreateIndexFromResource(String baseUrl, String shortName, String mappingsResourceRoot) Creates an index from the bundled mapping resource for the logical index key.static OpenSearchSink.IndexResultcreateIndexFromResource(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.static OpenSearchSink.IndexResultcreateIndexFromResource(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.static List<OpenSearchSink.IndexResult> createSelectedIndexes(String baseUrl, List<String> selectedSources) Creates all indices required by the selected sources.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.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.
-
Constructor Details
-
OpenSearchSink
public OpenSearchSink()
-
-
Method Details
-
createIndexFromResource
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 theexportersource 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.
-