Repository: incubator-ranger Updated Branches: refs/heads/ranger-0.5 4a5a4f29b -> c2a6eb62f
RANGER-587 : fixed issue: ranger-admin-site.xml not getting updated when ranger.authentication.method is changed Signed-off-by: Velmurugan Periasamy <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/c2a6eb62 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/c2a6eb62 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/c2a6eb62 Branch: refs/heads/ranger-0.5 Commit: c2a6eb62f1b4a18852a5dc51804bce20b4e11d17 Parents: 4a5a4f2 Author: Gautam Borad <[email protected]> Authored: Thu Jul 30 10:57:04 2015 +0530 Committer: Velmurugan Periasamy <[email protected]> Committed: Thu Aug 27 14:33:52 2015 -0700 ---------------------------------------------------------------------- security-admin/scripts/setup.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/c2a6eb62/security-admin/scripts/setup.sh ---------------------------------------------------------------------- diff --git a/security-admin/scripts/setup.sh b/security-admin/scripts/setup.sh index 4fc1cef..e0b14c5 100755 --- a/security-admin/scripts/setup.sh +++ b/security-admin/scripts/setup.sh @@ -1254,6 +1254,11 @@ do_unixauth_setup() { ldap_file=$app_home/WEB-INF/classes/conf/ranger-admin-site.xml if test -f $ldap_file; then log "[I] $ldap_file file found" + + propertyName=ranger.authentication.method + newPropertyValue="${authentication_method}" + updatePropertyToFilePy $propertyName $newPropertyValue $ldap_file + propertyName=ranger.unixauth.remote.login.enabled newPropertyValue="${remoteLoginEnabled}" updatePropertyToFilePy $propertyName $newPropertyValue $ldap_file @@ -1454,6 +1459,17 @@ do_authentication_setup(){ if [ $authentication_method = "UNIX" ] ; then do_unixauth_setup fi + + if [ $authentication_method = "NONE" ] ; then + newPropertyValue='NONE' + ldap_file=$app_home/WEB-INF/classes/conf/ranger-admin-site.xml + if test -f $ldap_file; then + propertyName=ranger.authentication.method + newPropertyValue="${authentication_method}" + updatePropertyToFilePy $propertyName $newPropertyValue $ldap_file + fi + fi + log "[I] Finished setup based on user authentication method=$authentication_method"; }
