diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java b/agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java index 6a614bf2d6..5a9fffaef9 100644 --- a/agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java +++ b/agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java @@ -76,6 +76,7 @@ public class RangerBasePlugin { private final List chainedPlugins; private final boolean dedupStrings; private boolean isUserStoreEnricherAddedImplcitly = false; + private Map serviceConfigs; public RangerBasePlugin(String serviceType, String appId) { @@ -308,7 +309,7 @@ public void setPolicies(ServicePolicies policies) { if (LOG.isDebugEnabled()) { LOG.debug("==> setPolicies(" + policies + ")"); } - + this.serviceConfigs = (policies != null && policies.getServiceConfig() != null) ? policies.getServiceConfig() : new HashMap<>(); if (pluginConfig.isEnableImplicitUserStoreEnricher() && policies != null && !ServiceDefUtil.isUserStoreEnricherPresent(policies)) { String retrieverClassName = pluginConfig.get(RangerUserStoreEnricher.USERSTORE_RETRIEVER_CLASSNAME_OPTION, RangerAdminUserStoreRetriever.class.getCanonicalName()); String retrieverPollIntMs = pluginConfig.get(RangerUserStoreEnricher.USERSTORE_REFRESHER_POLLINGINTERVAL_OPTION, Integer.toString(60 * 1000)); @@ -1241,6 +1242,10 @@ public static RangerResourceACLs getMergedResourceACLs(RangerResourceACLs baseAC return baseACLs; } + public Map getServiceConfigs() { + return serviceConfigs; + } + protected RangerPolicyEngine getPolicyEngine() { return policyEngine; }