You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Pradeep Agrawal <pr...@gmail.com> on 2022/03/02 13:09:22 UTC

Review Request 73882: RANGER-3600: Ranger service tags import request failure

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73882/
-----------------------------------------------------------

Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.


Bugs: RANGER-3600
    https://issues.apache.org/jira/browse/RANGER-3600


Repository: ranger


Description
-------

**Problem Statement:** Ranger service tag import request may fail if RangerServiceResource objects of ServiceTags objects does not have ranger service name attribute values. 

**Proposed Solution** 
1) Use service name avaiable in the parent object(Servicetag object)
2) Do not prune service name field while populating the RangerServiceResource objects of the ServiceTag object.
3) If guid is missing or service resource is not found based on guid then try to find based on resource signature value. if not exist then do the create operation.


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/plugin/util/RangerServiceTagsDeltaUtil.java 76d5fd989 
  security-admin/src/main/java/org/apache/ranger/rest/ServiceTagsProcessor.java 3897f48e2 


Diff: https://reviews.apache.org/r/73882/diff/1/


Testing
-------

Tested the patch and able to import ServiceTags even if ServiceTags json does not have service names in RangerServiceResource objects.


Thanks,

Pradeep Agrawal


Re: Review Request 73882: RANGER-3600: Ranger service tags import request failure

Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73882/#review224114
-----------------------------------------------------------




security-admin/src/main/java/org/apache/ranger/rest/ServiceTagsProcessor.java
Line 156 (original), 156 (patched)
<https://reviews.apache.org/r/73882/#comment313062>

    This changes the semantics of the REST API. Why is this change required? Please review.


- Abhay Kulkarni


On March 2, 2022, 1:09 p.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73882/
> -----------------------------------------------------------
> 
> (Updated March 2, 2022, 1:09 p.m.)
> 
> 
> Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3600
>     https://issues.apache.org/jira/browse/RANGER-3600
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:** Ranger service tag import request may fail if RangerServiceResource objects of ServiceTags objects does not have ranger service name attribute values. 
> 
> **Proposed Solution** 
> 1) Use service name avaiable in the parent object(Servicetag object)
> 2) Do not prune service name field while populating the RangerServiceResource objects of the ServiceTag object.
> 3) If guid is missing or service resource is not found based on guid then try to find based on resource signature value. if not exist then do the create operation.
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/util/RangerServiceTagsDeltaUtil.java 76d5fd989 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceTagsProcessor.java 3897f48e2 
> 
> 
> Diff: https://reviews.apache.org/r/73882/diff/1/
> 
> 
> Testing
> -------
> 
> Tested the patch and able to import ServiceTags even if ServiceTags json does not have service names in RangerServiceResource objects.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>


Re: Review Request 73882: RANGER-3600: Ranger service tags import request failure

Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73882/#review224348
-----------------------------------------------------------


Ship it!




Ship It!

- Abhay Kulkarni


On April 11, 2022, 1:17 p.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73882/
> -----------------------------------------------------------
> 
> (Updated April 11, 2022, 1:17 p.m.)
> 
> 
> Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3600
>     https://issues.apache.org/jira/browse/RANGER-3600
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:** Ranger service tag import request may fail if RangerServiceResource objects of ServiceTags objects does not have ranger service name attribute values. 
> 
> **Proposed Solution:** 
> 1) Use service name avaiable in the parent object(Servicetag object)
> 2) Do not prune service name field while populating the RangerServiceResource objects of the ServiceTag object.
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/util/RangerServiceTagsDeltaUtil.java 76d5fd989 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceTagsProcessor.java 3897f48e2 
> 
> 
> Diff: https://reviews.apache.org/r/73882/diff/2/
> 
> 
> Testing
> -------
> 
> Tested the patch and able to import ServiceTags even if ServiceTags json does not have service names in RangerServiceResource objects.
> Tested for mysql, oracle and postgres db flavor.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>


Re: Review Request 73882: RANGER-3600: Ranger service tags import request failure

Posted by Pradeep Agrawal <pr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73882/
-----------------------------------------------------------

(Updated April 11, 2022, 1:17 p.m.)


Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.


Bugs: RANGER-3600
    https://issues.apache.org/jira/browse/RANGER-3600


Repository: ranger


Description (updated)
-------

**Problem Statement:** Ranger service tag import request may fail if RangerServiceResource objects of ServiceTags objects does not have ranger service name attribute values. 

**Proposed Solution:** 
1) Use service name avaiable in the parent object(Servicetag object)
2) Do not prune service name field while populating the RangerServiceResource objects of the ServiceTag object.


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/plugin/util/RangerServiceTagsDeltaUtil.java 76d5fd989 
  security-admin/src/main/java/org/apache/ranger/rest/ServiceTagsProcessor.java 3897f48e2 


Diff: https://reviews.apache.org/r/73882/diff/2/


Testing (updated)
-------

Tested the patch and able to import ServiceTags even if ServiceTags json does not have service names in RangerServiceResource objects.
Tested for mysql, oracle and postgres db flavor.


Thanks,

Pradeep Agrawal