Ramachandran Krishnan created RANGER-5888:
---------------------------------------------

             Summary: Add policyengine option to disable RangerTagEnricher
                 Key: RANGER-5888
                 URL: https://issues.apache.org/jira/browse/RANGER-5888
             Project: Ranger
          Issue Type: Improvement
          Components: Ranger
    Affects Versions: 3.0.0
            Reporter: Ramachandran Krishnan
            Assignee: Ramachandran Krishnan
             Fix For: 3.0.0


h3. Summary

Add a Ranger policy engine option to disable {{{}RangerTagEnricher{}}}.

This lets plugins skip creating {{RangerTagEnricher}} when tags are already 
supplied on the access request
h3. Context

{{ranger.plugin.<service>.policyengine.option.disable.tag.retriever=true}} only 
removes the tag retriever from enricher options.

{{RangerTagEnricher}} is still created and runs on every request. With no 
TagSync tags, it finds no matches and overwrites request context tags. Because 
of this, tag-based policies do not match even when the client sent tags.
h3. Acceptance criteria
 * Add {{disableTagEnricher}} to {{{}RangerPolicyEngineOptions{}}}.

 * Read it from:

 ** {{{propertyPrefix}.policyengine.option.disable.tag.enricher}}

 ** default: {{false}}

 * When {{{}true{}}}, {{RangerPolicyRepository.buildContextEnrichers()}} must 
not instantiate {{{}RangerTagEnricher{}}}.

 * Request-supplied tags must remain in context for tag policy evaluation.

 * Add {{boolean disableTagEnricher}} and wire it in all {{configure*()}} 
methods.

 * Update {{{}equals{}}}, {{{}hashCode{}}}, {{{}toString{}}}, and the copy 
constructor.

 * In {{{}buildContextEnrichers(){}}}, skip enricher definitions whose class is 
{{RangerTagEnricher}} when the flag is set.

 * Add a unit test to verify the tag enricher is not created when the flag is 
enabled.

 



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to