Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 9d0661d18 -> 2670040fa


AMBARI-17189. Change in Atlas authorization from class based to value based 
(Gautam Borad via srimanth)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2670040f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2670040f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2670040f

Branch: refs/heads/branch-2.4
Commit: 2670040fad08badc77f9e3a91996810620e96e24
Parents: 9d0661d
Author: Srimanth Gunturi <[email protected]>
Authored: Mon Jun 13 12:46:16 2016 -0700
Committer: Srimanth Gunturi <[email protected]>
Committed: Mon Jun 13 12:46:50 2016 -0700

----------------------------------------------------------------------
 .../main/resources/stacks/HDP/2.5/services/stack_advisor.py   | 4 ++--
 .../src/test/python/stacks/2.5/common/test_stack_advisor.py   | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2670040f/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 1bcc09e..db2986b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -341,9 +341,9 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
       ranger_atlas_plugin_enabled = 
services['configurations']['ranger-atlas-plugin-properties']['properties']['ranger-atlas-plugin-enabled']
 
     if ranger_atlas_plugin_enabled and (ranger_atlas_plugin_enabled.lower() == 
'Yes'.lower()):
-      
putAtlasApplicationProperty('atlas.authorizer.impl','org.apache.ranger.authorization.atlas.authorizer.RangerAtlasAuthorizer')
+      putAtlasApplicationProperty('atlas.authorizer.impl','ranger')
     else:
-      
putAtlasApplicationProperty('atlas.authorizer.impl','org.apache.atlas.authorize.SimpleAtlasAuthorizer')
+      putAtlasApplicationProperty('atlas.authorizer.impl','simple')
 
   def recommendHBASEConfigurations(self, configurations, clusterData, 
services, hosts):
     super(HDP25StackAdvisor, 
self).recommendHBASEConfigurations(configurations, clusterData, services, hosts)

http://git-wip-us.apache.org/repos/asf/ambari/blob/2670040f/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py 
b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
index f8803e4..4085ad6 100644
--- a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
@@ -6428,7 +6428,7 @@ class TestHDP25StackAdvisor(TestCase):
           "atlas.kafka.zookeeper.connect": "c6401.ambari.apache.org",
           'atlas.server.address.id1': "c6401.ambari.apache.org:21000",
           'atlas.server.ids': "id1",
-          
'atlas.authorizer.impl':'org.apache.ranger.authorization.atlas.authorizer.RangerAtlasAuthorizer'
+          'atlas.authorizer.impl':'ranger'
         }
       },
       "logsearch-solr-env": {
@@ -6622,10 +6622,11 @@ class TestHDP25StackAdvisor(TestCase):
 
     self.stackAdvisor.recommendAtlasConfigurations(configurations, 
clusterData, services, hosts)
     # test for Ranger Atlas plugin disabled
-    
self.assertEquals(configurations['application-properties']['properties']['atlas.authorizer.impl'],
 'org.apache.atlas.authorize.SimpleAtlasAuthorizer', 'Test 
atlas.authorizer.impl with Ranger Atlas plugin is disabled ')
+    
self.assertEquals(configurations['application-properties']['properties']['atlas.authorizer.impl'],
 'simple', 'Test atlas.authorizer.impl with Ranger Atlas plugin is disabled ')
 
     
configurations['ranger-atlas-plugin-properties']['properties']['ranger-atlas-plugin-enabled']
 = 'Yes'
-    
configurations['application-properties']['properties']['atlas.authorizer.impl'] 
=  'org.apache.ranger.authorization.atlas.authorizer.RangerAtlasAuthorizer'
+    # 
configurations['application-properties']['properties']['atlas.authorizer.impl'] 
=  'ranger'
+    
self.stackAdvisor.recommendAtlasConfigurations(configurations,clusterData,services,hosts)
     self.assertEquals(configurations, expected)
 
     services['ambari-server-properties'] = {'java.home': 
'/usr/jdk64/jdk1.7.3_23'}

Reply via email to