You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2020/10/14 06:42:05 UTC

[flink] branch release-1.10 updated: [FLINK-19523][conf] Hide sensitive command-line configurations

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch release-1.10
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.10 by this push:
     new ffd352e  [FLINK-19523][conf] Hide sensitive command-line configurations
ffd352e is described below

commit ffd352e9d0f71a5e43fcc8b36f3b006fa8fb6080
Author: wineandcheeze <qi...@users.noreply.github.com>
AuthorDate: Wed Oct 14 08:36:54 2020 +0200

    [FLINK-19523][conf] Hide sensitive command-line configurations
---
 .../org/apache/flink/runtime/util/EnvironmentInformation.java     | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java b/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
index 1a3269b..638ef7f 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
@@ -18,6 +18,8 @@
 
 package org.apache.flink.runtime.util;
 
+import org.apache.flink.configuration.GlobalConfiguration;
+
 import java.io.InputStream;
 import java.lang.management.ManagementFactory;
 import java.lang.management.RuntimeMXBean;
@@ -318,7 +320,11 @@ public class EnvironmentInformation {
 			else {
 				log.info(" Program Arguments:");
 				for (String s: commandLineArgs) {
-					log.info("    " + s);
+					if (GlobalConfiguration.isSensitive(s)) {
+						log.info("    " + GlobalConfiguration.HIDDEN_CONTENT + " (sensitive information)");
+					} else {
+						log.info("    " + s);
+					}
 				}
 			}