> On July 28, 2021, 8:46 p.m., Madhan Neethiraj wrote: > > security-admin/src/main/java/org/apache/ranger/view/VXGroup.java > > Lines 78 (patched) > > <https://reviews.apache.org/r/73354/diff/2/?file=2251571#file2251571line78> > > > > The new field syncSource sounds very similar to existing field > > groupSource. What value would be stored in syncSource? groupSource is > > assigned one of the following values: > > - RangerCommonEnums.GROUP_INTERNAL > > - RangerCommonEnums.GROUP_EXTERNAL > > - RangerCommonEnums.GROUP_AD > > - RangerCommonEnums.GROUP_LDAP > > - RangerCommonEnums.GROUP_UNIX > > - RangerCommonEnums.GROUP_REPO > > > > Is syncSource used to capture different info/detail?
The values for groupSource currently in use are: internal and external, other values are not used(other enums can be cleaned up). syncSource is being used to capture more information on external sync sources and can be assigned values : Unix, AD/LDAP, File. It will also be a search field when used to filter on the UI. Adding a new field retains existing search functionality on external group source currently available. > On July 28, 2021, 8:46 p.m., Madhan Neethiraj wrote: > > security-admin/src/main/java/org/apache/ranger/view/VXPortalUser.java > > Lines 98 (patched) > > <https://reviews.apache.org/r/73354/diff/2/?file=2251572#file2251572line98> > > > > The new field syncSource sounds very similar to existing field > > userSource. What value would be stored in syncSource? userSource is > > assigned one of the following values: > > - RangerCommonEnums.USER_APP > > - RangerCommonEnums.USER_EXTERNAL > > - RangerCommonEnums.USER_AD > > - RangerCommonEnums.USER_LDAP > > - RangerCommonEnums.USER_UNIX > > - RangerCommonEnums.USER_REPO > > > > Is syncSource used to capture different info/detail? The values for userSource currently in use are: internal and external, other values are not used(other enums can be cleaned up). syncSource is being used to capture more information on external sync sources and can be assigned values : Unix, AD/LDAP, File. It will also be a search field when used to filter on the UI. Adding a new field retains existing search functionality on external user source currently available. > On July 28, 2021, 8:46 p.m., Madhan Neethiraj wrote: > > security-admin/src/main/java/org/apache/ranger/view/VXUser.java > > Lines 97 (patched) > > <https://reviews.apache.org/r/73354/diff/2/?file=2251573#file2251573line97> > > > > The new field syncSource sounds very similar to existing field > > userSource. What value would be stored in syncSource? userSource is > > assigned one of the following values: > > - RangerCommonEnums.USER_APP > > - RangerCommonEnums.USER_EXTERNAL > > - RangerCommonEnums.USER_AD > > - RangerCommonEnums.USER_LDAP > > - RangerCommonEnums.USER_UNIX > > - RangerCommonEnums.USER_REPO > > > > Is syncSource used to capture different info/detail? The values for userSource currently in use are: internal and external, other values are not used(other enums can be cleaned up). syncSource is being used to capture more information on external sync sources and can be assigned values : Unix, AD/LDAP, File. It will also be a search field when used to filter on the UI. Adding a new field retains existing search functionality on external user source currently available. - Abhishek ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73354/#review223285 ----------------------------------------------------------- On July 28, 2021, 1:53 a.m., Abhishek Kumar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73354/ > ----------------------------------------------------------- > > (Updated July 28, 2021, 1:53 a.m.) > > > Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, > Pradeep Agrawal, Sailaja Polavarapu, and Velmurugan Periasamy. > > > Bugs: RANGER-3285 > https://issues.apache.org/jira/browse/RANGER-3285 > > > Repository: ranger > > > Description > ------- > > New features implemented in this patch: > 1. A new coulmn 'sync_source' is available for db tables x_user, > x_portal_user and x_group. This column is also a search field for REST API > queries. > 2. Tested the functionality on containers for proper functioning. > 3. Front-End side changes to follow soon. > > > Diffs > ----- > > security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql > a42c2f17c > > security-admin/db/mysql/patches/052-add-syncSource-col-in-x_user-x_portal_user-x_group.sql > PRE-CREATION > security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql > 149d94d60 > > security-admin/db/oracle/patches/052-add-syncSource-col-in-x_user-x_portal_user-x_group.sql > PRE-CREATION > security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql > 867bed5b6 > > security-admin/db/postgres/patches/052-add-syncSource-col-in-x_user-x_portal_user-x_group.sql > PRE-CREATION > > security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql > fd30f9648 > > security-admin/db/sqlanywhere/patches/052-add-syncSource-col-in-x_user-x_portal_user-x_group.sql > PRE-CREATION > security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql > 276a57cc2 > > security-admin/db/sqlserver/patches/053-add-syncSource-col-in-x_user-x_portal_user-x_group.sql > PRE-CREATION > security-admin/src/main/java/org/apache/ranger/biz/UserMgr.java 3182a28ba > security-admin/src/main/java/org/apache/ranger/entity/XXGroup.java > 996a9e1d4 > security-admin/src/main/java/org/apache/ranger/entity/XXPortalUser.java > ed69f385e > security-admin/src/main/java/org/apache/ranger/entity/XXUser.java 0464e7b6e > security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java > 739809c0d > security-admin/src/main/java/org/apache/ranger/service/XGroupService.java > 24cb43e54 > > security-admin/src/main/java/org/apache/ranger/service/XGroupServiceBase.java > cde91dc52 > > security-admin/src/main/java/org/apache/ranger/service/XPortalUserServiceBase.java > 85e4b8412 > security-admin/src/main/java/org/apache/ranger/service/XUserService.java > 856690534 > > security-admin/src/main/java/org/apache/ranger/service/XUserServiceBase.java > 9cdc14ebf > security-admin/src/main/java/org/apache/ranger/view/VXGroup.java ed6470425 > security-admin/src/main/java/org/apache/ranger/view/VXPortalUser.java > b6035b236 > security-admin/src/main/java/org/apache/ranger/view/VXUser.java 96f6468f7 > > ugsync-util/src/main/java/org/apache/ranger/ugsyncutil/model/XGroupInfo.java > a80e5dc1b > ugsync-util/src/main/java/org/apache/ranger/ugsyncutil/model/XUserInfo.java > bc1a6655c > > ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java > 7e9a364ad > > > Diff: https://reviews.apache.org/r/73354/diff/2/ > > > Testing > ------- > > Tested the changes on postgres: > 1. New column is present on the tables x_user, x_portal_user and x_group. > 2. REST API calls (POST) made for user and group result in persistence of > data for syncSource: verified via db queries. > 3. The syncSource field appears in the response for a GET at the user and > group APIs with correct data. > > > Thanks, > > Abhishek Kumar > >