You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ma...@apache.org on 2015/08/11 00:35:58 UTC

[07/14] 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/d3d59138
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/d3d59138
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/d3d59138

Branch: refs/heads/tag-policy
Commit: d3d591385ceb23dd179e1869886d10aae8ad9990
Parents: 79bd7e3
Author: Gautam Borad <gb...@gmail.com>
Authored: Thu Jul 30 10:57:04 2015 +0530
Committer: Velmurugan Periasamy <ve...@apache.org>
Committed: Thu Aug 6 01:57:56 2015 -0400

----------------------------------------------------------------------
 security-admin/scripts/setup.sh | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d3d59138/security-admin/scripts/setup.sh
----------------------------------------------------------------------
diff --git a/security-admin/scripts/setup.sh b/security-admin/scripts/setup.sh
index b79cba4..a41b540 100755
--- a/security-admin/scripts/setup.sh
+++ b/security-admin/scripts/setup.sh
@@ -1214,6 +1214,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
@@ -1414,6 +1419,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";
 }