You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Rakesh Gupta <ra...@gmail.com> on 2024/05/21 12:46:25 UTC

Review Request 75004: RANGER-4795: Add validation in API to check emptyness on policyitem while creating policy.

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

Review request for ranger, Dineshkumar Yadav, Kishor Gollapalliwar, Mehul Parikh, Pradeep Agrawal, and sanket shelar.


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


Repository: ranger


Description
-------

There is an inconsistency between Ranger API and UI not doing the same validation for Policy creation. 

Policy creation API should fail when a policy with all empty values and along with  [""]  or  ["null"] in policyItem --> users, groups and roles.


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyValidator.java 462246a3e 


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


Testing
-------

Verified while creating/updating Policy API fails, when users/groups/roles fields are all empty values or contain arrays with empty strings (e.g. [""]) within the policy items.


Thanks,

Rakesh Gupta


Re: Review Request 75004: RANGER-4795: Add validation in API to check emptyness on policyitem while creating policy.

Posted by Rakesh Gupta <ra...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75004/
-----------------------------------------------------------

(Updated May 29, 2024, 10:57 a.m.)


Review request for ranger, Dineshkumar Yadav, Kishor Gollapalliwar, Mehul Parikh, Pradeep Agrawal, and sanket shelar.


Changes
-------

Added validation for Mask & Row level policy


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


Repository: ranger


Description
-------

There is an inconsistency between Ranger API and UI not doing the same validation for Policy creation. 

Policy creation API should fail when a policy with all empty values and along with  [""]  or  ["null"] in policyItem --> users, groups and roles.


Diffs (updated)
-----

  agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerPolicyValidator.java 462246a3e 
  agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerPolicyValidator.java 7e16082bc 


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

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


Testing
-------

Verified while creating/updating Policy API fails, when users/groups/roles fields are all empty values or contain arrays with empty strings (e.g. [""]) within the policy items.


Thanks,

Rakesh Gupta