You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Sailaja Polavarapu <sp...@hortonworks.com> on 2018/09/25 21:52:26 UTC

Review Request 68843: RANGER-2218: Service-Definition update should not allow updates to names of resources, access-types, conditions or data-masks

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

Review request for ranger.


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


Repository: ranger


Description
-------

Added validations for names during servicedef updates. Modified some of the unit tests according to new changes. Also added validations to restrict updates for username or groupname.


Diffs
-----

  pom.xml 756eccbfd 


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


Testing
-------

1. Tested running curl calls to update existing service def.
2. Verfied all the exsting unit tests ran successfully.


Thanks,

Sailaja Polavarapu


Re: Review Request 68843: RANGER-2218: Service-Definition update should not allow updates to names of resources, access-types, conditions or data-masks

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


Ship it!




Ship It!

- Abhay Kulkarni


On Sept. 26, 2018, 5:16 p.m., Sailaja Polavarapu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68843/
> -----------------------------------------------------------
> 
> (Updated Sept. 26, 2018, 5:16 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2218
>     https://issues.apache.org/jira/browse/RANGER-2218
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Added validations for names during servicedef updates. Modified some of the unit tests according to new changes. Also added validations to restrict updates for username or groupname.
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceDefValidator.java d73210ee3 
>   agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerServiceDefValidator.java decf07cce 
>   security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java b1ea280c9 
> 
> 
> Diff: https://reviews.apache.org/r/68843/diff/3/
> 
> 
> Testing
> -------
> 
> 1. Tested running curl calls to update existing service def.
> 2. Verfied all the exsting unit tests ran successfully.
> 
> 
> Thanks,
> 
> Sailaja Polavarapu
> 
>


Re: Review Request 68843: RANGER-2218: Service-Definition update should not allow updates to names of resources, access-types, conditions or data-masks

Posted by Sailaja Polavarapu <sp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68843/
-----------------------------------------------------------

(Updated Sept. 26, 2018, 5:16 p.m.)


Review request for ranger.


Changes
-------

Incorporated review comments


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


Repository: ranger


Description
-------

Added validations for names during servicedef updates. Modified some of the unit tests according to new changes. Also added validations to restrict updates for username or groupname.


Diffs (updated)
-----

  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceDefValidator.java d73210ee3 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerServiceDefValidator.java decf07cce 
  security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java b1ea280c9 


Diff: https://reviews.apache.org/r/68843/diff/3/

Changes: https://reviews.apache.org/r/68843/diff/2-3/


Testing
-------

1. Tested running curl calls to update existing service def.
2. Verfied all the exsting unit tests ran successfully.


Thanks,

Sailaja Polavarapu


Re: Review Request 68843: RANGER-2218: Service-Definition update should not allow updates to names of resources, access-types, conditions or data-masks

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




agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceDefValidator.java
Line 22 (original), 22 (patched)
<https://reviews.apache.org/r/68843/#comment293276>

    Please try not to use * in includes



agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceDefValidator.java
Lines 260 (patched)
<https://reviews.apache.org/r/68843/#comment293277>

    Please remove commented code



agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceDefValidator.java
Lines 338 (patched)
<https://reviews.apache.org/r/68843/#comment293278>

    As above



security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java
Line 354 (original), 359 (patched)
<https://reviews.apache.org/r/68843/#comment293279>

    With additional code starting from line 350, can we remove this TODO comment?



security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java
Lines 863 (patched)
<https://reviews.apache.org/r/68843/#comment293280>

    Is a check for xGroup being null (group not existing) required before de-referencing xGroup?


- Abhay Kulkarni


On Sept. 25, 2018, 10:05 p.m., Sailaja Polavarapu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68843/
> -----------------------------------------------------------
> 
> (Updated Sept. 25, 2018, 10:05 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2218
>     https://issues.apache.org/jira/browse/RANGER-2218
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Added validations for names during servicedef updates. Modified some of the unit tests according to new changes. Also added validations to restrict updates for username or groupname.
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceDefValidator.java d73210ee3 
>   agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerServiceDefValidator.java decf07cce 
>   security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java b1ea280c9 
> 
> 
> Diff: https://reviews.apache.org/r/68843/diff/2/
> 
> 
> Testing
> -------
> 
> 1. Tested running curl calls to update existing service def.
> 2. Verfied all the exsting unit tests ran successfully.
> 
> 
> Thanks,
> 
> Sailaja Polavarapu
> 
>


Re: Review Request 68843: RANGER-2218: Service-Definition update should not allow updates to names of resources, access-types, conditions or data-masks

Posted by Sailaja Polavarapu <sp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68843/
-----------------------------------------------------------

(Updated Sept. 25, 2018, 10:05 p.m.)


Review request for ranger.


Changes
-------

uploaded correct diff file


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


Repository: ranger


Description
-------

Added validations for names during servicedef updates. Modified some of the unit tests according to new changes. Also added validations to restrict updates for username or groupname.


Diffs (updated)
-----

  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceDefValidator.java d73210ee3 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerServiceDefValidator.java decf07cce 
  security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java b1ea280c9 


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

Changes: https://reviews.apache.org/r/68843/diff/1-2/


Testing
-------

1. Tested running curl calls to update existing service def.
2. Verfied all the exsting unit tests ran successfully.


Thanks,

Sailaja Polavarapu