Repository: ambari
Updated Branches:
  refs/heads/trunk 932855f9a -> f5f2a6455


AMBARI-11274. Update Authorizer classnames - from XaSecure to Ranger 
(alexantonenko)


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

Branch: refs/heads/trunk
Commit: f5f2a64553e1d21d2accf698c10ee89b12f64a0b
Parents: e9e8c4e
Author: Alex Antonenko <[email protected]>
Authored: Wed May 20 20:55:24 2015 +0300
Committer: Alex Antonenko <[email protected]>
Committed: Wed May 20 21:10:20 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/utils/configs/modification_handlers/hbase.js | 3 ++-
 ambari-web/app/utils/configs/modification_handlers/hive.js  | 5 +++--
 ambari-web/app/utils/configs/modification_handlers/storm.js | 3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f5f2a645/ambari-web/app/utils/configs/modification_handlers/hbase.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/modification_handlers/hbase.js 
b/ambari-web/app/utils/configs/modification_handlers/hbase.js
index f093507..5fa1e6f 100644
--- a/ambari-web/app/utils/configs/modification_handlers/hbase.js
+++ b/ambari-web/app/utils/configs/modification_handlers/hbase.js
@@ -23,7 +23,8 @@ module.exports = App.ServiceConfigModificationHandler.create({
 
   updateConfigClasses : function(configClasses, authEnabled, 
affectedProperties, addOldValue) {
     if (configClasses != null) {
-      var xaAuthCoProcessorClass = 
"com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor";
+      var xaAuthCoProcessorClass = App.get('isHadoop23Stack') ? 
"org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor"
+        : "com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor";
       var nonXAClass = 
'org.apache.hadoop.hbase.security.access.AccessController';
       var currentClassesList = configClasses.get('value').trim().length > 0 ? 
configClasses.get('value').trim().split(',') : [];
       var newClassesList = null, xaClassIndex, nonXaClassIndex;

http://git-wip-us.apache.org/repos/asf/ambari/blob/f5f2a645/ambari-web/app/utils/configs/modification_handlers/hive.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/modification_handlers/hive.js 
b/ambari-web/app/utils/configs/modification_handlers/hive.js
index e34e488..bfb9b9c 100644
--- a/ambari-web/app/utils/configs/modification_handlers/hive.js
+++ b/ambari-web/app/utils/configs/modification_handlers/hive.js
@@ -34,8 +34,9 @@ module.exports = App.ServiceConfigModificationHandler.create({
 
       var rangerPluginEnabled = newValue == "Yes";
       var newConfigAuthorizationEnabledValue = rangerPluginEnabled ? "true" : 
"false";
-      var newAuthorizationManagerValue = rangerPluginEnabled ? 
"com.xasecure.authorization.hive.authorizer.XaSecureHiveAuthorizerFactory"
-          : 
"org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory";
+      var newAuthorizationManagerValue = rangerPluginEnabled ? 
(App.get('isHadoop23Stack') ? 
"org.apache.ranger.authorization.hive.authorizer.RangerHiveAuthorizerFactory"
+          : 
"com.xasecure.authorization.hive.authorizer.XaSecureHiveAuthorizerFactory")
+         : 
"org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory";
       var newAuthenticatorManagerValue = rangerPluginEnabled ? 
"org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator"
           : "org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator";
       var enabledRestrictedMap = {

http://git-wip-us.apache.org/repos/asf/ambari/blob/f5f2a645/ambari-web/app/utils/configs/modification_handlers/storm.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/modification_handlers/storm.js 
b/ambari-web/app/utils/configs/modification_handlers/storm.js
index 3dbe8be..a5fd83c 100644
--- a/ambari-web/app/utils/configs/modification_handlers/storm.js
+++ b/ambari-web/app/utils/configs/modification_handlers/storm.js
@@ -33,7 +33,8 @@ module.exports = App.ServiceConfigModificationHandler.create({
         // Only when configuration is already present, do we act on it.
         // Unsecured clusters do not have this config, and hence we skip any
         // updates
-        var newNimbusAuthorizer = authEnabled ? 
"com.xasecure.authorization.storm.authorizer.XaSecureStormAuthorizer"
+        var newNimbusAuthorizer = authEnabled ? (App.get('isHadoop23Stack') ? 
"org.apache.ranger.authorization.storm.authorizer.RangerStormAuthorizer"
+              : 
"com.xasecure.authorization.storm.authorizer.XaSecureStormAuthorizer")
             : "backtype.storm.security.auth.authorizer.SimpleACLAuthorizer";
 
         // Add Storm-Ranger configs

Reply via email to