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

(Updated 一月 19, 2017, 1:20 a.m.)


Review request for ranger, Don Bosco Durai, Ramesh Mani, Selvamohan Neethiraj, 
and Velmurugan Periasamy.


Summary (updated)
-----------------

The SYNC_SOURCE property only supports unix and ldap for ranger usersync at 
present, it's default value is unix. But It was assigned an empty value in 
configuration file. Now the program directly exists without default value.


Bugs: RANGER-1312
    https://issues.apache.org/jira/browse/RANGER-1312


Repository: ranger


Description (updated)
-------

The SYNC_SOURCE property only supports unix and ldap for ranger usersync at 
present, it's default value is unix. But It was assigned an empty value in 
configuration file. Now the program directly exists without default value. The 
logic code is as following:
if (syncSource == SYNC_SOURCE_UNIX):
                        ret['ranger.usersync.source.impl.class'] = 
'org.apache.ranger.unixusersync.process.UnixUserGroupBuilder'
                        if (SYNC_INTERVAL_NEW_KEY not in ret or 
len(str(ret[SYNC_INTERVAL_NEW_KEY])) == 0):
                                ret[SYNC_INTERVAL_NEW_KEY] = "300000"
                        else:
                                ret[SYNC_INTERVAL_NEW_KEY] = 
int(ret[SYNC_INTERVAL_NEW_KEY]) * 60000
                elif (syncSource == SYNC_SOURCE_LDAP):
                        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'
                        if (SYNC_INTERVAL_NEW_KEY not in ret or 
len(str(ret[SYNC_INTERVAL_NEW_KEY])) == 0):
                                ret[SYNC_INTERVAL_NEW_KEY] = "3600000"
                        else:
                                ret[SYNC_INTERVAL_NEW_KEY] = 
int(ret[SYNC_INTERVAL_NEW_KEY]) * 60000
                else:
                        print "ERROR: Invalid value (%s) defined for %s in 
install.properties. Only valid values are %s" % (syncSource, 
SYNC_SOURCE_KEY,SYNC_SOURCE_LIST)
                        sys.exit(1)


Diffs
-----

  unixauthservice/scripts/install.properties e784dda 

Diff: https://reviews.apache.org/r/55616/diff/


Testing
-------


Thanks,

Qiang Zhang

Reply via email to