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/opensearch/mappings/<shortName>.json.static OpenSearchSink.IndexResultcreateIndexFromResource(String baseUrl, String shortName, String mappingsResourceRoot) Creates an index from<mappingsResourceRoot>/<shortName>.json.static OpenSearchSink.IndexResultcreateIndexFromResource(String baseUrl, String shortName, String mappingsResourceRoot, String username, String password) Creates an index from<mappingsResourceRoot>/<shortName>.jsonwith optional basic auth.static List<OpenSearchSink.IndexResult> createSelectedIndexes(String baseUrl, List<String> selectedSources) Creates all indices required by the selected sources; always includes "tool".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/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>.jsonwith 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.
-