RANGER-1333: Enable Incremental Sync by default when sync source is ldap for fresh install
Signed-off-by: Velmurugan Periasamy <v...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/fb13db80 Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/fb13db80 Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/fb13db80 Branch: refs/heads/master Commit: fb13db8095329f6b0aa9654d8f59e11025e40ba8 Parents: 82682d7 Author: Sailaja Polavarapu <spolavar...@hortonworks.com> Authored: Thu Jan 26 14:13:03 2017 -0800 Committer: Velmurugan Periasamy <v...@apache.org> Committed: Fri Jan 27 17:35:15 2017 -0500 ---------------------------------------------------------------------- unixauthservice/scripts/install.properties | 5 +++++ unixauthservice/scripts/setup.py | 1 + unixauthservice/scripts/templates/installprop2xml.properties | 1 + unixauthservice/scripts/templates/ranger-ugsync-template.xml | 4 ++++ 4 files changed, 11 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ranger/blob/fb13db80/unixauthservice/scripts/install.properties ---------------------------------------------------------------------- diff --git a/unixauthservice/scripts/install.properties b/unixauthservice/scripts/install.properties index 4fc7576..a23a9aa 100644 --- a/unixauthservice/scripts/install.properties +++ b/unixauthservice/scripts/install.properties @@ -71,6 +71,11 @@ SYNC_LDAP_BIND_DN = # unless anonymous search is allowed by the directory on users and group SYNC_LDAP_BIND_PASSWORD = +# ldap delta sync flag used to periodically sync users and groups based on the updates in the server +# please customize the value to suit your deployment +# default value is set to true when is SYNC_SOURCE is ldap +SYNC_LDAP_DELTASYNC = + # search base for users and groups # sample value would be dc=hadoop,dc=apache,dc=org SYNC_LDAP_SEARCH_BASE = http://git-wip-us.apache.org/repos/asf/ranger/blob/fb13db80/unixauthservice/scripts/setup.py ---------------------------------------------------------------------- diff --git a/unixauthservice/scripts/setup.py b/unixauthservice/scripts/setup.py index 673a48f..d5aaf80 100755 --- a/unixauthservice/scripts/setup.py +++ b/unixauthservice/scripts/setup.py @@ -224,6 +224,7 @@ 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" 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' http://git-wip-us.apache.org/repos/asf/ranger/blob/fb13db80/unixauthservice/scripts/templates/installprop2xml.properties ---------------------------------------------------------------------- diff --git a/unixauthservice/scripts/templates/installprop2xml.properties b/unixauthservice/scripts/templates/installprop2xml.properties index a78157e..1a9bf36 100644 --- a/unixauthservice/scripts/templates/installprop2xml.properties +++ b/unixauthservice/scripts/templates/installprop2xml.properties @@ -19,6 +19,7 @@ SYNC_INTERVAL = ranger.usersync.sleeptimeinmillisbetweensynccycle SYNC_LDAP_URL = ranger.usersync.ldap.url SYNC_LDAP_BIND_DN = ranger.usersync.ldap.binddn SYNC_LDAP_BIND_PASSWORD = ranger.usersync.ldap.ldapbindpassword +SYNC_LDAP_DELTASYNC = ranger.usersync.ldap.deltasync CRED_KEYSTORE_FILENAME= ranger.usersync.credstore.filename SYNC_LDAP_SEARCH_BASE = ranger.usersync.ldap.searchBase SYNC_LDAP_USER_SEARCH_BASE = ranger.usersync.ldap.user.searchbase http://git-wip-us.apache.org/repos/asf/ranger/blob/fb13db80/unixauthservice/scripts/templates/ranger-ugsync-template.xml ---------------------------------------------------------------------- diff --git a/unixauthservice/scripts/templates/ranger-ugsync-template.xml b/unixauthservice/scripts/templates/ranger-ugsync-template.xml index d32ef33..74bce8a 100644 --- a/unixauthservice/scripts/templates/ranger-ugsync-template.xml +++ b/unixauthservice/scripts/templates/ranger-ugsync-template.xml @@ -78,6 +78,10 @@ <value></value> </property> <property> + <name>ranger.usersync.ldap.deltasync</name> + <value></value> + </property> + <property> <name>ranger.usersync.ldap.user.groupnameattribute</name> <value></value> </property>