HADOOP-13422. ZKDelegationTokenSecretManager JaasConfig does not work well with other ZK users in process. Contributed by Sergey Shelukhin.
This commit is contained in:
parent
5aace38b74
commit
255ea45e50
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue