Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D693C1731D for ; Tue, 13 Jan 2015 04:06:59 +0000 (UTC) Received: (qmail 13745 invoked by uid 500); 13 Jan 2015 04:07:01 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 13711 invoked by uid 500); 13 Jan 2015 04:07:01 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 13702 invoked by uid 99); 13 Jan 2015 04:07:01 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jan 2015 04:07:01 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id ECFBCA058D1; Tue, 13 Jan 2015 04:07:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jaimin@apache.org To: commits@ambari.apache.org Message-Id: <5a14fff2b7644b73987841208949f03c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-9099. Collect LDAP URL and Principal container DN information for Active Directory Integration. (jaimin) Date: Tue, 13 Jan 2015 04:07:00 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk e6b4e2fbb -> 698d030bd AMBARI-9099. Collect LDAP URL and Principal container DN information for Active Directory Integration. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/698d030b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/698d030b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/698d030b Branch: refs/heads/trunk Commit: 698d030bd002112adce60c858b3557ab373d159b Parents: e6b4e2f Author: Jaimin Jetly Authored: Mon Jan 12 20:06:36 2015 -0800 Committer: Jaimin Jetly Committed: Mon Jan 12 20:06:43 2015 -0800 ---------------------------------------------------------------------- .../1.10.3-10/configuration/kerberos-env.xml | 39 ++++++++++++++++++++ .../KERBEROS/1.10.3-10/metainfo.xml | 3 +- .../main/admin/kerberos/step2_controller.js | 28 ++++++++++---- ambari-web/app/data/HDP2/site_properties.js | 29 +++++++++++++-- 4 files changed, 86 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/698d030b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml new file mode 100644 index 0000000..0ecf6c0 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml @@ -0,0 +1,39 @@ + + + + + + + ldap_url + + The URL to the Active Directory LDAP Interface + + + + + + container_dn + + The distinguished name (DN) of the container used store service principals + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/698d030b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/metainfo.xml b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/metainfo.xml index 64f42c1..c78ce0b 100644 --- a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/metainfo.xml @@ -120,8 +120,7 @@ krb5-conf - kdc-conf - kadm5-acl + kerberos-env true http://git-wip-us.apache.org/repos/asf/ambari/blob/698d030b/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 0eeee2c..753b8f7 100644 --- a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js +++ b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js @@ -70,9 +70,23 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({ App.config.setPreDefinedServiceConfigs(this.get('addMiscTabToPage')); //STEP 4: Add advanced configs App.config.addAdvancedConfigs(configs, advancedConfigs); + this.showAdConfigs(configs); this.applyServicesConfigs(configs, storedConfigs); }, + /** + * Make Active Directory specific configs visible if user has selected AD option + * @param configs + */ + showAdConfigs: function (configs) { + var kdcType = this.get('content.kerberosOption'); + var configNames = ['ldap_url', 'container_dn']; + configNames.forEach(function (_configName) { + var config = configs.findProperty('name', _configName); + config.isVisible = kdcType === Em.I18n.t('admin.kerberos.wizard.step1.option.ad'); + }, this); + }, + submit: function () { this.set('isSubmitDisabled', true); var self = this; @@ -87,7 +101,7 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({ self.createKerberosComponent().done(function () { self.createKerberosHostComponents().done(function () { self.createConfigurations().done(function () { - self.createKerberosAdminSession().done(function() { + self.createKerberosAdminSession().done(function () { App.router.send('next'); }); }); @@ -132,7 +146,7 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({ }); }, - createKerberosHostComponents: function() { + createKerberosHostComponents: function () { var hostNames = this.get('content.hosts'); var queryStr = ''; hostNames.forEach(function (hostName) { @@ -215,7 +229,7 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({ return {"type": site, "tag": tag, "properties": properties}; }, - tweakKdcTypeValue: function(properties) { + tweakKdcTypeValue: function (properties) { if (properties['kdc_type'] === Em.I18n.t('admin.kerberos.wizard.step1.option.kdc')) { properties['kdc_type'] = "mit-kdc"; } else if (properties['kdc_type'] === Em.I18n.t('admin.kerberos.wizard.step1.option.ad')) { @@ -229,16 +243,16 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({ */ createKerberosAdminSession: function () { var configs = this.get('stepConfigs')[0].get('configs'); - var adminPrincipalValue = configs.findProperty('name','admin_principal').value; - var adminPasswordValue = configs.findProperty('name','admin_password').value; + var adminPrincipalValue = configs.findProperty('name', 'admin_principal').value; + var adminPasswordValue = configs.findProperty('name', 'admin_password').value; return App.ajax.send({ name: 'common.cluster.update', sender: this, data: { clusterName: App.get('clusterName') || App.clusterStatus.get('clusterName'), data: [{ - session_attributes : { - kerberos_admin : {principal : adminPrincipalValue, password : adminPasswordValue} + session_attributes: { + kerberos_admin: {principal: adminPrincipalValue, password: adminPasswordValue} } }] } http://git-wip-us.apache.org/repos/asf/ambari/blob/698d030b/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 a02036e..7a154a3 100644 --- a/ambari-web/app/data/HDP2/site_properties.js +++ b/ambari-web/app/data/HDP2/site_properties.js @@ -1977,7 +1977,7 @@ module.exports = "index": 0 }, - /********************************************* kerberos***********************************/ + /*******************************************kerberos***********************************/ { "id": "puppet var", "name": "kdc_type", @@ -2029,6 +2029,27 @@ module.exports = }, { "id": "puppet var", + "name": "ldap_url", + "displayName": "LDAP url", + "isOverridable": false, + "isVisible": false, + "serviceName": "KERBEROS", + "filename": "kerberos-env.xml", + "category": "KDC", + "index": 4 + }, + { + "id": "puppet var", + "name": "container_dn", + "displayName": "Container DN", + "isVisible": false, + "serviceName": "KERBEROS", + "filename": "kerberos-env.xml", + "category": "KDC", + "index": 5 + }, + { + "id": "puppet var", "name": "domains", "displayName": "Domains", "isRequired": false, @@ -2038,7 +2059,7 @@ module.exports = "serviceName": "KERBEROS", "filename": "krb5-conf.xml", "category": "KDC", - "index": 4 + "index": 6 }, { "id": "puppet var", @@ -2050,7 +2071,7 @@ module.exports = "serviceName": "KERBEROS", "filename": "krb5-conf.xml", "category": "KDC", - "index": 5 + "index": 7 }, { "id": "puppet var", @@ -2063,7 +2084,7 @@ module.exports = "serviceName": "KERBEROS", "filename": "krb5-conf.xml", "category": "KDC", - "index": 6 + "index": 8 }, { "id": "puppet var",