Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 32fa1e523 -> 424164dca


AMBARI-12555. "kdc_create_attributes" field should not be required (rlevas)


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

Branch: refs/heads/branch-2.1
Commit: 424164dcad166c383b1f056dc6509b061156a110
Parents: 32fa1e5
Author: Robert Levas <[email protected]>
Authored: Thu Jul 30 18:50:55 2015 -0400
Committer: Robert Levas <[email protected]>
Committed: Thu Jul 30 18:50:55 2015 -0400

----------------------------------------------------------------------
 .../data/stacks/HDP-2.2/configurations.json      |  6 +++---
 .../main/admin/kerberos/step2_controller.js      | 12 ++++++++++--
 ambari-web/app/data/HDP2/site_properties.js      | 19 ++++++++++++++++---
 3 files changed, 29 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/424164dc/ambari-web/app/assets/data/stacks/HDP-2.2/configurations.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/stacks/HDP-2.2/configurations.json 
b/ambari-web/app/assets/data/stacks/HDP-2.2/configurations.json
index fcaa96d..0399656 100644
--- a/ambari-web/app/assets/data/stacks/HDP-2.2/configurations.json
+++ b/ambari-web/app/assets/data/stacks/HDP-2.2/configurations.json
@@ -9486,11 +9486,11 @@
           }
         },
         {
-          "href" : 
"http://c6401:8080/api/v1/stacks/HDP/versions/2.2/services/KERBEROS/configurations/create_attributes_template";,
+          "href" : 
"http://c6401:8080/api/v1/stacks/HDP/versions/2.2/services/KERBEROS/configurations/ad_create_attributes_template";,
           "StackConfigurations" : {
             "final" : "false",
-            "property_description" : "\n      A Velocity template to use to 
generate a JSON-formatted document containing the set of\n      attribute names 
and values needed to create a new Kerberos identity in the relevant KDC.\n      
Variables include:\n      principal_name, principal_primary, 
principal_instance, realm, realm_lowercase,\n      normalized_principal, 
principal digest, password, is_service, container_dn\n    ",
-            "property_name" : "create_attributes_template",
+            "property_description" : "\n      A Velocity template to use to 
generate a JSON-formatted document containing the set of\n      attribute names 
and values needed to create a new Kerberos identity in the relevant\n      
Active Directory.\n      Variables include:\n      principal_name, 
principal_primary, principal_instance, realm, realm_lowercase,\n      
normalized_principal, principal digest, password, is_service, container_dn\n    
",
+            "property_name" : "ad_create_attributes_template",
             "property_type" : [ ],
             "property_value" : "\n{\n  \"objectClass\": [\"top\", \"person\", 
\"organizationalPerson\", \"user\"],\n  \"cn\": \"$principal_name\",\n  #if( 
$is_service )\n  \"servicePrincipalName\": \"$principal_name\",\n  #end\n  
\"userPrincipalName\": \"$normalized_principal\",\n  \"unicodePwd\": 
\"$password\",\n  \"accountExpires\": \"0\",\n  \"userAccountControl\": 
\"66048\"\n}\n    ",
             "service_name" : "KERBEROS",

http://git-wip-us.apache.org/repos/asf/ambari/blob/424164dc/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
index 43ee5a3..cb32593 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
@@ -104,7 +104,8 @@ App.KerberosWizardStep2Controller = 
App.WizardStep7Controller.extend({
    */
   filterConfigs: function (configs) {
     var kdcType = this.get('content.kerberosOption');
-    var configNames = ['ldap_url', 'container_dn', 
'create_attributes_template'];
+    var adConfigNames = ['ldap_url', 'container_dn', 
'ad_create_attributes_template'];
+    var mitConfigNames = ['kdc_create_attributes'];
     var kerberosWizardController = 
this.controllers.get('kerberosWizardController');
     var manageIdentitiesConfig = configs.findProperty('name', 
'manage_identities');
 
@@ -118,12 +119,19 @@ App.KerberosWizardStep2Controller = 
App.WizardStep7Controller.extend({
       manageIdentitiesConfig.value = 'true';
     }
 
-    configNames.forEach(function (_configName) {
+    adConfigNames.forEach(function (_configName) {
       var config = configs.findProperty('name', _configName);
       if (config) {
         config.isVisible = kdcType === 
Em.I18n.t('admin.kerberos.wizard.step1.option.ad');
       }
     }, this);
+
+    mitConfigNames.forEach(function (_configName) {
+      var config = configs.findProperty('name', _configName);
+      if (config) {
+        config.isVisible = kdcType === 
Em.I18n.t('admin.kerberos.wizard.step1.option.kdc');
+      }
+    }, this);
   },
 
   submit: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/424164dc/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js 
b/ambari-web/app/data/HDP2/site_properties.js
index 5989b50..44833b2 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -2401,11 +2401,12 @@ var hdp2properties = [
   },
   {
     "id": "puppet var",
-    "name": "create_attributes_template",
-    "displayName": "Attribute template",
+    "name": "ad_create_attributes_template",
+    "displayName": "Account Attribute Template",
     "displayType": "content",
     "isOverridable": false,
     "isVisible": true,
+    "isRequired": false,
     "serviceName": "KERBEROS",
     "filename": "kerberos-env.xml",
     "category": "Advanced kerberos-env",
@@ -2413,6 +2414,18 @@ var hdp2properties = [
   },
   {
     "id": "puppet var",
+    "name": "kdc_create_attributes",
+    "displayName": "Principal Attributes",
+    "isOverridable": false,
+    "isVisible": true,
+    "isRequired": false,
+    "serviceName": "KERBEROS",
+    "filename": "kerberos-env.xml",
+    "category": "Advanced kerberos-env",
+    "index" : 12
+  },
+  {
+    "id": "puppet var",
     "name": "case_insensitive_username_rules",
     "displayName": "Enable case insensitive username rules",
     "displayType": "checkbox",
@@ -2421,7 +2434,7 @@ var hdp2properties = [
     "serviceName": "KERBEROS",
     "filename": "kerberos-env.xml",
     "category": "Advanced kerberos-env",
-    "index" : 11
+    "index" : 13
   },
   {
     "id": "puppet var",

Reply via email to