You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2013/08/06 20:07:58 UTC

git commit: AMBARI-2820: In secured cluster enabling wizard, hostname part in the principal should be displayed in lower case format. (jaimin)

Updated Branches:
  refs/heads/trunk a303eafa1 -> 8dcabe83b


AMBARI-2820: In secured cluster enabling wizard, hostname part in the principal should be displayed in lower case format. (jaimin)


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

Branch: refs/heads/trunk
Commit: 8dcabe83b22dc20c26a5ce6c81446e2e0149dba4
Parents: a303eaf
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Tue Aug 6 11:07:16 2013 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Tue Aug 6 11:07:16 2013 -0700

----------------------------------------------------------------------
 .../app/controllers/main/admin/security/add/step2.js      |  8 ++++----
 .../app/controllers/main/admin/security/add/step3.js      | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/8dcabe83/ambari-web/app/controllers/main/admin/security/add/step2.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security/add/step2.js b/ambari-web/app/controllers/main/admin/security/add/step2.js
index d70e1fe..1d18d77 100644
--- a/ambari-web/app/controllers/main/admin/security/add/step2.js
+++ b/ambari-web/app/controllers/main/admin/security/add/step2.js
@@ -201,8 +201,8 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
       var oozieSpnegoPrincipal = oozieService.configs.findProperty('name', 'oozie_http_principal_name');
       if (oozieServerHost && oozieServerPrincipal && oozieSpnegoPrincipal) {
         oozieServerHost.defaultValue = App.Service.find('OOZIE').get('hostComponents').findProperty('componentName', 'OOZIE_SERVER').get('host.hostName');
-        oozieServerPrincipal.defaultValue = 'oozie/' + oozieServerHost.defaultValue;
-        oozieSpnegoPrincipal.defaultValue = 'HTTP/' + oozieServerHost.defaultValue;
+        oozieServerPrincipal.defaultValue = 'oozie/' + oozieServerHost.defaultValue.toLowerCase();
+        oozieSpnegoPrincipal.defaultValue = 'HTTP/' + oozieServerHost.defaultValue.toLowerCase();
       }
     }
     if (hiveService) {
@@ -216,7 +216,7 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
       var webHcatSpnegoPrincipal = webHcatService.configs.findProperty('name', 'webHCat_http_principal_name');
       if (webHcatHost && webHcatSpnegoPrincipal) {
         webHcatHost.defaultValue = App.Service.find('WEBHCAT').get('hostComponents').findProperty('componentName', 'WEBHCAT_SERVER').get('host.hostName');
-        webHcatSpnegoPrincipal.defaultValue = 'HTTP/' + webHcatHost.defaultValue;
+        webHcatSpnegoPrincipal.defaultValue = 'HTTP/' + webHcatHost.defaultValue.toLowerCase();
       }
     }
 
@@ -225,7 +225,7 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
       var nagiosServerPrincipal = nagiosService.configs.findProperty('name', 'nagios_principal_name');
       if (nagiosServerHost && nagiosServerPrincipal) {
         nagiosServerHost.defaultValue = App.Service.find('NAGIOS').get('hostComponents').findProperty('componentName', 'NAGIOS_SERVER').get('host.hostName');
-        nagiosServerPrincipal.defaultValue = 'nagios/' + nagiosServerHost.defaultValue;
+        nagiosServerPrincipal.defaultValue = 'nagios/' + nagiosServerHost.defaultValue.toLowerCase();
       }
     }
     if (hdfsService) {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/8dcabe83/ambari-web/app/controllers/main/admin/security/add/step3.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security/add/step3.js b/ambari-web/app/controllers/main/admin/security/add/step3.js
index 84423e6..d129305 100644
--- a/ambari-web/app/controllers/main/admin/security/add/step3.js
+++ b/ambari-web/app/controllers/main/admin/security/add/step3.js
@@ -130,7 +130,7 @@ App.MainAdminSecurityAddStep3Controller = Em.Controller.extend({
         result.push({
           host: host.get('hostName'),
           component: Em.I18n.t('admin.addSecurity.hdfs.user.httpUser'),
-          principal: hadoopHttpPrincipal.value.replace('_HOST', host.get('hostName')) + hadoopHttpPrincipal.unit,
+          principal: hadoopHttpPrincipal.value.replace('_HOST', host.get('hostName').toLowerCase()) + hadoopHttpPrincipal.unit,
           keytabFile: stringUtils.getFileFromPath(hadoopHttpKeytabPath),
           keytab: stringUtils.getPath(hadoopHttpKeytabPath),
           owner: 'root',
@@ -145,7 +145,7 @@ App.MainAdminSecurityAddStep3Controller = Em.Controller.extend({
         result.push({
           host: host.get('hostName'),
           component: Em.I18n.t('admin.addSecurity.webhcat.user.httpUser'),
-          principal: webHCatHttpPrincipal.value.replace('_HOST', host.get('hostName')) + webHCatHttpPrincipal.unit,
+          principal: webHCatHttpPrincipal.value.replace('_HOST', host.get('hostName').toLowerCase()) + webHCatHttpPrincipal.unit,
           keytabFile: stringUtils.getFileFromPath(webHCatHttpKeytabPath),
           keytab: stringUtils.getPath(webHCatHttpKeytabPath),
           owner: 'root',
@@ -160,7 +160,7 @@ App.MainAdminSecurityAddStep3Controller = Em.Controller.extend({
         result.push({
           host: host.get('hostName'),
           component: Em.I18n.t('admin.addSecurity.oozie.user.httpUser'),
-          principal: oozieHttpPrincipal.value.replace('_HOST', host.get('hostName')) + oozieHttpPrincipal.unit,
+          principal: oozieHttpPrincipal.value.replace('_HOST', host.get('hostName').toLowerCase()) + oozieHttpPrincipal.unit,
           keytabFile: stringUtils.getFileFromPath(oozieHttpKeytabPath),
           keytab: stringUtils.getPath(oozieHttpKeytabPath),
           owner: 'root',
@@ -175,13 +175,13 @@ App.MainAdminSecurityAddStep3Controller = Em.Controller.extend({
           serviceConfigs.forEach(function (config) {
             if (config.component && config.component === hostComponent.get('componentName')) {
               if (config.name.endsWith('_principal_name')) {
-                principal = config.value.replace('_HOST', host.get('hostName')) + config.unit;
+                principal = config.value.replace('_HOST', host.get('hostName').toLowerCase()) + config.unit;
               } else if (config.name.endsWith('_keytab') || config.name.endsWith('_keytab_path')) {
                 keytab = config.value;
               }
             } else if (config.components && config.components.contains(hostComponent.get('componentName'))) {
               if (config.name.endsWith('_principal_name')) {
-                principal = config.value.replace('_HOST', host.get('hostName')) + config.unit;
+                principal = config.value.replace('_HOST', host.get('hostName').toLowerCase()) + config.unit;
               } else if (config.name.endsWith('_keytab') || config.name.endsWith('_keytab_path')) {
                 keytab = config.value;
               }