You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "tiennguyen-onehouse (via GitHub)" <gi...@apache.org> on 2025/09/08 18:15:29 UTC

[PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

tiennguyen-onehouse opened a new pull request, #13861:
URL: https://github.com/apache/hudi/pull/13861

   ### Change Logs
   
   _Describe context and summary for this change. Highlight if any code was copied._
   
   ### Impact
   
   _Describe any public API or user-facing feature change or any performance impact._
   
   ### Risk level (write none, low medium or high below)
   
   _If medium or high, explain what verification was done to mitigate the risks._
   
   ### Documentation Update
   
   _Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none"._
   
   - _The config description must be updated if new configs are added or the default value of the configs are changed_
   - _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
     ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make
     changes to the website._
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3267404658

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386",
       "triggerID" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26b727c6430263df1a62a5e716fabb19863f7008 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: upgrade datahub and java client version [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3317116426

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386",
       "triggerID" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8497",
       "triggerID" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "625a184085a04907572dbd2dc0a8fbf81db6e35e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8542",
       "triggerID" : "625a184085a04907572dbd2dc0a8fbf81db6e35e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0df8d1685b9c025c3b24e55cc13d5683aa07466d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0df8d1685b9c025c3b24e55cc13d5683aa07466d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 625a184085a04907572dbd2dc0a8fbf81db6e35e Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8542) 
   * 0df8d1685b9c025c3b24e55cc13d5683aa07466d UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #13861:
URL: https://github.com/apache/hudi/pull/13861#discussion_r2343001413


##########
README-INTERNAL.md:
##########
@@ -0,0 +1,29 @@
+# Hudi Internal Development Guide
+
+This document contains internal development notes and commands for working with the Hudi codebase.
+
+Before building, run the authentication command:
+
+```bash
+code_auth
+```
+## Code Quality Checks
+
+### Checkstyle
+
+Run checkstyle:
+
+```bash
+# Check entire project
+mvn checkstyle:check
+
+# Check specific module
+mvn checkstyle:check -pl hudi-sync/hudi-datahub-sync
+```
+
+## Build Commands
+
+### Clean Build
+```bash
+mvn -T 14C clean package -DskipTests -Dscala-2.12 -Dspark3.5 -Dflink1.20 

Review Comment:
   is this doc related with just the datahub-sync dev?



-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: upgrade datahub and java client version [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3317122906

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386",
       "triggerID" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8497",
       "triggerID" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "625a184085a04907572dbd2dc0a8fbf81db6e35e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8542",
       "triggerID" : "625a184085a04907572dbd2dc0a8fbf81db6e35e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0df8d1685b9c025c3b24e55cc13d5683aa07466d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8719",
       "triggerID" : "0df8d1685b9c025c3b24e55cc13d5683aa07466d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 625a184085a04907572dbd2dc0a8fbf81db6e35e Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8542) 
   * 0df8d1685b9c025c3b24e55cc13d5683aa07466d Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8719) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3284029988

   There are some compile errors: https://github.com/apache/hudi/actions/runs/17665467851/job/50206345591?pr=13861, can you fix it?


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3283734465

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386",
       "triggerID" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8497",
       "triggerID" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b14afe1ca196da9b17ee68353fa8d9cb6ff334d8 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8497) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on code in PR #13861:
URL: https://github.com/apache/hudi/pull/13861#discussion_r2350342829


##########
hudi-sync/hudi-datahub-sync/src/main/java/org/apache/hudi/sync/datahub/config/TlsEnabledDataHubEmitterSupplier.java:
##########
@@ -0,0 +1,169 @@
+/*
+ * 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.hudi.sync.datahub.config;
+
+import datahub.client.rest.RestEmitter;
+import datahub.shaded.org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder;
+import datahub.shaded.org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.sync.datahub.HoodieDataHubSyncException;
+import org.apache.http.ssl.SSLContextBuilder;
+import org.apache.http.ssl.SSLContexts;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.SSLContext;
+import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.KeyStore;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateFactory;
+
+/**
+ * Custom DataHub emitter supplier that supports TLS configuration with CA certificates.
+ * This class reads TLS configuration from Hudi properties and creates a RestEmitter
+ * with proper SSL/TLS context for secure communication with DataHub servers.
+ */
+public class TlsEnabledDataHubEmitterSupplier implements DataHubEmitterSupplier {
+
+  private static final Logger LOG = LoggerFactory.getLogger(TlsEnabledDataHubEmitterSupplier.class);
+
+  private final TypedProperties config;
+
+  public TlsEnabledDataHubEmitterSupplier(TypedProperties config) {
+    this.config = config;
+  }
+
+  @Override
+  public RestEmitter get() {
+    try {
+      String serverUrl = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_EMITTER_SERVER.key(), null);
+      if (serverUrl == null || serverUrl.isEmpty()) {
+        throw new IllegalArgumentException(
+            "DataHub server URL must be specified with " + DataHubSyncConfig.META_SYNC_DATAHUB_EMITTER_SERVER.key());
+      }
+
+      String token = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_EMITTER_TOKEN.key(), null);
+      String caCertPath = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_TLS_CA_CERT_PATH.key(), null);
+      String keystorePath = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_TLS_KEYSTORE_PATH.key(), null);
+      String keystorePassword = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_TLS_KEYSTORE_PASSWORD.key(), null);
+      String truststorePath = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_TLS_TRUSTSTORE_PATH.key(), null);
+      String truststorePassword = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_TLS_TRUSTSTORE_PASSWORD.key(), null);
+
+      LOG.info("Creating DataHub RestEmitter with TLS configuration for server: {}", serverUrl);
+
+      return RestEmitter.create(builder -> {
+        builder.server(serverUrl);
+        
+        if (token != null && !token.isEmpty()) {
+          builder.token(token);
+        }
+        
+        // Configure TLS/SSL context if any TLS configuration is provided
+        if (hasTlsConfiguration(caCertPath, keystorePath, truststorePath)) {
+          LOG.info("Configuring TLS for DataHub connection");
+          SSLContext sslContext = createSSLContext(caCertPath, keystorePath, keystorePassword, truststorePath, truststorePassword);
+          
+          builder.customizeHttpAsyncClient(httpClientBuilder -> {
+            ClientTlsStrategyBuilder tlsStrategyBuilder = ClientTlsStrategyBuilder.create();
+            tlsStrategyBuilder.setSslContext(sslContext);
+
+            PoolingAsyncClientConnectionManagerBuilder connectionManagerBuilder =
+                PoolingAsyncClientConnectionManagerBuilder.create();
+            connectionManagerBuilder.setTlsStrategy(tlsStrategyBuilder.build());
+
+            httpClientBuilder.setConnectionManager(connectionManagerBuilder.build());
+          });
+          LOG.info("Successfully configured TLS for DataHub connection");
+        }
+      });
+    } catch (Exception e) {
+      throw new HoodieDataHubSyncException("Failed to create TLS-enabled DataHub emitter", e);
+    }
+  }
+
+  private boolean hasTlsConfiguration(String caCertPath, String keystorePath, String truststorePath) {
+    return (caCertPath != null && !caCertPath.isEmpty())
+        || (keystorePath != null && !keystorePath.isEmpty())
+        || (truststorePath != null && !truststorePath.isEmpty());
+  }
+
+  private SSLContext createSSLContext(String caCertPath, String keystorePath, String keystorePassword, 
+                                      String truststorePath, String truststorePassword) throws HoodieDataHubSyncException {
+    try {
+      SSLContextBuilder sslContextBuilder = SSLContexts.custom();
+
+      // Configure client keystore for mutual TLS authentication
+      if (keystorePath != null && !keystorePath.isEmpty()) {
+        if (!Files.exists(Paths.get(keystorePath))) {
+          throw new HoodieDataHubSyncException("Keystore file not found: " + keystorePath);
+        }
+        if (keystorePassword == null || keystorePassword.isEmpty()) {
+          LOG.warn("No password provided for keystore {}. Using empty password - consider using password-protected keystores for better security.", keystorePath);
+        }
+        LOG.info("Loading keystore from: {}", keystorePath);
+        KeyStore keyStore = KeyStore.getInstance("PKCS12");
+        char[] keystorePasswordChars = (keystorePassword != null && !keystorePassword.isEmpty()) 
+            ? keystorePassword.toCharArray() : new char[0];
+        try (FileInputStream keystoreInputStream = new FileInputStream(keystorePath)) {
+          keyStore.load(keystoreInputStream, keystorePasswordChars);
+        }
+        sslContextBuilder.loadKeyMaterial(keyStore, keystorePasswordChars);
+      }
+
+      // Configure truststore or CA certificate for server certificate verification
+      if (truststorePath != null && !truststorePath.isEmpty()) {
+        if (!Files.exists(Paths.get(truststorePath))) {

Review Comment:
   So this is for local files, which are fine for cert files.



-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: upgrade datahub and java client version [hudi]

Posted by "tiennguyen-onehouse (via GitHub)" <gi...@apache.org>.
tiennguyen-onehouse commented on code in PR #13861:
URL: https://github.com/apache/hudi/pull/13861#discussion_r2366755622


##########
hudi-sync/hudi-datahub-sync/src/main/java/org/apache/hudi/sync/datahub/config/TlsEnabledDataHubEmitterSupplier.java:
##########
@@ -0,0 +1,169 @@
+/*
+ * 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.hudi.sync.datahub.config;
+
+import datahub.client.rest.RestEmitter;
+import datahub.shaded.org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder;
+import datahub.shaded.org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.sync.datahub.HoodieDataHubSyncException;
+import org.apache.http.ssl.SSLContextBuilder;
+import org.apache.http.ssl.SSLContexts;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.SSLContext;
+import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.KeyStore;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateFactory;
+
+/**
+ * Custom DataHub emitter supplier that supports TLS configuration with CA certificates.
+ * This class reads TLS configuration from Hudi properties and creates a RestEmitter
+ * with proper SSL/TLS context for secure communication with DataHub servers.
+ */
+public class TlsEnabledDataHubEmitterSupplier implements DataHubEmitterSupplier {
+
+  private static final Logger LOG = LoggerFactory.getLogger(TlsEnabledDataHubEmitterSupplier.class);
+
+  private final TypedProperties config;
+
+  public TlsEnabledDataHubEmitterSupplier(TypedProperties config) {
+    this.config = config;
+  }
+
+  @Override
+  public RestEmitter get() {
+    try {
+      String serverUrl = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_EMITTER_SERVER.key(), null);

Review Comment:
   I see. getStringWithAltKeys is much better for backward compatibility, error handling, with default value.



-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3294070708

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386",
       "triggerID" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8497",
       "triggerID" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "625a184085a04907572dbd2dc0a8fbf81db6e35e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8542",
       "triggerID" : "625a184085a04907572dbd2dc0a8fbf81db6e35e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b14afe1ca196da9b17ee68353fa8d9cb6ff334d8 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8497) 
   * 625a184085a04907572dbd2dc0a8fbf81db6e35e Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8542) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "tiennguyen-onehouse (via GitHub)" <gi...@apache.org>.
tiennguyen-onehouse commented on code in PR #13861:
URL: https://github.com/apache/hudi/pull/13861#discussion_r2343007444


##########
README-INTERNAL.md:
##########
@@ -0,0 +1,29 @@
+# Hudi Internal Development Guide
+
+This document contains internal development notes and commands for working with the Hudi codebase.
+
+Before building, run the authentication command:
+
+```bash
+code_auth
+```
+## Code Quality Checks
+
+### Checkstyle
+
+Run checkstyle:
+
+```bash
+# Check entire project
+mvn checkstyle:check
+
+# Check specific module
+mvn checkstyle:check -pl hudi-sync/hudi-datahub-sync
+```
+
+## Build Commands
+
+### Clean Build
+```bash
+mvn -T 14C clean package -DskipTests -Dscala-2.12 -Dspark3.5 -Dflink1.20 

Review Comment:
   no sorry I was suppose to clean that up. Let me remove it. 



-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3294066903

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386",
       "triggerID" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8497",
       "triggerID" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "625a184085a04907572dbd2dc0a8fbf81db6e35e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "625a184085a04907572dbd2dc0a8fbf81db6e35e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b14afe1ca196da9b17ee68353fa8d9cb6ff334d8 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8497) 
   * 625a184085a04907572dbd2dc0a8fbf81db6e35e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: upgrade datahub and java client version [hudi]

Posted by "tiennguyen-onehouse (via GitHub)" <gi...@apache.org>.
tiennguyen-onehouse commented on code in PR #13861:
URL: https://github.com/apache/hudi/pull/13861#discussion_r2366830341


##########
hudi-sync/hudi-datahub-sync/src/main/java/org/apache/hudi/sync/datahub/config/TlsEnabledDataHubEmitterSupplier.java:
##########
@@ -0,0 +1,169 @@
+/*
+ * 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.hudi.sync.datahub.config;
+
+import datahub.client.rest.RestEmitter;
+import datahub.shaded.org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder;
+import datahub.shaded.org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.sync.datahub.HoodieDataHubSyncException;
+import org.apache.http.ssl.SSLContextBuilder;
+import org.apache.http.ssl.SSLContexts;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.SSLContext;
+import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.KeyStore;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateFactory;
+
+/**
+ * Custom DataHub emitter supplier that supports TLS configuration with CA certificates.
+ * This class reads TLS configuration from Hudi properties and creates a RestEmitter
+ * with proper SSL/TLS context for secure communication with DataHub servers.
+ */
+public class TlsEnabledDataHubEmitterSupplier implements DataHubEmitterSupplier {
+
+  private static final Logger LOG = LoggerFactory.getLogger(TlsEnabledDataHubEmitterSupplier.class);
+
+  private final TypedProperties config;
+
+  public TlsEnabledDataHubEmitterSupplier(TypedProperties config) {
+    this.config = config;
+  }
+
+  @Override
+  public RestEmitter get() {
+    try {
+      String serverUrl = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_EMITTER_SERVER.key(), null);
+      if (serverUrl == null || serverUrl.isEmpty()) {
+        throw new IllegalArgumentException(
+            "DataHub server URL must be specified with " + DataHubSyncConfig.META_SYNC_DATAHUB_EMITTER_SERVER.key());
+      }
+
+      String token = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_EMITTER_TOKEN.key(), null);
+      String caCertPath = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_TLS_CA_CERT_PATH.key(), null);
+      String keystorePath = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_TLS_KEYSTORE_PATH.key(), null);
+      String keystorePassword = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_TLS_KEYSTORE_PASSWORD.key(), null);
+      String truststorePath = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_TLS_TRUSTSTORE_PATH.key(), null);
+      String truststorePassword = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_TLS_TRUSTSTORE_PASSWORD.key(), null);
+
+      LOG.info("Creating DataHub RestEmitter with TLS configuration for server: {}", serverUrl);
+
+      return RestEmitter.create(builder -> {
+        builder.server(serverUrl);
+        
+        if (token != null && !token.isEmpty()) {
+          builder.token(token);
+        }
+        
+        // Configure TLS/SSL context if any TLS configuration is provided
+        if (hasTlsConfiguration(caCertPath, keystorePath, truststorePath)) {
+          LOG.info("Configuring TLS for DataHub connection");
+          SSLContext sslContext = createSSLContext(caCertPath, keystorePath, keystorePassword, truststorePath, truststorePassword);
+          
+          builder.customizeHttpAsyncClient(httpClientBuilder -> {
+            ClientTlsStrategyBuilder tlsStrategyBuilder = ClientTlsStrategyBuilder.create();
+            tlsStrategyBuilder.setSslContext(sslContext);
+
+            PoolingAsyncClientConnectionManagerBuilder connectionManagerBuilder =
+                PoolingAsyncClientConnectionManagerBuilder.create();
+            connectionManagerBuilder.setTlsStrategy(tlsStrategyBuilder.build());
+
+            httpClientBuilder.setConnectionManager(connectionManagerBuilder.build());
+          });
+          LOG.info("Successfully configured TLS for DataHub connection");
+        }
+      });
+    } catch (Exception e) {
+      throw new HoodieDataHubSyncException("Failed to create TLS-enabled DataHub emitter", e);
+    }
+  }
+
+  private boolean hasTlsConfiguration(String caCertPath, String keystorePath, String truststorePath) {
+    return (caCertPath != null && !caCertPath.isEmpty())
+        || (keystorePath != null && !keystorePath.isEmpty())
+        || (truststorePath != null && !truststorePath.isEmpty());
+  }
+
+  private SSLContext createSSLContext(String caCertPath, String keystorePath, String keystorePassword, 
+                                      String truststorePath, String truststorePassword) throws HoodieDataHubSyncException {
+    try {
+      SSLContextBuilder sslContextBuilder = SSLContexts.custom();
+
+      // Configure client keystore for mutual TLS authentication
+      if (keystorePath != null && !keystorePath.isEmpty()) {
+        if (!Files.exists(Paths.get(keystorePath))) {
+          throw new HoodieDataHubSyncException("Keystore file not found: " + keystorePath);
+        }
+        if (keystorePassword == null || keystorePassword.isEmpty()) {
+          LOG.warn("No password provided for keystore {}. Using empty password - consider using password-protected keystores for better security.", keystorePath);
+        }
+        LOG.info("Loading keystore from: {}", keystorePath);
+        KeyStore keyStore = KeyStore.getInstance("PKCS12");
+        char[] keystorePasswordChars = (keystorePassword != null && !keystorePassword.isEmpty()) 
+            ? keystorePassword.toCharArray() : new char[0];
+        try (FileInputStream keystoreInputStream = new FileInputStream(keystorePath)) {
+          keyStore.load(keystoreInputStream, keystorePasswordChars);
+        }
+        sslContextBuilder.loadKeyMaterial(keyStore, keystorePasswordChars);
+      }
+
+      // Configure truststore or CA certificate for server certificate verification
+      if (truststorePath != null && !truststorePath.isEmpty()) {
+        if (!Files.exists(Paths.get(truststorePath))) {

Review Comment:
   yeah you got a point. We do use HadoopFSUtils in Hudi but since certs are gonna be local. I think this should be alright.



-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3267399128

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26b727c6430263df1a62a5e716fabb19863f7008 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3283728362

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386",
       "triggerID" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8497",
       "triggerID" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26b727c6430263df1a62a5e716fabb19863f7008 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386) 
   * b14afe1ca196da9b17ee68353fa8d9cb6ff334d8 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8497) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on code in PR #13861:
URL: https://github.com/apache/hudi/pull/13861#discussion_r2350313357


##########
hudi-sync/hudi-datahub-sync/src/main/java/org/apache/hudi/sync/datahub/config/TlsEnabledDataHubEmitterSupplier.java:
##########
@@ -0,0 +1,169 @@
+/*
+ * 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.hudi.sync.datahub.config;
+
+import datahub.client.rest.RestEmitter;
+import datahub.shaded.org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder;
+import datahub.shaded.org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.sync.datahub.HoodieDataHubSyncException;
+import org.apache.http.ssl.SSLContextBuilder;
+import org.apache.http.ssl.SSLContexts;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.SSLContext;
+import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.KeyStore;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateFactory;
+
+/**
+ * Custom DataHub emitter supplier that supports TLS configuration with CA certificates.
+ * This class reads TLS configuration from Hudi properties and creates a RestEmitter
+ * with proper SSL/TLS context for secure communication with DataHub servers.
+ */
+public class TlsEnabledDataHubEmitterSupplier implements DataHubEmitterSupplier {
+
+  private static final Logger LOG = LoggerFactory.getLogger(TlsEnabledDataHubEmitterSupplier.class);
+
+  private final TypedProperties config;
+
+  public TlsEnabledDataHubEmitterSupplier(TypedProperties config) {
+    this.config = config;
+  }
+
+  @Override
+  public RestEmitter get() {
+    try {
+      String serverUrl = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_EMITTER_SERVER.key(), null);

Review Comment:
   Use `ConfigUtils#getStringWithAltKeys` for fetching config values to avoid `.key()` invocations on `ConfigProperty`



##########
hudi-sync/hudi-datahub-sync/src/main/java/org/apache/hudi/sync/datahub/config/TlsEnabledDataHubEmitterSupplier.java:
##########
@@ -0,0 +1,169 @@
+/*
+ * 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.hudi.sync.datahub.config;
+
+import datahub.client.rest.RestEmitter;
+import datahub.shaded.org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder;
+import datahub.shaded.org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.sync.datahub.HoodieDataHubSyncException;
+import org.apache.http.ssl.SSLContextBuilder;
+import org.apache.http.ssl.SSLContexts;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.SSLContext;
+import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.KeyStore;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateFactory;
+
+/**
+ * Custom DataHub emitter supplier that supports TLS configuration with CA certificates.
+ * This class reads TLS configuration from Hudi properties and creates a RestEmitter
+ * with proper SSL/TLS context for secure communication with DataHub servers.
+ */
+public class TlsEnabledDataHubEmitterSupplier implements DataHubEmitterSupplier {
+
+  private static final Logger LOG = LoggerFactory.getLogger(TlsEnabledDataHubEmitterSupplier.class);
+
+  private final TypedProperties config;
+
+  public TlsEnabledDataHubEmitterSupplier(TypedProperties config) {
+    this.config = config;
+  }
+
+  @Override
+  public RestEmitter get() {
+    try {
+      String serverUrl = config.getString(DataHubSyncConfig.META_SYNC_DATAHUB_EMITTER_SERVER.key(), null);

Review Comment:
   e.g.,
   ```
   ConfigUtils.getStringWithAltKeys(config, DataHubSyncConfig.META_SYNC_DATAHUB_EMITTER_SERVER, true)
   ```



-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: upgrade datahub and java client version [hudi]

Posted by "tiennguyen-onehouse (via GitHub)" <gi...@apache.org>.
tiennguyen-onehouse commented on code in PR #13861:
URL: https://github.com/apache/hudi/pull/13861#discussion_r2366836265


##########
hudi-sync/hudi-datahub-sync/src/main/java/org/apache/hudi/sync/datahub/config/DataHubSyncConfig.java:
##########
@@ -136,6 +136,42 @@ public class DataHubSyncConfig extends HoodieSyncConfig {
       .markAdvanced()
       .withDocumentation("The name of the destination table that we should sync the hudi table to.");
 
+  // TLS Configuration Properties
+  public static final ConfigProperty<String> META_SYNC_DATAHUB_TLS_CA_CERT_PATH = ConfigProperty
+      .key("hoodie.meta.sync.datahub.tls.ca.cert.path")
+      .noDefaultValue()
+      .markAdvanced()
+      .withDocumentation("Path to the CA certificate file for TLS verification. "
+          + "Used when connecting to DataHub over HTTPS with custom CA certificates.");
+
+  public static final ConfigProperty<String> META_SYNC_DATAHUB_TLS_KEYSTORE_PATH = ConfigProperty
+      .key("hoodie.meta.sync.datahub.tls.keystore.path")
+      .noDefaultValue()
+      .markAdvanced()
+      .withDocumentation("Path to the keystore file for TLS client authentication. "
+          + "Used when connecting to DataHub over HTTPS with mutual TLS authentication.");
+
+  public static final ConfigProperty<String> META_SYNC_DATAHUB_TLS_KEYSTORE_PASSWORD = ConfigProperty
+      .key("hoodie.meta.sync.datahub.tls.keystore.password")
+      .noDefaultValue()
+      .markAdvanced()
+      .withDocumentation("Password for the keystore file. Optional but recommended for security. "
+          + "If not provided, an empty password will be used.");
+
+  public static final ConfigProperty<String> META_SYNC_DATAHUB_TLS_TRUSTSTORE_PATH = ConfigProperty
+      .key("hoodie.meta.sync.datahub.tls.truststore.path")
+      .noDefaultValue()
+      .markAdvanced()
+      .withDocumentation("Path to the truststore file for TLS server verification. "
+          + "Alternative to CA certificate file for trust management.");
+
+  public static final ConfigProperty<String> META_SYNC_DATAHUB_TLS_TRUSTSTORE_PASSWORD = ConfigProperty
+      .key("hoodie.meta.sync.datahub.tls.truststore.password")
+      .noDefaultValue()
+      .markAdvanced()
+      .withDocumentation("Password for the truststore file. Optional but recommended for security. "
+          + "If not provided, an empty password will be used.");

Review Comment:
   added



-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: upgrade datahub and java client version [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3317374872

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386",
       "triggerID" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8497",
       "triggerID" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "625a184085a04907572dbd2dc0a8fbf81db6e35e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8542",
       "triggerID" : "625a184085a04907572dbd2dc0a8fbf81db6e35e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0df8d1685b9c025c3b24e55cc13d5683aa07466d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8719",
       "triggerID" : "0df8d1685b9c025c3b24e55cc13d5683aa07466d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0df8d1685b9c025c3b24e55cc13d5683aa07466d Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8719) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3267413758

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386",
       "triggerID" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26b727c6430263df1a62a5e716fabb19863f7008 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3283725177

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386",
       "triggerID" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26b727c6430263df1a62a5e716fabb19863f7008 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386) 
   * b14afe1ca196da9b17ee68353fa8d9cb6ff334d8 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13861:
URL: https://github.com/apache/hudi/pull/13861#issuecomment-3294276424

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8386",
       "triggerID" : "26b727c6430263df1a62a5e716fabb19863f7008",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8497",
       "triggerID" : "b14afe1ca196da9b17ee68353fa8d9cb6ff334d8",
       "triggerType" : "PUSH"
     }, {
       "hash" : "625a184085a04907572dbd2dc0a8fbf81db6e35e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8542",
       "triggerID" : "625a184085a04907572dbd2dc0a8fbf81db6e35e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 625a184085a04907572dbd2dc0a8fbf81db6e35e Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8542) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757]: support TLS authentication for Datahub [hudi]

Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on code in PR #13861:
URL: https://github.com/apache/hudi/pull/13861#discussion_r2347902831


##########
hudi-sync/hudi-datahub-sync/src/main/java/org/apache/hudi/sync/datahub/config/DataHubSyncConfig.java:
##########
@@ -136,6 +136,42 @@ public class DataHubSyncConfig extends HoodieSyncConfig {
       .markAdvanced()
       .withDocumentation("The name of the destination table that we should sync the hudi table to.");
 
+  // TLS Configuration Properties
+  public static final ConfigProperty<String> META_SYNC_DATAHUB_TLS_CA_CERT_PATH = ConfigProperty
+      .key("hoodie.meta.sync.datahub.tls.ca.cert.path")
+      .noDefaultValue()
+      .markAdvanced()
+      .withDocumentation("Path to the CA certificate file for TLS verification. "
+          + "Used when connecting to DataHub over HTTPS with custom CA certificates.");
+
+  public static final ConfigProperty<String> META_SYNC_DATAHUB_TLS_KEYSTORE_PATH = ConfigProperty
+      .key("hoodie.meta.sync.datahub.tls.keystore.path")
+      .noDefaultValue()
+      .markAdvanced()
+      .withDocumentation("Path to the keystore file for TLS client authentication. "
+          + "Used when connecting to DataHub over HTTPS with mutual TLS authentication.");
+
+  public static final ConfigProperty<String> META_SYNC_DATAHUB_TLS_KEYSTORE_PASSWORD = ConfigProperty
+      .key("hoodie.meta.sync.datahub.tls.keystore.password")
+      .noDefaultValue()
+      .markAdvanced()
+      .withDocumentation("Password for the keystore file. Optional but recommended for security. "
+          + "If not provided, an empty password will be used.");
+
+  public static final ConfigProperty<String> META_SYNC_DATAHUB_TLS_TRUSTSTORE_PATH = ConfigProperty
+      .key("hoodie.meta.sync.datahub.tls.truststore.path")
+      .noDefaultValue()
+      .markAdvanced()
+      .withDocumentation("Path to the truststore file for TLS server verification. "
+          + "Alternative to CA certificate file for trust management.");
+
+  public static final ConfigProperty<String> META_SYNC_DATAHUB_TLS_TRUSTSTORE_PASSWORD = ConfigProperty
+      .key("hoodie.meta.sync.datahub.tls.truststore.password")
+      .noDefaultValue()
+      .markAdvanced()
+      .withDocumentation("Password for the truststore file. Optional but recommended for security. "
+          + "If not provided, an empty password will be used.");

Review Comment:
   Add `.sinceVersion` on the new configs



-- 
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@hudi.apache.org

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


Re: [PR] [HUDI-9757] Support TLS authentication for Datahub sync [hudi]

Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua merged PR #13861:
URL: https://github.com/apache/hudi/pull/13861


-- 
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@hudi.apache.org

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