Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,11 @@ private long getUsers(boolean computeDeletes) throws Throwable {
deltaSyncUserTimeStamp = dateFormat.format(new Date(0));
}

extendedUserSearchFilter = "(objectclass=" + userObjectClass + ")(|(uSNChanged>=" + deltaSyncUserTime + ")(modifyTimestamp>=" + deltaSyncUserTimeStamp + "Z))";
if (config.isDeltaSyncEnabled()) {
extendedUserSearchFilter = "(objectclass=" + userObjectClass + ")(|(uSNChanged>=" + deltaSyncUserTime + ")(modifyTimestamp>=" + deltaSyncUserTimeStamp + "Z))";
} else {
extendedUserSearchFilter = "(objectclass=" + userObjectClass + ")";
}

if (userSearchFilter != null && !userSearchFilter.trim().isEmpty()) {
String customFilter = userSearchFilter.trim();
Expand Down Expand Up @@ -737,7 +741,11 @@ private long getGroups(boolean computeDeletes) throws Throwable {
deltaSyncGroupTimeStamp = dateFormat.format(new Date(0));
}

extendedAllGroupsSearchFilter = "(&" + extendedGroupSearchFilter + "(|(uSNChanged>=" + deltaSyncGroupTime + ")(modifyTimestamp>=" + deltaSyncGroupTimeStamp + "Z)))";
if (config.isDeltaSyncEnabled()) {
extendedAllGroupsSearchFilter = "(&" + extendedGroupSearchFilter + "(|(uSNChanged>=" + deltaSyncGroupTime + ")(modifyTimestamp>=" + deltaSyncGroupTimeStamp + "Z)))";
} else {
extendedAllGroupsSearchFilter = "(&" + extendedGroupSearchFilter + ")";
}

LOG.info("extendedAllGroupsSearchFilter = {}", extendedAllGroupsSearchFilter);

Expand Down
3 changes: 2 additions & 1 deletion unixauthservice/scripts/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ def convertInstallPropsToXML(props):
# if (key.startswith("ranger.usersync.ldap") or key.startswith("ranger.usersync.group") or key.startswith("ranger.usersync.paged")):
# del ret[key]
elif (syncSource == SYNC_SOURCE_LDAP):
ret['ranger.usersync.ldap.deltasync'] = "true"
if ('ranger.usersync.ldap.deltasync' not in ret or len(str(ret['ranger.usersync.ldap.deltasync'])) == 0):
ret['ranger.usersync.ldap.deltasync'] = "true"
ldapPass = ret[SYNC_LDAP_BIND_PASSWORD_KEY]
password_validation(ldapPass, SYNC_LDAP_BIND_PASSWORD_KEY)
ret['ranger.usersync.source.impl.class'] = 'org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder'
Expand Down