Search in sources :

Example 11 with RangerTagForEval

use of org.apache.ranger.plugin.contextenricher.RangerTagForEval in project ranger by apache.

the class RangerDefaultAuditHandler method getTags.

protected final Set<String> getTags(RangerAccessRequest request) {
    Set<String> ret = null;
    Set<RangerTagForEval> tags = RangerAccessRequestUtil.getRequestTagsFromContext(request.getContext());
    if (CollectionUtils.isNotEmpty(tags)) {
        ret = new HashSet<>();
        for (RangerTagForEval tag : tags) {
            ret.add(writeObjectAsString(tag));
        }
    }
    return ret;
}
Also used : RangerTagForEval(org.apache.ranger.plugin.contextenricher.RangerTagForEval)

Aggregations

RangerTagForEval (org.apache.ranger.plugin.contextenricher.RangerTagForEval)11 RangerPolicyEvaluator (org.apache.ranger.plugin.policyevaluator.RangerPolicyEvaluator)4 JsonParseException (com.google.gson.JsonParseException)1 TypeToken (com.google.gson.reflect.TypeToken)1 Type (java.lang.reflect.Type)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 Set (java.util.Set)1 Bindings (javax.script.Bindings)1 ScriptException (javax.script.ScriptException)1 RangerDefaultAuditHandler (org.apache.ranger.plugin.audit.RangerDefaultAuditHandler)1 RangerPolicy (org.apache.ranger.plugin.model.RangerPolicy)1 RangerAccessRequest (org.apache.ranger.plugin.policyengine.RangerAccessRequest)1 TestData (org.apache.ranger.plugin.policyengine.TestPolicyEngine.PolicyEngineTestCase.TestData)1 RangerPolicyResourceMatcher (org.apache.ranger.plugin.policyresourcematcher.RangerPolicyResourceMatcher)1 RangerRequestedResources (org.apache.ranger.plugin.util.RangerRequestedResources)1 ServicePolicies (org.apache.ranger.plugin.util.ServicePolicies)1