hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jzh...@apache.org
Subject hadoop git commit: Revert "HADOOP-14241. Add ADLS sensitive config keys to default list. Contributed by John Zhuge."
Date Wed, 19 Apr 2017 20:34:19 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 3a39dd539 -> ef74a5661


Revert "HADOOP-14241. Add ADLS sensitive config keys to default list. Contributed by John
Zhuge."

This reverts commit 3a39dd5391527623a70296410f4754d8d235310a.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ef74a566
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ef74a566
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ef74a566

Branch: refs/heads/branch-2
Commit: ef74a5661b7174e42c0c2eb535c6945946c18453
Parents: 3a39dd5
Author: John Zhuge <jzhuge@apache.org>
Authored: Wed Apr 19 13:33:38 2017 -0700
Committer: John Zhuge <jzhuge@apache.org>
Committed: Wed Apr 19 13:33:38 2017 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/conf/ConfigRedactor.java     |  3 +--
 .../hadoop/fs/CommonConfigurationKeysPublic.java   | 16 +++++++---------
 .../src/main/resources/core-default.xml            | 15 +++------------
 .../org/apache/hadoop/conf/TestConfigRedactor.java | 17 +----------------
 4 files changed, 12 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ef74a566/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ConfigRedactor.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ConfigRedactor.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ConfigRedactor.java
index 90b260e..0ba756c 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ConfigRedactor.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ConfigRedactor.java
@@ -42,8 +42,7 @@ public class ConfigRedactor {
     String sensitiveRegexList = conf.get(
         HADOOP_SECURITY_SENSITIVE_CONFIG_KEYS,
         HADOOP_SECURITY_SENSITIVE_CONFIG_KEYS_DEFAULT);
-    List<String> sensitiveRegexes =
-        Arrays.asList(sensitiveRegexList.trim().split("[,\\s]+"));
+    List<String> sensitiveRegexes = Arrays.asList(sensitiveRegexList.split(","));
     compiledPatterns = new ArrayList<Pattern>();
     for (String regex : sensitiveRegexes) {
       Pattern p = Pattern.compile(regex);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ef74a566/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java
index e771634..86feee2 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeysPublic.java
@@ -829,14 +829,12 @@ public class CommonConfigurationKeysPublic {
   public static final String HADOOP_SECURITY_SENSITIVE_CONFIG_KEYS =
       "hadoop.security.sensitive-config-keys";
   public static final String HADOOP_SECURITY_SENSITIVE_CONFIG_KEYS_DEFAULT =
-      String.join(",",
-          "secret$",
-          "password$",
-          "ssl.keystore.pass$",
-          "fs.s3.*[Ss]ecret.?[Kk]ey",
-          "fs.azure\\.account.key.*",
-          "credential$",
-          "oauth.*token$",
-          HADOOP_SECURITY_SENSITIVE_CONFIG_KEYS);
+      "secret$" + "," +
+      "password$" + "," +
+      "ssl.keystore.pass$" + "," +
+      "fs.s3.*[Ss]ecret.?[Kk]ey" + "," +
+      "fs.azure\\.account.key.*" + "," +
+      "dfs.webhdfs.oauth2.[a-z]+.token" + "," +
+      HADOOP_SECURITY_SENSITIVE_CONFIG_KEYS;
 }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ef74a566/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
index 685d565..61c9df7 100644
--- a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
+++ b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
@@ -526,18 +526,9 @@
 
 <property>
   <name>hadoop.security.sensitive-config-keys</name>
-  <value>
-      secret$
-      password$
-      ssl.keystore.pass$
-      fs.s3.*[Ss]ecret.?[Kk]ey
-      fs.azure.account.key.*
-      credential$
-      oauth.*token$
-      hadoop.security.sensitive-config-keys
-  </value>
-  <description>A comma-separated or multi-line list of regular expressions to
-      match configuration keys that should be redacted where appropriate, for
+  <value>secret$,password$,ssl.keystore.pass$,fs.s3.*[Ss]ecret.?[Kk]ey,fs.azure.account.key.*,dfs.webhdfs.oauth2.[a-z]+.token,hadoop.security.sensitive-config-keys</value>
+  <description>A comma-separated list of regular expressions to match against
+      configuration keys that should be redacted where appropriate, for
       example, when logging modified properties during a reconfiguration,
       private credentials should not be logged.
   </description>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ef74a566/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigRedactor.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigRedactor.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigRedactor.java
index ba08de4..eedb9b2 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigRedactor.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigRedactor.java
@@ -34,30 +34,15 @@ public class TestConfigRedactor {
   private static final String ORIGINAL_VALUE = "Hello, World!";
 
   @Test
-  public void testRedactWithCoreDefault() throws Exception {
+  public void redact() throws Exception {
     Configuration conf = new Configuration();
-    testRedact(conf);
-  }
-
-  @Test
-  public void testRedactNoCoreDefault() throws Exception {
-    Configuration conf = new Configuration(false);
-    testRedact(conf);
-  }
-
-  private void testRedact(Configuration conf) throws Exception {
     ConfigRedactor redactor = new ConfigRedactor(conf);
     String processedText;
 
     List<String> sensitiveKeys = Arrays.asList(
         "fs.s3a.secret.key",
-        "fs.s3a.bucket.BUCKET.secret.key",
         "fs.s3n.awsSecretKey",
         "fs.azure.account.key.abcdefg.blob.core.windows.net",
-        "fs.adl.oauth2.refresh.token",
-        "fs.adl.oauth2.credential",
-        "dfs.adls.oauth2.refresh.token",
-        "dfs.adls.oauth2.credential",
         "dfs.webhdfs.oauth2.access.token",
         "dfs.webhdfs.oauth2.refresh.token",
         "ssl.server.keystore.keypassword",


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message