diff options
author | Sorabh Hamirwasia <shamirwasia@maprtech.com> | 2017-02-01 18:44:21 -0800 |
---|---|---|
committer | Aman Sinha <asinha@maprtech.com> | 2017-05-20 16:16:21 -0700 |
commit | ce8bbc01cfde7d714185919be2ca2923d19ea890 (patch) | |
tree | 9f9217a79d08a39f9f90171f1d01e2e69a142afd /common/src/main | |
parent | 416ec70a616e8d12b5c7fca809763b977d2f7aad (diff) |
DRILL-4335: Apache Drill should support network encryption.
NOTE: This pull request provides support for on-wire encryption using SASL framework. The communication channel that are covered are:
1) Between Drill JDBC client and Drillbit.
2) Between Drillbit to Drillbit i.e. control/data channels.
3) It has UI change to view encryption is enabled on which network channel and number of encrypted/unencrypted connections for
user/control/data connections.
close apache/drill#773
Diffstat (limited to 'common/src/main')
-rw-r--r-- | common/src/main/java/org/apache/drill/common/config/DrillProperties.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/common/src/main/java/org/apache/drill/common/config/DrillProperties.java b/common/src/main/java/org/apache/drill/common/config/DrillProperties.java index c7e6e298f..75064e035 100644 --- a/common/src/main/java/org/apache/drill/common/config/DrillProperties.java +++ b/common/src/main/java/org/apache/drill/common/config/DrillProperties.java @@ -17,6 +17,7 @@ */ package org.apache.drill.common.config; +import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableSet; import org.apache.drill.exec.proto.UserProtos.Property; import org.apache.drill.exec.proto.UserProtos.UserProperties; @@ -59,6 +60,12 @@ public final class DrillProperties extends Properties { public static final String KEYTAB = "keytab"; + public static final String SASL_ENCRYPT = "sasl_encrypt"; + + // Should only be used for testing backward compatibility + @VisibleForTesting + public static final String TEST_SASL_LEVEL = "test_sasl_level"; + // for subject that has pre-authenticated to KDC (AS) i.e. required credentials are populated in // Subject's credentials set public static final String KERBEROS_FROM_SUBJECT = "from_subject"; @@ -110,6 +117,15 @@ public final class DrillProperties extends Properties { } } + public void merge(final Map<String, String> overrides) { + if (overrides == null) { + return; + } + for (final String key : overrides.keySet()) { + setProperty(key.toLowerCase(), overrides.get(key)); + } + } + /** * Returns a map of keys and values in this property list where the key and its corresponding value are strings, * including distinct keys in the default property list if a key of the same name has not already been found from |