[ 
https://issues.apache.org/jira/browse/RANGER-5888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18150630#comment-18150630
 ] 

Ramachandran Krishnan commented on RANGER-5888:
-----------------------------------------------

This commit 
:[https://github.com/apache/ranger/commit/61dadb05036db576fca36a9c118184f99ccb84d6]
 merged into master

> 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
>            Priority: Major
>             Fix For: 3.0.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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