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 2014/08/20 04:12:28 UTC
git commit: AMBARI-6932. Security wizard: HDFS user name should not
be shown in standalone storm deployment. (jaimin)
Repository: ambari
Updated Branches:
refs/heads/trunk 356e17af4 -> 068cafa90
AMBARI-6932. Security wizard: HDFS user name should not be shown in standalone storm deployment. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/068cafa9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/068cafa9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/068cafa9
Branch: refs/heads/trunk
Commit: 068cafa9056c490d8abdd4e9bd9322b6f71ca2f3
Parents: 356e17a
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Tue Aug 19 19:11:52 2014 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Tue Aug 19 19:11:52 2014 -0700
----------------------------------------------------------------------
.../main/admin/security/add/step2.js | 21 ++++++++++----------
ambari-web/app/data/HDP2/secure_properties.js | 4 ++--
2 files changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/068cafa9/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 4b28a30..857099f 100644
--- a/ambari-web/app/controllers/main/admin/security/add/step2.js
+++ b/ambari-web/app/controllers/main/admin/security/add/step2.js
@@ -343,18 +343,19 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
*/
addUserPrincipals: function (serviceConfigs, securityUsers) {
var generalService = serviceConfigs.findProperty('serviceName', 'GENERAL').configs;
- var isHbaseService = serviceConfigs.someProperty('serviceName', 'HBASE');
- var hbaseUserPrincipal = generalService.findProperty('name', 'hbase_principal_name');
- var hbaseUserKeytab = generalService.findProperty('name', 'hbase_user_keytab');
- var hbaseUser = securityUsers.findProperty('name', 'hbase_user');
-
this.setUserPrincipalValue(securityUsers.findProperty('name', 'smokeuser'), generalService.findProperty('name', 'smokeuser_principal_name'));
- this.setUserPrincipalValue(securityUsers.findProperty('name', 'hdfs_user'), generalService.findProperty('name', 'hdfs_principal_name'));
+ var servicesWithUserPrincipals = ['HDFS','HBASE'];
- if (isHbaseService && this.setUserPrincipalValue(hbaseUser, hbaseUserPrincipal)) {
- hbaseUserPrincipal.isVisible = true;
- hbaseUserKeytab.isVisible = true;
- }
+ servicesWithUserPrincipals.forEach(function(serviceName){
+ var isServiceInstalled = serviceConfigs.someProperty('serviceName', serviceName);
+ var userPricipal = generalService.findProperty('name', serviceName.toLowerCase() + '_principal_name');
+ var userKeytab = generalService.findProperty('name', serviceName.toLowerCase() + '_user_keytab');
+ var userName = securityUsers.findProperty('name', serviceName.toLowerCase() + '_user');
+ if (isServiceInstalled && this.setUserPrincipalValue(userName, userPricipal)) {
+ userPricipal.isVisible = true;
+ userKeytab.isVisible = true;
+ }
+ },this);
},
/**
* set default value of user principal
http://git-wip-us.apache.org/repos/asf/ambari/blob/068cafa9/ambari-web/app/data/HDP2/secure_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/secure_properties.js b/ambari-web/app/data/HDP2/secure_properties.js
index 93555b4..6904d6e 100644
--- a/ambari-web/app/data/HDP2/secure_properties.js
+++ b/ambari-web/app/data/HDP2/secure_properties.js
@@ -119,7 +119,7 @@ module.exports =
"defaultValue": "hdfs",
"description": "This is the principal name for HDFS user",
"displayType": "principal",
- "isVisible": true,
+ "isVisible": false,
"isOverridable": false,
"isReconfigurable": false,
"serviceName": "GENERAL",
@@ -133,7 +133,7 @@ module.exports =
"defaultValue": "/etc/security/keytabs/hdfs.headless.keytab",
"description": "Path to keytab file for HDFS user",
"displayType": "directory",
- "isVisible": true,
+ "isVisible": false,
"isOverridable": false,
"serviceName": "GENERAL",
"filename": "hadoop-env.xml",