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 2015/01/13 05:07:00 UTC
ambari git commit: AMBARI-9099. Collect LDAP URL and Principal
container DN information for Active Directory Integration. (jaimin)
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 <ja...@hortonworks.com>
Authored: Mon Jan 12 20:06:36 2015 -0800
Committer: Jaimin Jetly <ja...@hortonworks.com>
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 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration supports_final="false">
+ <property require-input="true">
+ <name>ldap_url</name>
+ <description>
+ The URL to the Active Directory LDAP Interface
+ </description>
+ <value></value>
+ </property>
+
+ <property require-input="true">
+ <name>container_dn</name>
+ <description>
+ The distinguished name (DN) of the container used store service principals
+ </description>
+ <value></value>
+ </property>
+</configuration>
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 @@
<configuration-dependencies>
<config-type>krb5-conf</config-type>
- <config-type>kdc-conf</config-type>
- <config-type>kadm5-acl</config-type>
+ <config-type>kerberos-env</config-type>
</configuration-dependencies>
<restartRequiredAfterChange>true</restartRequiredAfterChange>
</service>
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",