You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "hailin0 (via GitHub)" <gi...@apache.org> on 2023/01/29 15:47:42 UTC

[GitHub] [incubator-seatunnel] hailin0 opened a new pull request, #3997: [Feature][Connector][Elasticsearch] Support https protocol

hailin0 opened a new pull request, #3997:
URL: https://github.com/apache/incubator-seatunnel/pull/3997

   
   
   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   * support https protocol
   * compatible with opensearch
   * 
   ## Check list
   
   * [x] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [x] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   * [x] If you are contributing the connector code, please check that the following files are updated:
     1. Update change log that in connector document. For more details you can refer to [connector-v2](https://github.com/apache/incubator-seatunnel/tree/dev/docs/en/connector-v2)
     2. Update [plugin-mapping.properties](https://github.com/apache/incubator-seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
     3. Update the pom file of [seatunnel-dist](https://github.com/apache/incubator-seatunnel/blob/dev/seatunnel-dist/pom.xml)
   * [ ] Update the [`release-note`](https://github.com/apache/incubator-seatunnel/blob/dev/release-note.md).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #3997: [Feature][Connector][Elasticsearch] Support https protocol

Posted by "CalvinKirs (via GitHub)" <gi...@apache.org>.
CalvinKirs commented on code in PR #3997:
URL: https://github.com/apache/incubator-seatunnel/pull/3997#discussion_r1090191577


##########
seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/util/DerUtils.java:
##########
@@ -0,0 +1,236 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.elasticsearch.util;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.io.ByteStreams.newDataOutput;
+import static java.util.Objects.requireNonNull;
+
+import com.google.common.base.Splitter;
+import com.google.common.collect.ImmutableList;
+import com.google.common.io.ByteArrayDataOutput;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * ASN.1 DER encoder methods necessary to process PEM files and to write a certificate signing request.
+ */
+@SuppressWarnings("MagicNumber")
+public final class DerUtils {
+    public static final int SEQUENCE_TAG = 0x30;

Review Comment:
   This class looks to be from the `airlift` project, please confirm.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on pull request #3997: [Feature][Connector][Elasticsearch] Support https protocol

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on PR #3997:
URL: https://github.com/apache/incubator-seatunnel/pull/3997#issuecomment-1407935578

   PTAL


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #3997: [Feature][Connector][Elasticsearch] Support https protocol

Posted by "CalvinKirs (via GitHub)" <gi...@apache.org>.
CalvinKirs commented on code in PR #3997:
URL: https://github.com/apache/incubator-seatunnel/pull/3997#discussion_r1090191577


##########
seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/util/DerUtils.java:
##########
@@ -0,0 +1,236 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.elasticsearch.util;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.io.ByteStreams.newDataOutput;
+import static java.util.Objects.requireNonNull;
+
+import com.google.common.base.Splitter;
+import com.google.common.collect.ImmutableList;
+import com.google.common.io.ByteArrayDataOutput;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * ASN.1 DER encoder methods necessary to process PEM files and to write a certificate signing request.
+ */
+@SuppressWarnings("MagicNumber")
+public final class DerUtils {
+    public static final int SEQUENCE_TAG = 0x30;

Review Comment:
   This code looks to be from the `airlift` project, please confirm.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3997: [Feature][Connector][Elasticsearch] Support https protocol

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on code in PR #3997:
URL: https://github.com/apache/incubator-seatunnel/pull/3997#discussion_r1090612249


##########
seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/client/EsRestClient.java:
##########
@@ -62,52 +69,115 @@ public class EsRestClient {
 
     private final RestClient restClient;
 
-    private final ObjectMapper mapper = new ObjectMapper();
-
     private EsRestClient(RestClient restClient) {
         this.restClient = restClient;
     }
 
     public static EsRestClient createInstance(Config pluginConfig) {
         List<String> hosts = pluginConfig.getStringList(EsClusterConnectionConfig.HOSTS.key());
-        String username = null;
-        String password = null;
+        Optional<String> username = Optional.empty();
+        Optional<String> password = Optional.empty();
         if (pluginConfig.hasPath(EsClusterConnectionConfig.USERNAME.key())) {
-            username = pluginConfig.getString(EsClusterConnectionConfig.USERNAME.key());
+            username = Optional.of(pluginConfig.getString(EsClusterConnectionConfig.USERNAME.key()));
             if (pluginConfig.hasPath(EsClusterConnectionConfig.PASSWORD.key())) {
-                password = pluginConfig.getString(EsClusterConnectionConfig.PASSWORD.key());
+                password = Optional.of(pluginConfig.getString(EsClusterConnectionConfig.PASSWORD.key()));
+            }
+        }
+        Optional<String> keystorePath = Optional.empty();
+        Optional<String> keystorePassword = Optional.empty();
+        Optional<String> truststorePath = Optional.empty();
+        Optional<String> truststorePassword = Optional.empty();
+        boolean tlsVerifyCertificate = EsClusterConnectionConfig.TLS_VERIFY_CERTIFICATE.defaultValue();
+        if (pluginConfig.hasPath(EsClusterConnectionConfig.TLS_VERIFY_CERTIFICATE.key())) {
+            tlsVerifyCertificate = pluginConfig.getBoolean(EsClusterConnectionConfig.TLS_VERIFY_CERTIFICATE.key());
+        }
+        if (tlsVerifyCertificate) {
+            if (pluginConfig.hasPath(EsClusterConnectionConfig.TLS_KEY_STORE_PATH.key())) {
+                keystorePath = Optional.of(pluginConfig.getString(EsClusterConnectionConfig.TLS_KEY_STORE_PATH.key()));
             }
+            if (pluginConfig.hasPath(EsClusterConnectionConfig.TLS_KEY_STORE_PASSWORD.key())) {
+                keystorePassword = Optional.of(pluginConfig.getString(EsClusterConnectionConfig.TLS_KEY_STORE_PASSWORD.key()));
+            }
+            if (pluginConfig.hasPath(EsClusterConnectionConfig.TLS_TRUST_STORE_PATH.key())) {
+                truststorePath = Optional.of(pluginConfig.getString(EsClusterConnectionConfig.TLS_TRUST_STORE_PATH.key()));
+            }
+            if (pluginConfig.hasPath(EsClusterConnectionConfig.TLS_TRUST_STORE_PASSWORD.key())) {
+                truststorePassword = Optional.of(pluginConfig.getString(EsClusterConnectionConfig.TLS_TRUST_STORE_PASSWORD.key()));
+            }
+        }
+        boolean tlsVerifyHostnames = EsClusterConnectionConfig.TLS_VERIFY_HOSTNAME.defaultValue();
+        if (pluginConfig.hasPath(EsClusterConnectionConfig.TLS_VERIFY_HOSTNAME.key())) {
+            tlsVerifyHostnames = pluginConfig.getBoolean(EsClusterConnectionConfig.TLS_VERIFY_HOSTNAME.key());
         }
-        return createInstance(hosts, username, password);
+        return createInstance(hosts, username, password, tlsVerifyCertificate, tlsVerifyHostnames,
+            keystorePath, keystorePassword, truststorePath, truststorePassword);
     }
 
-    public static EsRestClient createInstance(List<String> hosts, String username, String password) {
-        RestClientBuilder restClientBuilder = getRestClientBuilder(hosts, username, password);
+    public static EsRestClient createInstance(List<String> hosts,
+                                              Optional<String> username,
+                                              Optional<String> password,
+                                              boolean tlsVerifyCertificate,
+                                              boolean tlsVerifyHostnames,
+                                              Optional<String> keystorePath,
+                                              Optional<String> keystorePassword,
+                                              Optional<String> truststorePath,
+                                              Optional<String> truststorePassword) {
+        RestClientBuilder restClientBuilder = getRestClientBuilder(
+            hosts, username, password, tlsVerifyCertificate, tlsVerifyHostnames,
+            keystorePath, keystorePassword, truststorePath, truststorePassword);
         return new EsRestClient(restClientBuilder.build());
     }
 
-    private static RestClientBuilder getRestClientBuilder(List<String> hosts, String username, String password) {
+    private static RestClientBuilder getRestClientBuilder(List<String> hosts,
+                                                          Optional<String> username,
+                                                          Optional<String> password,
+                                                          boolean tlsVerifyCertificate,
+                                                          boolean tlsVerifyHostnames,
+                                                          Optional<String> keystorePath,
+                                                          Optional<String> keystorePassword,
+                                                          Optional<String> truststorePath,
+                                                          Optional<String> truststorePassword) {
         HttpHost[] httpHosts = new HttpHost[hosts.size()];
         for (int i = 0; i < hosts.size(); i++) {
-            String[] hostInfo = hosts.get(i).replace("http://", "").split(":");
-            httpHosts[i] = new HttpHost(hostInfo[0], Integer.parseInt(hostInfo[1]));
+            httpHosts[i] = HttpHost.create(hosts.get(i));
         }
 
-        RestClientBuilder builder = RestClient.builder(httpHosts)
+        RestClientBuilder restClientBuilder = RestClient.builder(httpHosts)
             .setRequestConfigCallback(requestConfigBuilder -> requestConfigBuilder
                 .setConnectionRequestTimeout(CONNECTION_REQUEST_TIMEOUT)
                 .setSocketTimeout(SOCKET_TIMEOUT));
 
-        if (StringUtils.isNotEmpty(username)) {
-            CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
-            credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password));
-            builder.setHttpClientConfigCallback(httpAsyncClientBuilder -> httpAsyncClientBuilder.setDefaultCredentialsProvider(credentialsProvider));
-        }
-        return builder;
+        restClientBuilder.setHttpClientConfigCallback(httpClientBuilder -> {
+            if (username.isPresent()) {
+                CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
+                credentialsProvider.setCredentials(AuthScope.ANY,
+                    new UsernamePasswordCredentials(username.get(), password.get()));
+                httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
+            }
+
+            try {
+                if (tlsVerifyCertificate) {
+                    Optional<SSLContext> sslContext = SSLUtils.buildSSLContext(keystorePath,
+                        keystorePassword, truststorePath, truststorePassword);
+                    sslContext.ifPresent(e -> httpClientBuilder.setSSLContext(e));
+                } else {
+                    SSLContext sslContext = SSLContexts.custom()
+                        .loadTrustMaterial(new TrustAllStrategy()).build();
+                    httpClientBuilder.setSSLContext(sslContext);
+                }
+                if (!tlsVerifyHostnames) {
+                    httpClientBuilder.setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE);
+                }
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+            return httpClientBuilder;
+        });
+        return restClientBuilder;
     }
 
     public BulkResponse bulk(String requestBody) {
-        Request request = new Request("POST", "_bulk");
+        Request request = new Request("POST", "/_bulk");

Review Comment:
   fix https://bugs.chromium.org/p/gerrit/issues/detail?id=9761



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3997: [Feature][Connector][Elasticsearch] Support https protocol

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on code in PR #3997:
URL: https://github.com/apache/incubator-seatunnel/pull/3997#discussion_r1090613419


##########
seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/client/EsRestClient.java:
##########
@@ -62,52 +69,115 @@ public class EsRestClient {
 
     private final RestClient restClient;
 
-    private final ObjectMapper mapper = new ObjectMapper();
-
     private EsRestClient(RestClient restClient) {
         this.restClient = restClient;
     }
 
     public static EsRestClient createInstance(Config pluginConfig) {
         List<String> hosts = pluginConfig.getStringList(EsClusterConnectionConfig.HOSTS.key());
-        String username = null;
-        String password = null;
+        Optional<String> username = Optional.empty();
+        Optional<String> password = Optional.empty();
         if (pluginConfig.hasPath(EsClusterConnectionConfig.USERNAME.key())) {
-            username = pluginConfig.getString(EsClusterConnectionConfig.USERNAME.key());
+            username = Optional.of(pluginConfig.getString(EsClusterConnectionConfig.USERNAME.key()));
             if (pluginConfig.hasPath(EsClusterConnectionConfig.PASSWORD.key())) {
-                password = pluginConfig.getString(EsClusterConnectionConfig.PASSWORD.key());
+                password = Optional.of(pluginConfig.getString(EsClusterConnectionConfig.PASSWORD.key()));
+            }
+        }
+        Optional<String> keystorePath = Optional.empty();
+        Optional<String> keystorePassword = Optional.empty();
+        Optional<String> truststorePath = Optional.empty();
+        Optional<String> truststorePassword = Optional.empty();
+        boolean tlsVerifyCertificate = EsClusterConnectionConfig.TLS_VERIFY_CERTIFICATE.defaultValue();
+        if (pluginConfig.hasPath(EsClusterConnectionConfig.TLS_VERIFY_CERTIFICATE.key())) {
+            tlsVerifyCertificate = pluginConfig.getBoolean(EsClusterConnectionConfig.TLS_VERIFY_CERTIFICATE.key());
+        }
+        if (tlsVerifyCertificate) {
+            if (pluginConfig.hasPath(EsClusterConnectionConfig.TLS_KEY_STORE_PATH.key())) {
+                keystorePath = Optional.of(pluginConfig.getString(EsClusterConnectionConfig.TLS_KEY_STORE_PATH.key()));
             }
+            if (pluginConfig.hasPath(EsClusterConnectionConfig.TLS_KEY_STORE_PASSWORD.key())) {
+                keystorePassword = Optional.of(pluginConfig.getString(EsClusterConnectionConfig.TLS_KEY_STORE_PASSWORD.key()));
+            }
+            if (pluginConfig.hasPath(EsClusterConnectionConfig.TLS_TRUST_STORE_PATH.key())) {
+                truststorePath = Optional.of(pluginConfig.getString(EsClusterConnectionConfig.TLS_TRUST_STORE_PATH.key()));
+            }
+            if (pluginConfig.hasPath(EsClusterConnectionConfig.TLS_TRUST_STORE_PASSWORD.key())) {
+                truststorePassword = Optional.of(pluginConfig.getString(EsClusterConnectionConfig.TLS_TRUST_STORE_PASSWORD.key()));
+            }
+        }
+        boolean tlsVerifyHostnames = EsClusterConnectionConfig.TLS_VERIFY_HOSTNAME.defaultValue();
+        if (pluginConfig.hasPath(EsClusterConnectionConfig.TLS_VERIFY_HOSTNAME.key())) {
+            tlsVerifyHostnames = pluginConfig.getBoolean(EsClusterConnectionConfig.TLS_VERIFY_HOSTNAME.key());
         }
-        return createInstance(hosts, username, password);
+        return createInstance(hosts, username, password, tlsVerifyCertificate, tlsVerifyHostnames,
+            keystorePath, keystorePassword, truststorePath, truststorePassword);
     }
 
-    public static EsRestClient createInstance(List<String> hosts, String username, String password) {
-        RestClientBuilder restClientBuilder = getRestClientBuilder(hosts, username, password);
+    public static EsRestClient createInstance(List<String> hosts,
+                                              Optional<String> username,
+                                              Optional<String> password,
+                                              boolean tlsVerifyCertificate,
+                                              boolean tlsVerifyHostnames,
+                                              Optional<String> keystorePath,
+                                              Optional<String> keystorePassword,
+                                              Optional<String> truststorePath,
+                                              Optional<String> truststorePassword) {
+        RestClientBuilder restClientBuilder = getRestClientBuilder(
+            hosts, username, password, tlsVerifyCertificate, tlsVerifyHostnames,
+            keystorePath, keystorePassword, truststorePath, truststorePassword);
         return new EsRestClient(restClientBuilder.build());
     }
 
-    private static RestClientBuilder getRestClientBuilder(List<String> hosts, String username, String password) {
+    private static RestClientBuilder getRestClientBuilder(List<String> hosts,
+                                                          Optional<String> username,
+                                                          Optional<String> password,
+                                                          boolean tlsVerifyCertificate,
+                                                          boolean tlsVerifyHostnames,
+                                                          Optional<String> keystorePath,
+                                                          Optional<String> keystorePassword,
+                                                          Optional<String> truststorePath,
+                                                          Optional<String> truststorePassword) {
         HttpHost[] httpHosts = new HttpHost[hosts.size()];
         for (int i = 0; i < hosts.size(); i++) {
-            String[] hostInfo = hosts.get(i).replace("http://", "").split(":");
-            httpHosts[i] = new HttpHost(hostInfo[0], Integer.parseInt(hostInfo[1]));
+            httpHosts[i] = HttpHost.create(hosts.get(i));
         }
 
-        RestClientBuilder builder = RestClient.builder(httpHosts)
+        RestClientBuilder restClientBuilder = RestClient.builder(httpHosts)
             .setRequestConfigCallback(requestConfigBuilder -> requestConfigBuilder
                 .setConnectionRequestTimeout(CONNECTION_REQUEST_TIMEOUT)
                 .setSocketTimeout(SOCKET_TIMEOUT));
 
-        if (StringUtils.isNotEmpty(username)) {
-            CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
-            credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password));
-            builder.setHttpClientConfigCallback(httpAsyncClientBuilder -> httpAsyncClientBuilder.setDefaultCredentialsProvider(credentialsProvider));
-        }
-        return builder;
+        restClientBuilder.setHttpClientConfigCallback(httpClientBuilder -> {
+            if (username.isPresent()) {
+                CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
+                credentialsProvider.setCredentials(AuthScope.ANY,
+                    new UsernamePasswordCredentials(username.get(), password.get()));
+                httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
+            }
+
+            try {
+                if (tlsVerifyCertificate) {
+                    Optional<SSLContext> sslContext = SSLUtils.buildSSLContext(keystorePath,
+                        keystorePassword, truststorePath, truststorePassword);
+                    sslContext.ifPresent(e -> httpClientBuilder.setSSLContext(e));
+                } else {
+                    SSLContext sslContext = SSLContexts.custom()
+                        .loadTrustMaterial(new TrustAllStrategy()).build();
+                    httpClientBuilder.setSSLContext(sslContext);
+                }
+                if (!tlsVerifyHostnames) {
+                    httpClientBuilder.setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE);
+                }
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+            return httpClientBuilder;
+        });
+        return restClientBuilder;
     }
 
     public BulkResponse bulk(String requestBody) {
-        Request request = new Request("POST", "_bulk");
+        Request request = new Request("POST", "/_bulk");

Review Comment:
   compatible with aws opensearch



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #3997: [Feature][Connector][Elasticsearch] Support https protocol

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on code in PR #3997:
URL: https://github.com/apache/incubator-seatunnel/pull/3997#discussion_r1090610321


##########
seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/util/DerUtils.java:
##########
@@ -0,0 +1,236 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.elasticsearch.util;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.io.ByteStreams.newDataOutput;
+import static java.util.Objects.requireNonNull;
+
+import com.google.common.base.Splitter;
+import com.google.common.collect.ImmutableList;
+import com.google.common.io.ByteArrayDataOutput;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * ASN.1 DER encoder methods necessary to process PEM files and to write a certificate signing request.
+ */
+@SuppressWarnings("MagicNumber")
+public final class DerUtils {
+    public static final int SEQUENCE_TAG = 0x30;

Review Comment:
   fixed.   please review



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] kpretty commented on pull request #3997: [Feature][Connector][Elasticsearch] Support https protocol

Posted by "kpretty (via GitHub)" <gi...@apache.org>.
kpretty commented on PR #3997:
URL: https://github.com/apache/incubator-seatunnel/pull/3997#issuecomment-1420045487

   @hailin0 `airlift` depends on `guava` which seems to be incompatible with version 19.0 introduced by the parent project,exist `NoSuchMethodError`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on pull request #3997: [Feature][Connector][Elasticsearch] Support https protocol

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on PR #3997:
URL: https://github.com/apache/incubator-seatunnel/pull/3997#issuecomment-1410376169

   > Please add release note to `/release-note.md`
   
   fixed @EricJoy2048 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] TyrantLucifer merged pull request #3997: [Feature][Connector][Elasticsearch] Support https protocol

Posted by "TyrantLucifer (via GitHub)" <gi...@apache.org>.
TyrantLucifer merged PR #3997:
URL: https://github.com/apache/incubator-seatunnel/pull/3997


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org