ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-12348. Spnego principal can't be customized. (jaimin)
Date Thu, 09 Jul 2015 19:37:19 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk f3e06dc21 -> 3f9802f43


AMBARI-12348. Spnego principal can't be customized. (jaimin)


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

Branch: refs/heads/trunk
Commit: 3f9802f43552af42b5e4d0ed3f785ea5bf426afb
Parents: f3e06dc
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Thu Jul 9 12:36:21 2015 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Thu Jul 9 12:36:21 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/mixins/wizard/addSecurityConfigs.js | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3f9802f4/ambari-web/app/mixins/wizard/addSecurityConfigs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/addSecurityConfigs.js b/ambari-web/app/mixins/wizard/addSecurityConfigs.js
index c0caea4..ecc2942 100644
--- a/ambari-web/app/mixins/wizard/addSecurityConfigs.js
+++ b/ambari-web/app/mixins/wizard/addSecurityConfigs.js
@@ -285,7 +285,8 @@ App.AddSecurityConfigs = Em.Mixin.create({
   },
 
   /**
-   *
+   * This function updates stack/service/component level configurations of the kerberos descriptor
+   * with the values entered by the user on the rendered ui
    * @param configurations
    * @param config
    * @return boolean
@@ -312,7 +313,8 @@ App.AddSecurityConfigs = Em.Mixin.create({
 
 
   /**
-   *
+   * This function updates stack/service/component level kerberos descriptor identities (principal
and keytab)
+   * with the values entered by the user on the rendered ui
    * @param identities
    * @param config
    * @return boolean
@@ -323,8 +325,14 @@ App.AddSecurityConfigs = Em.Mixin.create({
       var keys = Em.keys(identity).without('name');
       keys.forEach(function (item) {
         var prop = identity[item];
-        if (prop.configuration && prop.configuration.split('/')[0] === config.filename
&&
-          prop.configuration.split('/')[1] === config.name) {
+
+        // compare ui rendered config against identity with `configuration attribute` (Most
of the identities have `configuration attribute`)
+        var isIdentityWithConfig =  (prop.configuration && prop.configuration.split('/')[0]
=== config.filename && prop.configuration.split('/')[1] === config.name);
+
+        // compare ui rendered config against identity without `configuration attribute`
(For example spnego principal and keytab)
+        var isIdentityWithoutConfig = (!prop.configuration && identity.name === config.name.split('_')[0]
&& item === config.name.split('_')[1]);
+
+        if (isIdentityWithConfig || isIdentityWithoutConfig) {
           prop[{keytab: 'file', principal: 'value'}[item]] = config.value;
           isConfigUpdated = true;
         }


Mime
View raw message