Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import java.nio.file.Paths

buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "3.2.0-SNAPSHOT")
opensearch_version = System.getProperty("opensearch.version", "3.3.0-SNAPSHOT")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
version_tokens = opensearch_version.tokenize('-')
Expand Down Expand Up @@ -263,6 +263,7 @@ dependencies {
resolutionStrategy {
// Some other plugin dependencies that don't use version catalog conflict here
force("com.google.guava:guava:${versions.guava}")
force("org.slf4j:slf4j-api:${versions.slf4j}")

if (System.getenv('REMOTE_METADATA_SDK_IMPL') == 'ddb-client') {
// OpenSearch Java client brings in different versions of the below dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
import org.opensearch.ml.common.connector.ConnectorAction.ActionType;
import org.opensearch.ml.common.transport.connector.MLCreateConnectorInput;
import org.opensearch.ml.common.transport.connector.MLCreateConnectorResponse;
import org.opensearch.secure_sm.AccessController;

import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
Expand Down Expand Up @@ -142,9 +140,9 @@ public void onFailure(Exception ex) {
} catch (IllegalArgumentException iae) {
logger.error("IllegalArgumentException in connector configuration", iae);
throw new FlowFrameworkException("IllegalArgumentException in connector configuration", RestStatus.BAD_REQUEST);
} catch (PrivilegedActionException pae) {
logger.error("PrivilegedActionException in connector configuration", pae);
throw new FlowFrameworkException("PrivilegedActionException in connector configuration", RestStatus.UNAUTHORIZED);
} catch (Exception e) {
logger.error("Exception in connector configuration", e);
throw new FlowFrameworkException("Exception in connector configuration", RestStatus.UNAUTHORIZED);
}

MLCreateConnectorInput mlInput = MLCreateConnectorInput.builder()
Expand All @@ -170,10 +168,10 @@ public String getName() {
return NAME;
}

private static Map<String, String> getParameterMap(Object parameterMap) throws PrivilegedActionException {
private static Map<String, String> getParameterMap(Object parameterMap) throws Exception {
Map<String, String> parameters = new HashMap<>();
for (Entry<String, String> entry : getStringToStringMap(parameterMap, PARAMETERS_FIELD).entrySet()) {
AccessController.doPrivileged((PrivilegedExceptionAction<Void>) () -> {
AccessController.doPrivilegedChecked(() -> {
parameters.put(entry.getKey(), entry.getValue());
return null;
});
Expand Down
Loading