You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by al...@apache.org on 2016/03/03 01:06:37 UTC
[13/50] [abbrv] incubator-ranger git commit: RANGER-587 : fixed
issue: ranger-admin-site.xml not getting updated when
ranger.authentication.method is changed
RANGER-587 : fixed issue: ranger-admin-site.xml not getting updated when ranger.authentication.method is changed
Signed-off-by: Velmurugan Periasamy <ve...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/fef11aba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/fef11aba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/fef11aba
Branch: refs/heads/HDP-2.3.2-groupid
Commit: fef11aba7722d12a586218215887fc5cb87d6b8d
Parents: 31f9405
Author: Gautam Borad <gb...@gmail.com>
Authored: Thu Jul 30 10:57:04 2015 +0530
Committer: Velmurugan Periasamy <ve...@apache.org>
Committed: Thu Aug 27 14:38:18 2015 -0700
----------------------------------------------------------------------
security-admin/scripts/setup.sh | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/fef11aba/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";
}