litiliu commented on code in PR #8739:
URL: https://github.com/apache/seatunnel/pull/8739#discussion_r1959406615


##########
seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/ConfigBuilder.java:
##########
@@ -116,23 +117,39 @@ public static Config of(
         }
         log.info(
                 "Parsed config file: \n{}",
-                mapToString(configDesensitization(config.root().unwrapped())));
+                mapToString(
+                        configDesensitization(
+                                config.root().unwrapped(),
+                                
ConfigShadeUtils.getSensitiveOptions(config))));
         return config;
     }
 
-    public static Map<String, Object> configDesensitization(Map<String, 
Object> configMap) {
+    public static Map<String, Object> configDesensitization(
+            Map<String, Object> configMap, Set<String> sensitiveKeywords) {
         return configMap.entrySet().stream()
                 .collect(
                         LinkedHashMap::new,
                         (m, p) -> {
                             String key = p.getKey();
                             Object value = p.getValue();
-                            if (Arrays.asList(DEFAULT_SENSITIVE_KEYWORDS)
-                                    .contains(key.toLowerCase())) {
-                                m.put(key, "******");
+                            if (sensitiveKeywords.contains(key.toLowerCase())) 
{

Review Comment:
   Why is the `toLowerCase` needed here? As in the doc, we didn't specify 
whether we can match with the ignore case.



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

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

Reply via email to