You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Alok Lal <al...@hortonworks.com> on 2015/04/02 00:16:45 UTC

Review Request 32746: RANGER-354 - Policy validation: Prevent creation/update of policies for the same resource

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

Review request for ranger.


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


Repository: ranger


Description
-------

Policy validation: Prevent creation/update of policies for the same resource


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/RangerObjectFactory.java PRE-CREATION 
  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyResourceSignature.java PRE-CREATION 
  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyValidator.java f5d6bff 
  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerValidator.java 7bf744e 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerPolicyResourceSignature.java PRE-CREATION 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerPolicyValidator.java e0f68ad 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerValidator.java f17b2c2 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/ValidationTestUtils.java 5ed2691 

Diff: https://reviews.apache.org/r/32746/diff/


Testing
-------

- Existing junits pass
- New junits tests added for unit and integration testing


Thanks,

Alok Lal


Re: Review Request 32746: RANGER-354 - Policy validation: Prevent creation/update of policies for the same resource

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32746/#review78623
-----------------------------------------------------------



agents-common/src/main/java/org/apache/ranger/RangerObjectFactory.java
<https://reviews.apache.org/r/32746/#comment127539>

    Consider moving this class to an inner package - like org.apache.ranger.plugin.util.



agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyResourceSignature.java
<https://reviews.apache.org/r/32746/#comment127541>

    It will be safer to add else class here: "else { builder.append(Boolean.FALSE); }"



agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyValidator.java
<https://reviews.apache.org/r/32746/#comment127542>

    During policy update, we should skip this check against the policy with the same ID.


- Madhan Neethiraj


On April 1, 2015, 10:16 p.m., Alok Lal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32746/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 10:16 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-354
>     https://issues.apache.org/jira/browse/RANGER-354
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Policy validation: Prevent creation/update of policies for the same resource
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/RangerObjectFactory.java PRE-CREATION 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyResourceSignature.java PRE-CREATION 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyValidator.java f5d6bff 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerValidator.java 7bf744e 
>   agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerPolicyResourceSignature.java PRE-CREATION 
>   agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerPolicyValidator.java e0f68ad 
>   agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerValidator.java f17b2c2 
>   agents-common/src/test/java/org/apache/ranger/plugin/model/validation/ValidationTestUtils.java 5ed2691 
> 
> Diff: https://reviews.apache.org/r/32746/diff/
> 
> 
> Testing
> -------
> 
> - Existing junits pass
> - New junits tests added for unit and integration testing
> 
> 
> Thanks,
> 
> Alok Lal
> 
>


Re: Review Request 32746: RANGER-354 - Policy validation: Prevent creation/update of policies for the same resource

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32746/#review78636
-----------------------------------------------------------

Ship it!


Ship It!

- Madhan Neethiraj


On April 2, 2015, 1:44 a.m., Alok Lal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32746/
> -----------------------------------------------------------
> 
> (Updated April 2, 2015, 1:44 a.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-354
>     https://issues.apache.org/jira/browse/RANGER-354
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Policy validation: Prevent creation/update of policies for the same resource
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/RangerObjectFactory.java PRE-CREATION 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyResourceSignature.java PRE-CREATION 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyValidator.java f5d6bff 
>   agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerValidator.java 7bf744e 
>   agents-common/src/main/java/org/apache/ranger/plugin/util/RangerObjectFactory.java PRE-CREATION 
>   agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerPolicyResourceSignature.java PRE-CREATION 
>   agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerPolicyValidator.java e0f68ad 
> 
> Diff: https://reviews.apache.org/r/32746/diff/
> 
> 
> Testing
> -------
> 
> - Existing junits pass
> - New junits tests added for unit and integration testing
> 
> 
> Thanks,
> 
> Alok Lal
> 
>


Re: Review Request 32746: RANGER-354 - Policy validation: Prevent creation/update of policies for the same resource

Posted by Alok Lal <al...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32746/
-----------------------------------------------------------

(Updated April 1, 2015, 6:44 p.m.)


Review request for ranger.


Changes
-------

Addressed review comments.
- Added new tests for additional scenarios (update) and flags (null and excludes)


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


Repository: ranger


Description
-------

Policy validation: Prevent creation/update of policies for the same resource


Diffs (updated)
-----

  agents-common/src/main/java/org/apache/ranger/RangerObjectFactory.java PRE-CREATION 
  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyResourceSignature.java PRE-CREATION 
  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyValidator.java f5d6bff 
  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerValidator.java 7bf744e 
  agents-common/src/main/java/org/apache/ranger/plugin/util/RangerObjectFactory.java PRE-CREATION 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerPolicyResourceSignature.java PRE-CREATION 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerPolicyValidator.java e0f68ad 

Diff: https://reviews.apache.org/r/32746/diff/


Testing
-------

- Existing junits pass
- New junits tests added for unit and integration testing


Thanks,

Alok Lal