----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/69930/#review212810 -----------------------------------------------------------
agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerSecurityZoneValidator.java Line 172 (original), 170 (patched) <https://reviews.apache.org/r/69930/#comment298701> Please ensure that there is only one return statement in a procedure (which is at the end of the procedure). This helps in correlating entry and exit to a procedure when analysing debug log. agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerSecurityZoneValidator.java Lines 253 (patched) <https://reviews.apache.org/r/69930/#comment298703> Code formatting: 1. Consider using the same tag spacing as used everywhere else in the file. 2. For better readability, consider surrounding operators including '=' and '!=' operators, with single space, here and elsewhere. 3. Consider adding a space after 'if'. agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerSecurityZoneValidator.java Lines 254 (patched) <https://reviews.apache.org/r/69930/#comment298702> Please consider using a for loop for traversing the map. It may save a few lines of code. security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql Line 2690 (original), 2691 (patched) <https://reviews.apache.org/r/69930/#comment298704> Was this a bug in the earlier version of this SQL script? - Abhay Kulkarni On Feb. 13, 2019, 3:01 a.m., Pradeep Agrawal wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/69930/ > ----------------------------------------------------------- > > (Updated Feb. 13, 2019, 3:01 a.m.) > > > Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, > Nikhil P, Nitin Galave, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, and > Velmurugan Periasamy. > > > Bugs: RANGER-2333 > https://issues.apache.org/jira/browse/RANGER-2333 > > > Repository: ranger > > > Description > ------- > > **Problem Stamtents:** > > 1) Zone Description field does not exist in x_security_zone table hence zone > desciption provided in UI does not get saved. > 2) Zone name with blank space can be created which should be restricted. > 3) adminUsers or adminUsersGroups and auditUsers or auditUsersGroups and > Resource field should be restricted for blank values. > 4) All users should have access to Security zone module. > 5) If users are not allowed to create service zone then the response code > should be 403 rather 400. > > **Proposed Solutions:** > > 1) Added a column in x_security_zone table added code to add/update > description field values. > 2) Trimmed the zone name value before the existing validation check. > 3) Removed empty list items from the various list before the validation. > 4) Added access on the security zone module to all users. > 5) Changed response code and message. > > > Diffs > ----- > > > agents-common/src/main/java/org/apache/ranger/plugin/model/RangerSecurityZone.java > 9eaf10214 > > agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerSecurityZoneValidator.java > 40137072a > > agents-common/src/test/java/org/apache/ranger/plugin/model/validation/RangerSecurityZoneValidatorTest.java > b16ccd6a4 > security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql > 71cfa8f8c > security-admin/db/mysql/patches/037-create-security-zone-schema.sql > 0df549137 > security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql > 6b569f254 > security-admin/db/oracle/patches/037-create-security-zone-schema.sql > e71f3db38 > security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql > a4e93cada > security-admin/db/postgres/patches/037-create-security-zone-schema.sql > e81da8078 > > security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql > 71f0ba410 > security-admin/db/sqlanywhere/patches/037-create-security-zone-schema.sql > b96b6e5c5 > security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql > d69c2dd37 > security-admin/db/sqlserver/patches/037-create-security-zone-schema.sql > 1c687220b > security-admin/src/main/java/org/apache/ranger/biz/RangerBizUtil.java > d350fd1c0 > security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java 933e99fff > > security-admin/src/main/java/org/apache/ranger/entity/XXSecurityZoneBase.java > 9c7871041 > > security-admin/src/main/java/org/apache/ranger/patch/PatchAssignSecurityZonePersmissionToAdmin_J10026.java > 64e39e391 > security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java > 1145122cf > > security-admin/src/main/java/org/apache/ranger/service/RangerSecurityZoneService.java > cc796d5aa > > security-admin/src/main/java/org/apache/ranger/service/RangerSecurityZoneServiceBase.java > 0620441b9 > > security-admin/src/test/java/org/apache/ranger/rest/TestSecurityZoneREST.java > 456b858a3 > > > Diff: https://reviews.apache.org/r/69930/diff/2/ > > > Testing > ------- > > Tested above mentioned usecases on my local environments. > > > Thanks, > > Pradeep Agrawal > >
