diff --git a/NOTICE b/NOTICE index 788e00b04d2e28df5326226673ce367571cec450..db8ce84bbd129fbc9efdce11349b0dc53b34d11c 100644 --- a/NOTICE +++ b/NOTICE @@ -182,6 +182,7 @@ The following software have components provided under the terms of this license: - Apache Log4j API (from ) - Apache Log4j Core (from ) - Apache Log4j JUL Adapter (from ) +- Apache Log4j SLF4J Binding (from ) - Apache Log4j to SLF4J Adapter (from ) - Apache Maven Invoker (from ) - Apache Maven Reporting Implementation (from ) @@ -857,8 +858,8 @@ The following software have components provided under the terms of this license: - Microsoft Azure client library for Identity (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure client library for KeyVault Secrets (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure common module for Storage (from https://github.com/Azure/azure-sdk-for-java) -- Mockito (from http://www.mockito.org) - Mockito (from http://mockito.org) +- Mockito (from http://www.mockito.org) - Mockito (from http://mockito.org) - Mockito (from http://mockito.org) - Netty/Codec/HTTP (from ) diff --git a/provider/indexer-azure/pom.xml b/provider/indexer-azure/pom.xml index 6e5c56bdbd16eb30f7039b1bbd9760770fb7edad..a667ee61e8af54b38c22d1916640e3faa1974971 100644 --- a/provider/indexer-azure/pom.xml +++ b/provider/indexer-azure/pom.xml @@ -98,7 +98,7 @@ <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>core-lib-azure</artifactId> - <version>0.0.9</version> + <version>0.0.12</version> </dependency> <dependency> diff --git a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/util/Config.java b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/util/Config.java index f015548d59648765ae22ea33a698299622a13b70..6568a88fd091f2dbf455d72ee5484d6a3c1115d0 100644 --- a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/util/Config.java +++ b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/util/Config.java @@ -5,7 +5,8 @@ public class Config { private static final String DEFAULT_ELASTIC_HOST = ""; private static final String DEFAULT_ELASTIC_USER_NAME = ""; private static final String DEFAULT_ELASTIC_PASSWORD = ""; - static final int PORT = 9243; + private static final int PORT = 9243; + private static final String DEFAULT_ELASTIC_SSL_ENABLED = "true"; private static final String DEFAULT_INDEXER_HOST = ""; private static final String DEFAULT_SEARCH_HOST = ""; @@ -62,6 +63,10 @@ public class Config { return getEnvironmentVariableOrDefaultValue("ELASTIC_HOST", DEFAULT_ELASTIC_HOST); } + public static boolean isElasticSslEnabled() { + return Boolean.parseBoolean(getEnvironmentVariableOrDefaultValue("ELASTIC_SSL_ENABLED", DEFAULT_ELASTIC_SSL_ENABLED)); + } + public static String getIndexerBaseURL() { return getEnvironmentVariableOrDefaultValue("INDEXER_HOST", DEFAULT_INDEXER_HOST); } diff --git a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/util/ElasticUtils.java b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/util/ElasticUtils.java index 18a138d0b3624b8a2c9bca77d1c0be0416603806..4922e8498e5cebe4d59fcc2ac2ba08d8ed43c217 100644 --- a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/util/ElasticUtils.java +++ b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/util/ElasticUtils.java @@ -55,11 +55,13 @@ public class ElasticUtils { private final String username; private final String password; private final String host; + private final boolean sslEnabled; public ElasticUtils() { this.username = Config.getUserName(); this.password = Config.getPassword(); this.host = Config.getElasticHost(); + this.sslEnabled = Config.isElasticSslEnabled(); } public void createIndex(String index, String mapping) { @@ -275,7 +277,8 @@ public class ElasticUtils { } public RestClientBuilder createClientBuilder(String host, String usernameAndPassword, int port) { - RestClientBuilder builder = RestClient.builder(new HttpHost(host, port, "https")); + String scheme = this.sslEnabled ? "https" : "http"; + RestClientBuilder builder = RestClient.builder(new HttpHost(host, port, scheme)); builder.setRequestConfigCallback(requestConfigBuilder -> requestConfigBuilder.setConnectTimeout(REST_CLIENT_CONNECT_TIMEOUT) .setSocketTimeout(REST_CLIENT_SOCKET_TIMEOUT)); builder.setMaxRetryTimeoutMillis(REST_CLIENT_RETRY_TIMEOUT);