Преглед изворни кода

AMBARI-7722 Enabling Kerberos on 2.2 Stack HS2 issues. (atkach)

atkach пре 10 година
родитељ
комит
196b4df7da

+ 6 - 0
ambari-web/app/controllers/main/admin/security/add/step3.js

@@ -73,6 +73,12 @@ App.MainAdminSecurityAddStep3Controller = Em.Controller.extend({
         keytab: 'webhcat_http_keytab',
         displayName: Em.I18n.t('admin.addSecurity.webhcat.user.httpUser')
       },
+      {
+        componentName: 'HIVE_SERVER',
+        principal: 'hive_metastore_http_principal_name',
+        keytab: 'hive_metastore_http_keytab',
+        displayName: Em.I18n.t('admin.addSecurity.hive.user.httpUser')
+      },
       {
         componentName: 'OOZIE_SERVER',
         principal: 'oozie_http_principal_name',

+ 16 - 0
ambari-web/app/data/HDP2/secure_mapping.js

@@ -424,6 +424,22 @@ module.exports = [
     "filename": "hive-site.xml",
     "serviceName": "HIVE"
   },
+  {
+    "name": "hive.server2.authentication.spnego.principal",
+    "templateName": ["hive_metastore_http_principal_name", "kerberos_domain"],
+    "foreignKey": null,
+    "value": "<templateName[0]>@<templateName[1]>",
+    "filename": "hive-site.xml",
+    "serviceName": "HIVE"
+  },
+  {
+    "name": "hive.server2.authentication.spnego.keytab",
+    "templateName": ["hive_metastore_http_keytab"],
+    "foreignKey": null,
+    "value": "<templateName[0]>",
+    "filename": "hive-site.xml",
+    "serviceName": "HIVE"
+  },
   {
     "name": "oozie.service.AuthorizationService.authorization.enabled",
     "templateName": [],

+ 26 - 0
ambari-web/app/data/HDP2/secure_properties.js

@@ -829,6 +829,32 @@ var props = {
       "category": "Hive Metastore",
       "component": "HIVE_SERVER"
     },
+    {
+      "id": "puppet var",
+      "name": "hive_metastore_http_principal_name",
+      "displayName": "Web principal name",
+      "value": "",
+      "defaultValue": "HTTP/_HOST",
+      "description": "Principal name for SPNEGO access to Hive Metastore and HiveServer2. _HOST will get automatically replaced with actual hostname at an instance of Hive Metastore and HiveServer2",
+      "displayType": "principal",
+      "isVisible": true,
+      "isOverridable": false,
+      "serviceName": "HIVE",
+      "category": "Hive Metastore"
+    },
+    {
+      "id": "puppet var",
+      "name": "hive_metastore_http_keytab",
+      "displayName": "Path to SPNEGO keytab file",
+      "value": "",
+      "defaultValue": "/etc/security/keytabs/spnego.service.keytab",
+      "description": "Path to SPNEGO keytab file for  Hive Metastore and HiveServer2",
+      "displayType": "directory",
+      "isVisible": true,
+      "isOverridable": false,
+      "serviceName": "HIVE",
+      "category": "Hive Metastore"
+    },
 
   /**********************************************OOZIE***************************************/
     {

+ 1 - 0
ambari-web/app/messages.js

@@ -1087,6 +1087,7 @@ Em.I18n.translations = {
   'admin.addSecurity.nm.user.httpUser': 'NodeManager SPNEGO User',
   'admin.addSecurity.historyServer.user.httpUser': 'History server SPNEGO User',
   'admin.addSecurity.webhcat.user.httpUser': 'WebHCat SPNEGO User',
+  'admin.addSecurity.hive.user.httpUser': 'Hive SPNEGO User',
   'admin.addSecurity.oozie.user.httpUser': 'Oozie SPNEGO User',
   'admin.addSecurity.falcon.user.httpUser': 'Falcon SPNEGO User',
   'admin.addSecurity.user.yarn.atsUser': 'YARN ATS User',