Browse Source

AMBARI-9471 Ambari Web UI changes required to support Ranger Installation part 2. (ababiichuk)

aBabiichuk 10 năm trước cách đây
mục cha
commit
55feab5fb1

+ 59 - 0
ambari-web/app/data/HDP2.2/hbase_properties.js

@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+var properties = {
+
+  'SSLRangerSettings': [
+    'SSL_KEYSTORE_FILE_PATH',
+    'SSL_KEYSTORE_PASSWORD',
+    'SSL_TRUSTSTORE_FILE_PATH',
+    'SSL_TRUSTSTORE_PASSWORD'
+  ],
+
+  'RepositoryConfigs': [
+    'POLICY_USER',
+    'REPOSITORY_CONFIG_PASSWORD',
+    'REPOSITORY_CONFIG_USERNAME'
+  ],
+
+  'HDFSAuditSettings': [
+    'XAAUDIT.HDFS.DESTINATION_DIRECTORY',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_DIRECTORY',
+    'XAAUDIT.HDFS.LOCAL_ARCHIVE_DIRECTORY',
+    'XAAUDIT.HDFS.DESTINTATION_FILE',
+    'XAAUDIT.HDFS.DESTINTATION_FLUSH_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.DESTINTATION_OPEN_RETRY_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_FILE',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_FLUSH_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_ROLLOVER_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_ARCHIVE_MAX_FILE_COUNT'
+  ]
+};
+
+var props = [];
+
+for (var category in properties) {
+  props = props.concat(App.config.generateConfigPropertiesByName(properties[category],
+    { category: category, serviceName: 'HBASE', filename: 'ranger-hbase-plugin-properties.xml'}));
+}
+
+module.exports = props;
+

+ 59 - 0
ambari-web/app/data/HDP2.2/hdfs_properties.js

@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+var properties = {
+
+  'SSLRangerSettings': [
+    'SSL_KEYSTORE_FILE_PATH',
+    'SSL_KEYSTORE_PASSWORD',
+    'SSL_TRUSTSTORE_FILE_PATH',
+    'SSL_TRUSTSTORE_PASSWORD'
+  ],
+
+  'RepositoryConfigs': [
+    'POLICY_USER',
+    'REPOSITORY_CONFIG_PASSWORD',
+    'REPOSITORY_CONFIG_USERNAME'
+  ],
+
+  'HDFSAuditSettings': [
+    'XAAUDIT.HDFS.DESTINATION_DIRECTORY',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_DIRECTORY',
+    'XAAUDIT.HDFS.LOCAL_ARCHIVE_DIRECTORY',
+    'XAAUDIT.HDFS.DESTINTATION_FILE',
+    'XAAUDIT.HDFS.DESTINTATION_FLUSH_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.DESTINTATION_OPEN_RETRY_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_FILE',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_FLUSH_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_ROLLOVER_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_ARCHIVE_MAX_FILE_COUNT'
+  ]
+};
+
+var props = [];
+
+for (var category in properties) {
+  props = props.concat(App.config.generateConfigPropertiesByName(properties[category],
+    { category: category, serviceName: 'HDFS', filename: 'ranger-hdfs-plugin-properties.xml'}));
+}
+
+module.exports = props;
+

+ 28 - 1
ambari-web/app/data/HDP2.2/hive_properties.js

@@ -106,6 +106,33 @@ var hivePropsByCategory = {
     'hive.compactor.check.interval',
     'hive.compactor.delta.num.threshold',
     'hive.compactor.delta.pct.threshold'
+  ],
+
+  'SSLRangerSettings': [
+    'SSL_KEYSTORE_FILE_PATH',
+    'SSL_KEYSTORE_PASSWORD',
+    'SSL_TRUSTSTORE_FILE_PATH',
+    'SSL_TRUSTSTORE_PASSWORD'
+  ],
+
+  'RepositoryConfigs': [
+    'POLICY_USER',
+    'REPOSITORY_CONFIG_PASSWORD',
+    'REPOSITORY_CONFIG_USERNAME'
+  ],
+
+  'HDFSAuditSettings': [
+    'XAAUDIT.HDFS.DESTINATION_DIRECTORY',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_DIRECTORY',
+    'XAAUDIT.HDFS.LOCAL_ARCHIVE_DIRECTORY',
+    'XAAUDIT.HDFS.DESTINTATION_FILE',
+    'XAAUDIT.HDFS.DESTINTATION_FLUSH_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.DESTINTATION_OPEN_RETRY_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_FILE',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_FLUSH_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_ROLLOVER_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_ARCHIVE_MAX_FILE_COUNT'
   ]
 };
 
@@ -113,7 +140,7 @@ var hiveProps = [];
 
 for (var category in hivePropsByCategory) {
   hiveProps = hiveProps.concat(App.config.generateConfigPropertiesByName(hivePropsByCategory[category], 
-    { category: category, serviceName: 'HIVE', filename: 'hive-site.xml'}));
+    { category: category, serviceName: 'HIVE', filename: ['HDFSAuditSettings', 'RepositoryConfigs', 'SSLRangerSettings'].contains(category) ? 'ranger-hive-plugin-properties.xml' : 'hive-site.xml'}));
 }
 
 module.exports = hiveProps;

+ 59 - 0
ambari-web/app/data/HDP2.2/knox_properties.js

@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+var properties = {
+
+  'SSLRangerSettings': [
+    'SSL_KEYSTORE_FILE_PATH',
+    'SSL_KEYSTORE_PASSWORD',
+    'SSL_TRUSTSTORE_FILE_PATH',
+    'SSL_TRUSTSTORE_PASSWORD'
+  ],
+
+  'RepositoryConfigs': [
+    'POLICY_USER',
+    'REPOSITORY_CONFIG_PASSWORD',
+    'REPOSITORY_CONFIG_USERNAME'
+  ],
+
+  'HDFSAuditSettings': [
+    'XAAUDIT.HDFS.DESTINATION_DIRECTORY',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_DIRECTORY',
+    'XAAUDIT.HDFS.LOCAL_ARCHIVE_DIRECTORY',
+    'XAAUDIT.HDFS.DESTINTATION_FILE',
+    'XAAUDIT.HDFS.DESTINTATION_FLUSH_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.DESTINTATION_OPEN_RETRY_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_FILE',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_FLUSH_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_ROLLOVER_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_ARCHIVE_MAX_FILE_COUNT'
+  ]
+};
+
+var props = [];
+
+for (var category in properties) {
+  props = props.concat(App.config.generateConfigPropertiesByName(properties[category],
+    { category: category, serviceName: 'KNOX', filename: 'ranger-knox-plugin-properties.xml'}));
+}
+
+module.exports = props;
+

+ 235 - 115
ambari-web/app/data/HDP2.2/site_properties.js

@@ -21,8 +21,14 @@ var App = require('app');
 var hdp22SepcificProperties = [
   require('data/HDP2.2/yarn_properties'),
   require('data/HDP2.2/tez_properties'),
-  require('data/HDP2.2/hive_properties')
-].reduce(function(p, c) { return c.concat(p); });
+  require('data/HDP2.2/hive_properties'),
+  require('data/HDP2.2/hdfs_properties'),
+  require('data/HDP2.2/hbase_properties'),
+  require('data/HDP2.2/storm_properties'),
+  require('data/HDP2.2/knox_properties')
+].reduce(function (p, c) {
+    return c.concat(p);
+  });
 
 var hdp2properties = require('data/HDP2/site_properties').configProperties;
 var excludedConfigs = [
@@ -113,7 +119,7 @@ hdp22properties.push(
     "displayType": "checkbox",
     "dependentConfigPattern": "^XAAUDIT.HDFS",
     "filename": "ranger-hdfs-plugin-properties.xml",
-    "category": "Advanced ranger-hdfs-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "HDFS"
   },
   {
@@ -122,7 +128,7 @@ hdp22properties.push(
     "displayName": "Audit to DB",
     "displayType": "checkbox",
     "filename": "ranger-hdfs-plugin-properties.xml",
-    "category": "Advanced ranger-hdfs-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "HDFS"
   },
   {
@@ -131,24 +137,34 @@ hdp22properties.push(
     "defaultValue": "no",
     "displayName": "Enable Ranger for HDFS",
     "filename": "ranger-hdfs-plugin-properties.xml",
-    "category": "Advanced ranger-hdfs-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "HDFS"
   },
   {
-    "id": "puppet var",
-    "name": "RANGER_HOST",
-    "displayName": "Policy Admin URL",
-    "value": "",
-    "defaultValue": "",
-    "description": "The host that has been assigned to run Ranger Server",
-    "displayType": "masterHost",
-    "isOverridable": false,
-    "isVisible": true,
-    "isRequiredByAgent": false,
-    "isRequired": false,
-    "serviceName": "HDFS",
+    "id": "site property",
+    "name": "POLICY_USER",
+    "value": "ambari-qa",
+    "defaultValue": "ambari-qa",
+    "displayName": "policy User for HDFS",
     "filename": "ranger-hdfs-plugin-properties.xml",
-    "category": "Advanced ranger-hdfs-plugin-properties"
+    "category": "RepositoryConfigs",
+    "serviceName": "HDFS"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_PASSWORD",
+    "displayName": "Ranger repository config password",
+    "filename": "ranger-hdfs-plugin-properties.xml",
+    "category": "RepositoryConfigs",
+    "serviceName": "HDFS"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_USERNAME",
+    "displayName": "Ranger repository config user",
+    "filename": "ranger-hdfs-plugin-properties.xml",
+    "category": "RepositoryConfigs",
+    "serviceName": "HDFS"
   },
   /*********RANGER FOR HIVE************/
   {
@@ -158,7 +174,7 @@ hdp22properties.push(
     "displayType": "checkbox",
     "dependentConfigPattern": "^XAAUDIT.HDFS",
     "filename": "ranger-hive-plugin-properties.xml",
-    "category": "Advanced ranger-hive-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "HIVE"
   },
   {
@@ -167,7 +183,7 @@ hdp22properties.push(
     "displayName": "Audit to DB",
     "displayType": "checkbox",
     "filename": "ranger-hive-plugin-properties.xml",
-    "category": "Advanced ranger-hive-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "HIVE"
   },
   {
@@ -176,34 +192,44 @@ hdp22properties.push(
     "defaultValue": "no",
     "displayName": "Enable Ranger for HIVE",
     "filename": "ranger-hive-plugin-properties.xml",
-    "category": "Advanced ranger-hive-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "HIVE"
   },
   {
     "id": "site property",
-    "name": "UPDATE_XAPOLICIES_ON_GRANT_REVOKE",
-    "defaultValue": true,
-    "displayName": "Should Hive GRANT/REVOKE update XA policies?",
-    "displayType": "checkbox",
+    "name": "POLICY_USER",
+    "value": "ambari-qa",
+    "defaultValue": "ambari-qa",
+    "displayName": "policy User for HIVE",
     "filename": "ranger-hive-plugin-properties.xml",
-    "category": "Advanced ranger-hive-plugin-properties",
+    "category": "RepositoryConfigs",
     "serviceName": "HIVE"
   },
   {
-    "id": "puppet var",
-    "name": "RANGER_HOST",
-    "displayName": "Policy Admin URL",
-    "value": "",
-    "defaultValue": "",
-    "description": "The host that has been assigned to run Ranger Server",
-    "displayType": "masterHost",
-    "isOverridable": false,
-    "isVisible": true,
-    "isRequiredByAgent": false,
-    "isRequired": false,
-    "serviceName": "HIVE",
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_PASSWORD",
+    "displayName": "Ranger repository config password",
     "filename": "ranger-hive-plugin-properties.xml",
-    "category": "Advanced ranger-hive-plugin-properties"
+    "category": "RepositoryConfigs",
+    "serviceName": "HIVE"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_USERNAME",
+    "displayName": "Ranger repository config user",
+    "filename": "ranger-hive-plugin-properties.xml",
+    "category": "RepositoryConfigs",
+    "serviceName": "HIVE"
+  },
+  {
+    "id": "site property",
+    "name": "UPDATE_XAPOLICIES_ON_GRANT_REVOKE",
+    "defaultValue": true,
+    "displayType": "checkbox",
+    "displayName": "Should Hive GRANT/REVOKE update XA policies?",
+    "filename": "ranger-hive-plugin-properties.xml",
+    "category": "GrantSettings",
+    "serviceName": "HIVE"
   },
   /*********RANGER FOR HBASE************/
   {
@@ -213,7 +239,7 @@ hdp22properties.push(
     "displayType": "checkbox",
     "dependentConfigPattern": "^XAAUDIT.HDFS",
     "filename": "ranger-hbase-plugin-properties.xml",
-    "category": "Advanced ranger-hbase-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "HBASE"
   },
   {
@@ -222,7 +248,7 @@ hdp22properties.push(
     "displayName": "Audit to DB",
     "displayType": "checkbox",
     "filename": "ranger-hbase-plugin-properties.xml",
-    "category": "Advanced ranger-hbase-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "HBASE"
   },
   {
@@ -231,7 +257,33 @@ hdp22properties.push(
     "defaultValue": "no",
     "displayName": "Enable Ranger for HBASE",
     "filename": "ranger-hbase-plugin-properties.xml",
-    "category": "Advanced ranger-hbase-plugin-properties",
+    "category": "RangerSettings",
+    "serviceName": "HBASE"
+  },
+  {
+    "id": "site property",
+    "name": "POLICY_USER",
+    "value": "ambari-qa",
+    "defaultValue": "ambari-qa",
+    "displayName": "policy User for HBASE",
+    "filename": "ranger-hbase-plugin-properties.xml",
+    "category": "RepositoryConfigs",
+    "serviceName": "HBASE"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_PASSWORD",
+    "displayName": "Ranger repository config password",
+    "filename": "ranger-hbase-plugin-properties.xml",
+    "category": "RepositoryConfigs",
+    "serviceName": "HBASE"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_USERNAME",
+    "displayName": "Ranger repository config user",
+    "filename": "ranger-hbase-plugin-properties.xml",
+    "category": "RepositoryConfigs",
     "serviceName": "HBASE"
   },
   {
@@ -241,25 +293,9 @@ hdp22properties.push(
     "displayName": "Should HBase GRANT/REVOKE update XA policies?",
     "displayType": "checkbox",
     "filename": "ranger-hbase-plugin-properties.xml",
-    "category": "Advanced ranger-hbase-plugin-properties",
+    "category": "GrantSettings",
     "serviceName": "HBASE"
   },
-  {
-    "id": "puppet var",
-    "name": "RANGER_HOST",
-    "displayName": "Policy Admin URL",
-    "value": "",
-    "defaultValue": "",
-    "description": "The host that has been assigned to run Ranger Server",
-    "displayType": "masterHost",
-    "isOverridable": false,
-    "isVisible": true,
-    "isRequiredByAgent": false,
-    "isRequired": false,
-    "serviceName": "HBASE",
-    "filename": "ranger-hbase-plugin-properties.xml",
-    "category": "Advanced ranger-hbase-plugin-properties"
-  },
   /*********RANGER FOR STORM************/
   {
     "id": "site property",
@@ -268,7 +304,7 @@ hdp22properties.push(
     "displayType": "checkbox",
     "dependentConfigPattern": "^XAAUDIT.HDFS",
     "filename": "ranger-storm-plugin-properties.xml",
-    "category": "Advanced ranger-storm-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "STORM"
   },
   {
@@ -277,7 +313,7 @@ hdp22properties.push(
     "displayName": "Audit to DB",
     "displayType": "checkbox",
     "filename": "ranger-storm-plugin-properties.xml",
-    "category": "Advanced storm-hbase-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "STORM"
   },
   {
@@ -286,24 +322,34 @@ hdp22properties.push(
     "defaultValue": "no",
     "displayName": "Enable Ranger for STORM",
     "filename": "ranger-storm-plugin-properties.xml",
-    "category": "Advanced ranger-storm-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "STORM"
   },
   {
-    "id": "puppet var",
-    "name": "RANGER_HOST",
-    "displayName": "Policy Admin URL",
-    "value": "",
-    "defaultValue": "",
-    "description": "The host that has been assigned to run Ranger Server",
-    "displayType": "masterHost",
-    "isOverridable": false,
-    "isVisible": true,
-    "isRequiredByAgent": false,
-    "isRequired": false,
-    "serviceName": "STORM",
+    "id": "site property",
+    "name": "POLICY_USER",
+    "value": "ambari-qa",
+    "defaultValue": "ambari-qa",
+    "displayName": "policy User for STORM",
+    "filename": "ranger-storm-plugin-properties.xml",
+    "category": "RepositoryConfigs",
+    "serviceName": "STORM"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_PASSWORD",
+    "displayName": "Ranger repository config password",
+    "filename": "ranger-storm-plugin-properties.xml",
+    "category": "RepositoryConfigs",
+    "serviceName": "STORM"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_USERNAME",
+    "displayName": "Ranger repository config user",
     "filename": "ranger-storm-plugin-properties.xml",
-    "category": "Advanced ranger-strom-plugin-properties"
+    "category": "RepositoryConfigs",
+    "serviceName": "STORM"
   },
   /*********RANGER FOR KNOX************/
   {
@@ -313,7 +359,7 @@ hdp22properties.push(
     "displayType": "checkbox",
     "dependentConfigPattern": "^XAAUDIT.HDFS",
     "filename": "ranger-knox-plugin-properties.xml",
-    "category": "Advanced ranger-knox-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "KNOX"
   },
   {
@@ -322,7 +368,7 @@ hdp22properties.push(
     "displayName": "Audit to DB",
     "displayType": "checkbox",
     "filename": "ranger-knox-plugin-properties.xml",
-    "category": "Advanced ranger-knox-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "KNOX"
   },
   {
@@ -331,42 +377,36 @@ hdp22properties.push(
     "defaultValue": "no",
     "displayName": "Enable Ranger for KNOX",
     "filename": "ranger-knox-plugin-properties.xml",
-    "category": "Advanced ranger-knox-plugin-properties",
+    "category": "RangerSettings",
     "serviceName": "KNOX"
   },
   {
-    "id": "puppet var",
-    "name": "RANGER_HOST",
-    "displayName": "Policy Admin URL",
-    "value": "",
-    "defaultValue": "",
-    "description": "The host that has been assigned to run Ranger Server",
-    "displayType": "masterHost",
-    "isOverridable": false,
-    "isVisible": true,
-    "isRequiredByAgent": false,
-    "isRequired": false,
-    "serviceName": "KNOX",
+    "id": "site property",
+    "name": "POLICY_USER",
+    "value": "ambari-qa",
+    "defaultValue": "ambari-qa",
+    "displayName": "policy User for KNOX",
     "filename": "ranger-knox-plugin-properties.xml",
-    "category": "Advanced ranger-knox-plugin-properties"
+    "category": "RepositoryConfigs",
+    "serviceName": "KNOX"
   },
-  /**********************************************RANGER***************************************/
   {
-    "id": "puppet var",
-    "name": "RANGER_HOST",
-    "displayName": "Policy Admin URL",
-    "value": "",
-    "defaultValue": "",
-    "description": "The host that has been assigned to run Ranger Server",
-    "displayType": "masterHost",
-    "isOverridable": false,
-    "isVisible": true,
-    "isRequiredByAgent": false,
-    "isRequired": false,
-    "serviceName": "RANGER",
-    "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_PASSWORD",
+    "displayName": "Ranger repository config password",
+    "filename": "ranger-knox-plugin-properties.xml",
+    "category": "RepositoryConfigs",
+    "serviceName": "KNOX"
+  },
+  {
+    "id": "site property",
+    "name": "REPOSITORY_CONFIG_USERNAME",
+    "displayName": "Ranger repository config user",
+    "filename": "ranger-knox-plugin-properties.xml",
+    "category": "RepositoryConfigs",
+    "serviceName": "KNOX"
   },
+  /**********************************************RANGER***************************************/
   {
     "id": "site property",
     "name": "ambari_user_password",
@@ -558,7 +598,7 @@ hdp22properties.push(
     "isVisible": true,
     "serviceName": "RANGER",
     "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "category": "RangerSettings"
   },
   {
     "id": "puppet var",
@@ -571,7 +611,7 @@ hdp22properties.push(
     "isVisible": true,
     "serviceName": "RANGER",
     "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "category": "RangerSettings"
   },
   {
     "id": "puppet var",
@@ -584,7 +624,7 @@ hdp22properties.push(
     "isVisible": true,
     "serviceName": "RANGER",
     "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "category": "RangerSettings"
   },
   {
     "id": "puppet var",
@@ -597,7 +637,7 @@ hdp22properties.push(
     "isVisible": true,
     "serviceName": "RANGER",
     "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "category": "RangerSettings"
   },
   {
     "id": "site property",
@@ -615,7 +655,7 @@ hdp22properties.push(
       },
       {
         displayName: 'UNIX',
-        foreignKeys: ['remoteLoginEnabled', 'authServiceHostName','authServicePort']
+        foreignKeys: ['remoteLoginEnabled', 'authServiceHostName', 'authServicePort']
       },
       {
         displayName: 'NONE'
@@ -628,10 +668,10 @@ hdp22properties.push(
     "isVisible": true,
     "serviceName": "RANGER",
     "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "category": "RangerSettings"
   },
   {
-    "id": "puppet var",
+    "id": "site property",
     "name": "remoteLoginEnabled",
     "displayName": "Allow remote Login",
     "defaultValue": true,
@@ -641,13 +681,93 @@ hdp22properties.push(
     "isVisible": true,
     "serviceName": "RANGER",
     "filename": "admin-properties.xml",
-    "category": "Advanced admin-properties"
+    "category": "UnixAuthenticationSettings"
+  },
+  {
+    "id": "site property",
+    "name": "authServiceHostName",
+    "displayName": "authServiceHostName",
+    "defaultValue": 'localhost',
+    "isReconfigurable": true,
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "UnixAuthenticationSettings"
+  },
+  {
+    "id": "site property",
+    "name": "authServicePort",
+    "displayName": "authServicePort",
+    "defaultValue": '5151',
+    "isReconfigurable": true,
+    "displayType": "int",
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "UnixAuthenticationSettings"
+  },
+  {
+    "id": "site property",
+    "name": "xa_ldap_url",
+    "displayName": "xa_ldap_url",
+    "isReconfigurable": true,
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "LDAPSettings"
+  },
+  {
+    "id": "site property",
+    "name": "xa_ldap_userDNpattern",
+    "displayName": "xa_ldap_userDNpattern",
+    "isReconfigurable": true,
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "LDAPSettings"
+  },
+  {
+    "id": "site property",
+    "name": "xa_ldap_groupRoleAttribute",
+    "displayName": "xa_ldap_groupRoleAttribute",
+    "isReconfigurable": true,
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "LDAPSettings"
+  },
+  {
+    "id": "site property",
+    "name": "xa_ldap_ad_domain",
+    "displayName": "xa_ldap_ad_domain",
+    "isReconfigurable": true,
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "ADSettings"
+  },
+  {
+    "id": "site property",
+    "name": "xa_ldap_ad_url",
+    "displayName": "xa_ldap_ad_url",
+    "isReconfigurable": true,
+    "isOverridable": false,
+    "isVisible": true,
+    "serviceName": "RANGER",
+    "filename": "admin-properties.xml",
+    "category": "ADSettings"
   }
 );
 
 var additionalProperties = [];
 
-hdp22SepcificProperties.forEach(function(config) {
+hdp22SepcificProperties.forEach(function (config) {
   if (!hdp22properties.findProperty('name', config.name)) additionalProperties.push(config);
   else {
     hdp22properties.findProperty('name', config.name).category = config.category;

+ 59 - 0
ambari-web/app/data/HDP2.2/storm_properties.js

@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+var properties = {
+
+  'SSLRangerSettings': [
+    'SSL_KEYSTORE_FILE_PATH',
+    'SSL_KEYSTORE_PASSWORD',
+    'SSL_TRUSTSTORE_FILE_PATH',
+    'SSL_TRUSTSTORE_PASSWORD'
+  ],
+
+  'RepositoryConfigs': [
+    'POLICY_USER',
+    'REPOSITORY_CONFIG_PASSWORD',
+    'REPOSITORY_CONFIG_USERNAME'
+  ],
+
+  'HDFSAuditSettings': [
+    'XAAUDIT.HDFS.DESTINATION_DIRECTORY',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_DIRECTORY',
+    'XAAUDIT.HDFS.LOCAL_ARCHIVE_DIRECTORY',
+    'XAAUDIT.HDFS.DESTINTATION_FILE',
+    'XAAUDIT.HDFS.DESTINTATION_FLUSH_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.DESTINTATION_OPEN_RETRY_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_FILE',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_FLUSH_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_BUFFER_ROLLOVER_INTERVAL_SECONDS',
+    'XAAUDIT.HDFS.LOCAL_ARCHIVE_MAX_FILE_COUNT'
+  ]
+};
+
+var props = [];
+
+for (var category in properties) {
+  props = props.concat(App.config.generateConfigPropertiesByName(properties[category],
+    { category: category, serviceName: 'STORM', filename: 'ranger-storm-plugin-properties.xml'}));
+}
+
+module.exports = props;
+

+ 18 - 4
ambari-web/app/models/stack_service.js

@@ -169,7 +169,8 @@ App.StackService = DS.Model.extend({
     var configTypes = this.get('configTypes');
     var serviceComponents = this.get('serviceComponents');
     if (configTypes && Object.keys(configTypes).length) {
-      var pattern = ["General", "CapacityScheduler", "FaultTolerance", "Isolation", "Performance", "KDC", "Kadmin","^Advanced", "Env$", "^Custom", "Falcon - Oozie integration", "FalconStartupSite", "FalconRuntimeSite", "MetricCollector", "Settings$"];
+      var pattern = ["General", "CapacityScheduler", "FaultTolerance", "Isolation", "Performance", "KDC", "Kadmin",
+        "^Advanced", "Env$", "^Custom", "Falcon - Oozie integration", "FalconStartupSite", "FalconRuntimeSite", "MetricCollector", "RepositoryConfigs", "Settings$"];
       configCategories = App.StackService.configCategories.call(this).filter(function (_configCategory) {
         var serviceComponentName = _configCategory.get('name');
         var isServiceComponent = serviceComponents.someProperty('componentName', serviceComponentName);
@@ -224,6 +225,7 @@ App.StackService.reviewPageHandlers = {
     'Database': 'loadOozieDbValue'
   }
 };
+App.StackService.RangerAgents = ['HDFS','HBASE','HIVE','KNOX','STORM'];
 
 App.StackService.configCategories = function () {
   var serviceConfigCategories = [];
@@ -263,14 +265,16 @@ App.StackService.configCategories = function () {
         App.ServiceConfigCategory.create({ name: 'HIVE_METASTORE', displayName: 'Hive Metastore'}),
         App.ServiceConfigCategory.create({ name: 'WEBHCAT_SERVER', displayName: 'WebHCat Server'}),
         App.ServiceConfigCategory.create({ name: 'General', displayName: 'General'}),
-        App.ServiceConfigCategory.create({ name: 'Performance', displayName: 'Performance'})
+        App.ServiceConfigCategory.create({ name: 'Performance', displayName: 'Performance'}),
+        App.ServiceConfigCategory.create({ name: 'GrantSettings', displayName: 'Grant/Revoke Settings'})
       ]);
       break;
     case 'HBASE':
       serviceConfigCategories.pushObjects([
         App.ServiceConfigCategory.create({ name: 'HBASE_MASTER', displayName: 'HBase Master'}),
         App.ServiceConfigCategory.create({ name: 'HBASE_REGIONSERVER', displayName: 'RegionServer'}),
-        App.ServiceConfigCategory.create({ name: 'General', displayName: 'General'})
+        App.ServiceConfigCategory.create({ name: 'General', displayName: 'General'}),
+        App.ServiceConfigCategory.create({ name: 'GrantSettings', displayName: 'Grant/Revoke Settings'})
       ]);
       break;
     case 'ZOOKEEPER':
@@ -338,7 +342,11 @@ App.StackService.configCategories = function () {
     case 'RANGER':
       serviceConfigCategories.pushObjects([
         App.ServiceConfigCategory.create({ name: 'AdminSettings', displayName: 'Admin Settings'}),
-        App.ServiceConfigCategory.create({ name: 'DBSettings', displayName: 'DB Settings'})
+        App.ServiceConfigCategory.create({ name: 'DBSettings', displayName: 'DB Settings'}),
+        App.ServiceConfigCategory.create({ name: 'RangerSettings', displayName: 'Ranger Settings'}),
+        App.ServiceConfigCategory.create({ name: 'UnixAuthenticationSettings', displayName: 'Unix Authentication Settings'}),
+        App.ServiceConfigCategory.create({ name: 'ADSettings', displayName: 'AD Settings'}),
+        App.ServiceConfigCategory.create({ name: 'LDAPSettings', displayName: 'LDAP Settings'})
       ]);
       break;
     case 'PIG':
@@ -352,6 +360,12 @@ App.StackService.configCategories = function () {
   }
   serviceConfigCategories.pushObject(App.ServiceConfigCategory.create({ name: 'Advanced', displayName: 'Advanced'}));
 
+  if (App.StackService.RangerAgents.contains(this.get('serviceName'))) {
+    serviceConfigCategories.pushObject(App.ServiceConfigCategory.create({ name: 'RangerSettings', displayName: 'Ranger Settings'}));
+    serviceConfigCategories.pushObject(App.ServiceConfigCategory.create({ name: 'HDFSAuditSettings', displayName: 'HDFS Audit Settings'}));
+    serviceConfigCategories.pushObject(App.ServiceConfigCategory.create({ name: 'RepositoryConfigs', displayName: 'Ranger plugin repository and policy users'}));
+    serviceConfigCategories.pushObject(App.ServiceConfigCategory.create({ name: 'SSLRangerSettings', displayName: 'SSL Settings'}));
+  }
   var configTypes = Object.keys(this.get('configTypes'));
 
   //Falcon has dependency on oozie-site but oozie-site advanced/custom section should not be shown on Falcon page

+ 3 - 3
ambari-web/app/views/common/controls_view.js

@@ -223,7 +223,7 @@ App.ServiceConfigCheckboxWithDependencies = App.ServiceConfigCheckbox.extend({
 
   showHideDependentConfigs: function() {
     if (this.get('serviceConfig.dependentConfigPattern')) {
-      this.get('categoryConfigsAll').forEach(function(c) {
+      this.get('parentView.serviceConfigs').forEach(function(c) {
         if (c.get('name').match(this.get('serviceConfig.dependentConfigPattern')) && c.get('name') != this.get('serviceConfig.name'))
           c.set('isVisible', this.get('checked'))
       }, this);
@@ -525,8 +525,8 @@ App.ServiceConfigRadioButton = Ember.Checkbox.extend({
         components.forEach(function (_component) {
           if (_component.foreignKeys) {
             _component.foreignKeys.forEach(function (_componentName) {
-              if (this.get('parentView.categoryConfigsAll').someProperty('name', _componentName)) {
-                var component = this.get('parentView.categoryConfigsAll').findProperty('name', _componentName);
+              if (this.get('parentView.parentView.serviceConfigs').someProperty('name', _componentName)) {
+                var component = this.get('parentView.parentView.serviceConfigs').findProperty('name', _componentName);
                 component.set('isVisible', _component.displayName === this.get('value'));
               }
             }, this);

+ 8 - 0
ambari-web/test/models/stack_service_test.js

@@ -270,6 +270,10 @@ describe('App.StackService', function () {
       expect(ss.get('configCategories').mapProperty('name')).to.eql([
         "General",
         "Advanced",
+        "RangerSettings",
+        "HDFSAuditSettings",
+        "RepositoryConfigs",
+        "SSLRangerSettings",
         "Advanced key",
         "Custom key"
       ]);
@@ -282,6 +286,10 @@ describe('App.StackService', function () {
         "DATANODE",
         "General",
         "Advanced",
+        "RangerSettings",
+        "HDFSAuditSettings",
+        "RepositoryConfigs",
+        "SSLRangerSettings",
         "Advanced key",
         "Custom key"]);
     });