[
https://issues.apache.org/jira/browse/RANGER-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Qiang Zhang updated RANGER-1312:
--------------------------------
Description:
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 as
default configuration value in configuration file. Current the program would
directly exit when user used default configuration to install ranger usersync.
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]
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)
was:
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)
> 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.
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: RANGER-1312
> URL: https://issues.apache.org/jira/browse/RANGER-1312
> Project: Ranger
> Issue Type: Improvement
> Components: usersync
> Reporter: Qiang Zhang
> Assignee: Qiang Zhang
> Priority: Minor
> Labels: patch
> Attachments:
> 0001-RANGER-1312-updated-patch-according-to-Colm-O-s-revi.patch
>
>
> 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 as
> default configuration value in configuration file. Current the program would
> directly exit when user used default configuration to install ranger
> usersync. 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]
> 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)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)