Search in sources :

Example 11 with RangerPluginContext

use of org.apache.ranger.plugin.policyengine.RangerPluginContext in project ranger by apache.

the class RangerAbstractContextEnricher method getConfig.

public String getConfig(String configName, String defaultValue) {
    RangerPluginContext pluginContext = this.pluginContext;
    String ret = defaultValue;
    Configuration config = pluginContext != null ? pluginContext.getConfig() : null;
    if (config != null) {
        ret = config.get(configName, defaultValue);
    }
    return ret;
}
Also used : RangerPluginContext(org.apache.ranger.plugin.policyengine.RangerPluginContext) Configuration(org.apache.hadoop.conf.Configuration)

Aggregations

RangerPluginContext (org.apache.ranger.plugin.policyengine.RangerPluginContext)11 RangerPluginConfig (org.apache.ranger.authorization.hadoop.config.RangerPluginConfig)6 Configuration (org.apache.hadoop.conf.Configuration)3 RangerAdminClient (org.apache.ranger.admin.client.RangerAdminClient)2 RangerPolicy (org.apache.ranger.plugin.model.RangerPolicy)2 RangerAccessRequest (org.apache.ranger.plugin.policyengine.RangerAccessRequest)2 RangerPolicyEngineImpl (org.apache.ranger.plugin.policyengine.RangerPolicyEngineImpl)2 RangerPolicyEngineOptions (org.apache.ranger.plugin.policyengine.RangerPolicyEngineOptions)2 ServicePolicies (org.apache.ranger.plugin.util.ServicePolicies)2 HashSet (java.util.HashSet)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 TestData (org.apache.ranger.authorization.hbase.TestPolicyEngine.PolicyEngineTestCase.TestData)1 TestData (org.apache.ranger.biz.TestPolicyDb.PolicyDbTestCase.TestData)1 RangerDefaultAuditHandler (org.apache.ranger.plugin.audit.RangerDefaultAuditHandler)1 RangerRole (org.apache.ranger.plugin.model.RangerRole)1 RangerServiceDef (org.apache.ranger.plugin.model.RangerServiceDef)1 RangerAccessResult (org.apache.ranger.plugin.policyengine.RangerAccessResult)1 RangerAccessResultProcessor (org.apache.ranger.plugin.policyengine.RangerAccessResultProcessor)1 RangerPolicyEngine (org.apache.ranger.plugin.policyengine.RangerPolicyEngine)1 Test (org.junit.Test)1