hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cnaur...@apache.org
Subject [2/3] hadoop git commit: HADOOP-13422. ZKDelegationTokenSecretManager JaasConfig does not work well with other ZK users in process. Contributed by Sergey Shelukhin.
Date Tue, 26 Jul 2016 22:48:58 GMT
HADOOP-13422. ZKDelegationTokenSecretManager JaasConfig does not work well with other ZK users
in process. Contributed by Sergey Shelukhin.

(cherry picked from commit 255ea45e50e102505ee61eb0ba45ea93035abe3c)


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

Branch: refs/heads/branch-2
Commit: df2ed6b2c4f5b42a57e211e58d4a7350c9ac6fb8
Parents: df509a8
Author: Chris Nauroth <cnauroth@apache.org>
Authored: Tue Jul 26 15:33:20 2016 -0700
Committer: Chris Nauroth <cnauroth@apache.org>
Committed: Tue Jul 26 15:33:30 2016 -0700

----------------------------------------------------------------------
 .../security/authentication/util/ZKSignerSecretProvider.java    | 5 ++++-
 .../token/delegation/ZKDelegationTokenSecretManager.java        | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/df2ed6b2/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java
b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java
index 0e75cbd..1d16b2d 100644
--- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java
+++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java
@@ -436,6 +436,8 @@ public class ZKSignerSecretProvider extends RolloverSignerSecretProvider
{
   @InterfaceAudience.Private
   public static class JaasConfiguration extends Configuration {
 
+    private final javax.security.auth.login.Configuration baseConfig =
+        javax.security.auth.login.Configuration.getConfiguration();
     private static AppConfigurationEntry[] entry;
     private String entryName;
 
@@ -468,7 +470,8 @@ public class ZKSignerSecretProvider extends RolloverSignerSecretProvider
{
 
     @Override
     public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
-      return (entryName.equals(name)) ? entry : null;
+      return (entryName.equals(name)) ? entry : ((baseConfig != null)
+        ? baseConfig.getAppConfigurationEntry(name) : null);
     }
 
     private String getKrb5LoginModuleName() {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/df2ed6b2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java
index 88b81b0..c3ad9f3 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java
@@ -242,6 +242,8 @@ public abstract class ZKDelegationTokenSecretManager<TokenIdent extends
Abstract
   public static class JaasConfiguration extends
       javax.security.auth.login.Configuration {
 
+    private final javax.security.auth.login.Configuration baseConfig =
+        javax.security.auth.login.Configuration.getConfiguration();
     private static AppConfigurationEntry[] entry;
     private String entryName;
 
@@ -277,7 +279,8 @@ public abstract class ZKDelegationTokenSecretManager<TokenIdent extends
Abstract
 
     @Override
     public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
-      return (entryName.equals(name)) ? entry : null;
+      return (entryName.equals(name)) ? entry : ((baseConfig != null)
+        ? baseConfig.getAppConfigurationEntry(name) : null);
     }
 
     private String getKrb5LoginModuleName() {


---------------------------------------------------------------------
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