spolavarpau1 commented on code in PR #1162:
URL: https://github.com/apache/ranger/pull/1162#discussion_r3845835745


##########
ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java:
##########
@@ -738,6 +740,18 @@ private void computeGroupDelta(Map<String, Map<String, 
String>> sourceGroups) {
                 String              curGroupDN       = 
MapUtils.isEmpty(curGroupAttrs) ? groupName : 
curGroupAttrs.get(UgsyncCommonConstants.FULL_NAME);
                 String              newSyncSource    = 
newGroupAttrs.get(UgsyncCommonConstants.SYNC_SOURCE);
 
+                // Universal DN Validation Check (Executes first for both 
startup & runtime)
+                if (MapUtils.isNotEmpty(curGroupAttrs) && 
!StringUtils.equalsIgnoreCase(groupDN, curGroupDN)) {

Review Comment:
   How about the case where line 755 condition is true? i.e., Customer has 
initially configured usersync with Unix as sync source and all the users/groups 
have the sync source as Unix and now they changed the sync source as AD/LDAP 
and they had isSyncSourceValidationEnabled is set to false and restarted ranger 
usersync. Here isDnValidationEnabled is set to false. Then the 
username/groupname DN is not updated isn't it? It will not come to line 755 at 
all right?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to