accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [accumulo] branch master updated: Fix #529 Fix SASL impersonation tests
Date Thu, 14 Jun 2018 04:30:31 GMT
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/master by this push:
     new de2ade5  Fix #529 Fix SASL impersonation tests
de2ade5 is described below

commit de2ade5e616c7b38da9c5dc3fdceefd33610eed8
Author: Christopher Tubbs <ctubbsii@apache.org>
AuthorDate: Thu Jun 14 00:25:01 2018 -0400

    Fix #529 Fix SASL impersonation tests
    
    Restore previous behavior to satisfy test conditions that a default
    value for the impersonation users will result in a NOOP.
---
 .../org/apache/accumulo/server/security/UserImpersonation.java     | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/UserImpersonation.java
b/server/base/src/main/java/org/apache/accumulo/server/security/UserImpersonation.java
index 187e8b5..a5ac0d5 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/UserImpersonation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/UserImpersonation.java
@@ -22,6 +22,7 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
@@ -178,6 +179,12 @@ public class UserImpersonation {
     proxyUsers = new HashMap<>();
 
     final String userConfigString = conf.get(Property.INSTANCE_RPC_SASL_ALLOWED_USER_IMPERSONATION);
+    if (Objects.equals(userConfigString,
+        Property.INSTANCE_RPC_SASL_ALLOWED_USER_IMPERSONATION.getDefaultValue())) {
+      // impersonation is not configured
+      return;
+    }
+
     final String hostConfigString = conf.get(Property.INSTANCE_RPC_SASL_ALLOWED_HOST_IMPERSONATION);
     // Pull out the config values, defaulting to at least one value
     final String[] userConfigs = userConfigString.trim().isEmpty() ? new String[] {""}

-- 
To stop receiving notification emails like this one, please contact
ctubbsii@apache.org.

Mime
View raw message