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


Ship it!




Ship It!

- Abhay Kulkarni


On Sept. 21, 2021, 7:14 a.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73594/
> -----------------------------------------------------------
> 
> (Updated Sept. 21, 2021, 7:14 a.m.)
> 
> 
> Review request for ranger, Dineshkumar Yadav, Abhay Kulkarni, Madhan 
> Neethiraj, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, and Velmurugan 
> Periasamy.
> 
> 
> Bugs: RANGER-3435
>     https://issues.apache.org/jira/browse/RANGER-3435
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:** Currently guid column of x_policy table does not have 
> unique constraint. Also if there are more than one service and policies 
> exported from one service   is imported in the other service then policy guid 
> is preserved and do not change, however since service id's are different for 
> both the both guid. but we need to restrict 1 entry only for the same guid 
> under a specific service. 
> 
> 
> **Proposed Solution:**
> it will be better to include service id also with guid column for the unique 
> key creation so that the same restriction can be enforced from db end. 
> 
> **Note:** This is required after the analysys of RANGER-3401, as there could 
> be request on x_policy table to find a policy by guid and service id. There 
> is no workaround to this problem however its recommended that similar 
> restriction should be there in the ranger-admin code.
> 
> 
> Diffs
> -----
> 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> 8e925e5d7 
>   
> security-admin/db/mysql/patches/057-add-unique-constraint-on-x_policy-table-guid-service-column.sql
>  PRE-CREATION 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 638d9fbf2 
>   
> security-admin/db/oracle/patches/057-add-unique-constraint-on-x_policy-table-guid-service-column.sql
>  PRE-CREATION 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> 500e83f01 
>   
> security-admin/db/postgres/patches/057-add-unique-constraint-on-x_policy-table-guid-service-column.sql
>  PRE-CREATION 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  0048e504c 
>   
> security-admin/db/sqlanywhere/patches/057-add-unique-constraint-on-x_policy-table-guid-service-column.sql
>  PRE-CREATION 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> 4d892f62f 
>   
> security-admin/db/sqlserver/patches/057-add-unique-constraint-on-x_policy-table-guid-service-column.sql
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/73594/diff/1/
> 
> 
> Testing
> -------
> 
> Tested the patch for MySQL, Oracle, Postgres and MSSQL.
> unique constraint is being created in x_policy table for a fresh installation 
> and upgrade case as well.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>

Reply via email to