You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2016/03/17 13:07:50 UTC
[1/2] ambari git commit: AMBARI-15458. Get and use composite Kerberos
Descriptor via the REST API (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/trunk dcb4ed803 -> f7cde0c7a
AMBARI-15458. Get and use composite Kerberos Descriptor via the REST API (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f7cde0c7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f7cde0c7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f7cde0c7
Branch: refs/heads/trunk
Commit: f7cde0c7ab041a0f56e96c996a6fa80b2fda33e9
Parents: cb3d49b
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Mar 17 12:53:22 2016 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Thu Mar 17 14:07:45 2016 +0200
----------------------------------------------------------------------
.../app/controllers/main/admin/kerberos.js | 3 +
.../main/admin/kerberos/step4_controller.js | 34 +-
.../controllers/main/service/add_controller.js | 4 +-
.../app/mixins/wizard/addSecurityConfigs.js | 29 +-
ambari-web/app/utils/ajax/ajax.js | 8 +-
.../admin/kerberos/step4_controller_test.js | 84 +--
.../mixins/wizard/addSeccurityConfigs_test.js | 2 +-
.../test/mock_data_setup/stack_descriptors.js | 560 ++++++++++---------
8 files changed, 329 insertions(+), 395 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7cde0c7/ambari-web/app/controllers/main/admin/kerberos.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos.js b/ambari-web/app/controllers/main/admin/kerberos.js
index c021c89..9512a51 100644
--- a/ambari-web/app/controllers/main/admin/kerberos.js
+++ b/ambari-web/app/controllers/main/admin/kerberos.js
@@ -35,6 +35,9 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({
'none': Em.I18n.t('admin.kerberos.wizard.step1.option.manual')
},
+ // use cluster descriptor instead of stack
+ loadStackDescriptorConfigs: Em.alias('loadClusterDescriptorConfigs'),
+
getAddSecurityWizardStatus: function () {
return App.db.getSecurityWizardStatus();
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7cde0c7/ambari-web/app/controllers/main/admin/kerberos/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step4_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step4_controller.js
index 914e19e..ac8c212 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step4_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step4_controller.js
@@ -36,14 +36,44 @@ App.KerberosWizardStep4Controller = App.WizardStep7Controller.extend(App.AddSecu
}
var self = this;
this.clearStep();
- this.getDescriptorConfigs().then(function (properties) {
- self.setStepConfigs(properties);
+ this.getDescriptor().then(function (properties) {
+ self.setStepConfigs(self.createServicesStackDescriptorConfigs(properties));
}).always(function() {
self.set('isRecommendedLoaded', true);
});
},
/**
+ * Get descriptor configs from API endpoint.
+ * On <b>Enable Kerberos</b> loads descriptor from cluster STACK resource.
+ * On <b>Add Service Wizard</b> first check for cluster's artifacts descriptor and
+ * save it presence status, then loads from cluster COMPOSITE resource.
+ * Check for cluster/artifacts/kerberos_descriptor is necessary to determine updating or creation
+ * kerberos descriptor.
+ *
+ * @returns {$.Deferred}
+ */
+ getDescriptor: function() {
+ var self = this;
+ var dfd = $.Deferred();
+ var successCallback = function(data) {
+ dfd.resolve(data);
+ };
+ if (this.get('isWithinAddService')) {
+ App.ajax.send({
+ sender: this,
+ name: 'admin.kerberize.cluster_descriptor_artifact'
+ }).always(function(data, status) {
+ self.storeClusterDescriptorStatus(status === 'success');
+ self.loadClusterDescriptorConfigs().then(successCallback);
+ });
+ } else {
+ this.loadStackDescriptorConfigs().then(successCallback);
+ }
+ return dfd.promise();
+ },
+
+ /**
* Create service config object for Kerberos service.
*
* @param {App.ServiceConfigProperty[]} configs
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7cde0c7/ambari-web/app/controllers/main/service/add_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/add_controller.js b/ambari-web/app/controllers/main/service/add_controller.js
index 60eec45..73abd59 100644
--- a/ambari-web/app/controllers/main/service/add_controller.js
+++ b/ambari-web/app/controllers/main/service/add_controller.js
@@ -298,8 +298,8 @@ App.AddServiceController = App.WizardController.extend(App.AddSecurityConfigs, {
var self = this,
dfd = $.Deferred();
if (App.get('isKerberosEnabled')) {
- this.getDescriptorConfigs().then(function(properties) {
- self.set('kerberosDescriptorConfigs', properties);
+ this.loadClusterDescriptorConfigs().then(function(properties) {
+ self.set('kerberosDescriptorConfigs', self.createServicesStackDescriptorConfigs(properties));
}).always(function(){
dfd.resolve();
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7cde0c7/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 0e500c6..b769c4e 100644
--- a/ambari-web/app/mixins/wizard/addSecurityConfigs.js
+++ b/ambari-web/app/mixins/wizard/addSecurityConfigs.js
@@ -58,33 +58,6 @@ App.AddSecurityConfigs = Em.Mixin.create({
}.property('App.isHadoop22Stack'),
/**
- * Generate stack descriptor configs.
- * - Load kerberos artifacts from stack endpoint
- * - Load kerberos artifacts from cluster resource and merge them with stack descriptor.
- * When cluster descriptor is absent then stack artifacts used.
- *
- * @returns {$.Deferred}
- */
- getDescriptorConfigs: function () {
- var dfd = $.Deferred();
- var self = this;
- this.loadStackDescriptorConfigs().then(function(data) {
- var stackArtifacts = data;
- self.loadClusterDescriptorConfigs().then(function(clusterArtifacts) {
- self.storeClusterDescriptorStatus(true);
- dfd.resolve(self.createServicesStackDescriptorConfigs(objectUtils.deepMerge(data, clusterArtifacts)));
- }, function() {
- self.storeClusterDescriptorStatus(false);
- dfd.resolve(self.createServicesStackDescriptorConfigs(stackArtifacts));
- });
- }, function() {
- dfd.reject();
- });
- return dfd.promise();
- },
-
-
- /**
* Store status of kerberos descriptor located in cluster artifacts.
* This status needed for Add Service Wizard to select appropriate method to create
* or update descriptor.
@@ -106,7 +79,7 @@ App.AddSecurityConfigs = Em.Mixin.create({
var self = this;
var configs = [];
var clusterConfigs = [];
- var kerberosDescriptor = items.artifact_data;
+ var kerberosDescriptor = Em.get(items, 'KerberosDescriptor.kerberos_descriptor');
this.set('kerberosDescriptor', kerberosDescriptor);
// generate configs for root level properties object, currently realm, keytab_dir
clusterConfigs = clusterConfigs.concat(this.expandKerberosStackDescriptorProps(kerberosDescriptor.properties, 'Cluster', 'stackConfigs'));
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7cde0c7/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index c054b38..29d0715 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -1523,13 +1523,17 @@ var urls = {
'mock': '/data/wizard/kerberos/stack_descriptors.json'
},
'admin.kerberize.stack_descriptor': {
- 'real': '/stacks/{stackName}/versions/{stackVersionNumber}/artifacts/kerberos_descriptor?fields=artifact_data',
+ 'real': '/clusters/{clusterName}/kerberos_descriptors/STACK',
'mock': '/data/wizard/kerberos/stack_descriptors.json'
},
- 'admin.kerberize.cluster_descriptor': {
+ 'admin.kerberize.cluster_descriptor_artifact': {
'real': '/clusters/{clusterName}/artifacts/kerberos_descriptor?fields=artifact_data',
'mock': '/data/wizard/kerberos/stack_descriptors.json'
},
+ 'admin.kerberize.cluster_descriptor': {
+ 'real': '/clusters/{clusterName}/kerberos_descriptors/COMPOSITE',
+ 'mock': '/data/wizard/kerberos/stack_descriptors.json'
+ },
'admin.kerberos.cluster.artifact.create': {
'type': 'POST',
'real': '/clusters/{clusterName}/artifacts/{artifactName}',
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7cde0c7/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js b/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
index e077b30..01a3b00 100644
--- a/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
@@ -204,7 +204,7 @@ describe('App.KerberosWizardStep4Controller', function() {
name: 'addServiceController',
getDBProperty: function() {
return Em.A([
- Em.Object.create({ name: 'realm', value: 'realm_value' }),
+ Em.Object.create({ name: 'realm', value: 'realm_value' })
]);
},
loadCachedStepConfigValues : function() {
@@ -290,14 +290,14 @@ describe('App.KerberosWizardStep4Controller', function() {
this.wizardController = App.AddServiceController.create({});
controller.set('wizardController', this.wizardController);
sinon.stub(controller, 'clearStep').returns(true);
- sinon.stub(controller, 'getDescriptorConfigs').returns((new $.Deferred()).resolve(true).promise());
+
sinon.stub(controller, 'setStepConfigs').returns(true);
sinon.stub(App.router, 'send').withArgs('next');
});
afterEach(function() {
controller.clearStep.restore();
- controller.getDescriptorConfigs.restore();
+
controller.setStepConfigs.restore();
App.router.send.restore();
});
@@ -341,82 +341,4 @@ describe('App.KerberosWizardStep4Controller', function() {
});
});
});
-
- describe('#getDescriptorConfigs', function() {
- describe('Within Add Service', function () {
- var controller;
- beforeEach(function () {
- controller = App.KerberosWizardStep4Controller.create({
- wizardController: Em.Object.create({
- name: 'addServiceController',
- setDBProperty: sinon.spy()
- })
- });
- this.loadStackDescriptorStub = sinon.stub(controller, 'loadStackDescriptorConfigs').returns($.Deferred().resolve().promise());
- this.loadClusterDescriptorStub = sinon.stub(controller, 'loadClusterDescriptorConfigs');
- sinon.stub(controller, 'createServicesStackDescriptorConfigs', Em.K);
- });
-
- afterEach(function() {
- this.loadStackDescriptorStub.restore();
- this.loadClusterDescriptorStub.restore();
- controller.createServicesStackDescriptorConfigs.restore();
- controller.destroy();
- controller = null;
- });
-
- var cases = [
- {
- wizardController: 'addServiceController',
- clusterDescriptorExists: false,
- m: 'Within Add Service, Cluster Descriptor not exists. Should be reflected in wizard controller',
- e: {
- setDBPropertyCalled: true,
- setDBPropertyCalledWith: ['isClusterDescriptorExists', false]
- }
- },
- {
- wizardController: 'addServiceController',
- clusterDescriptorExists: true,
- m: 'Within Add Service, Cluster Descriptor is present. Should be reflected in wizard controller',
- e: {
- setDBPropertyCalled: true,
- setDBPropertyCalledWith: ['isClusterDescriptorExists', true]
- }
- },
- {
- wizardController: 'notAddService',
- clusterDescriptorExists: true,
- m: 'Within another controller, nothing to store',
- e: {
- setDBPropertyCalled: false
- }
- }
- ];
-
- cases.forEach(function(test) {
- describe(test.m, function () {
-
- beforeEach(function () {
- controller.get('wizardController').set('name', test.wizardController);
- this.loadClusterDescriptorStub.returns(test.clusterDescriptorExists ?
- $.Deferred().resolve().promise() :
- $.Deferred().reject().promise());
- controller.getDescriptorConfigs();
- });
-
- if (test.e.setDBPropertyCalled) {
- it('setDBProperty is called with valid arguments', function () {
- expect(controller.get('wizardController').setDBProperty.args[0]).to.be.eql(test.e.setDBPropertyCalledWith);
- });
- }
- else {
- it('setDBProperty is not called', function () {
- expect(controller.get('wizardController').setDBProperty.called).to.be.false;
- });
- }
- });
- })
- });
- });
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7cde0c7/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js b/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js
index fd6f217..e923144 100644
--- a/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js
+++ b/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js
@@ -18,7 +18,7 @@
var App = require('app');
var stackDescriptorData = require('test/mock_data_setup/stack_descriptors');
-var stackDescriptor = stackDescriptorData.artifact_data;
+var stackDescriptor = stackDescriptorData.KerberosDescriptor.kerberos_descriptor;
require('mixins/wizard/addSecurityConfigs');
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7cde0c7/ambari-web/test/mock_data_setup/stack_descriptors.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mock_data_setup/stack_descriptors.js b/ambari-web/test/mock_data_setup/stack_descriptors.js
index 7e399ef..c9444b4 100644
--- a/ambari-web/test/mock_data_setup/stack_descriptors.js
+++ b/ambari-web/test/mock_data_setup/stack_descriptors.js
@@ -22,319 +22,321 @@ module.exports = {
"stack_name": "HDP",
"stack_version": "2.2"
},
- "artifact_data": {
- "properties": {
- "realm": "${cluster-env/kerberos_domain}",
- "keytab_dir": "/etc/security/keytabs"
- },
- "identities": [
- {
- "principal": {
- "value": "HTTP/_HOST@${realm}",
- "configuration": null
- },
- "name": "spnego",
- "keytab": {
- "file": "${keytab_dir}/spnego.service.keytab",
- "owner": {
- "name": "root",
- "access": "r"
+ "KerberosDescriptor": {
+ "kerberos_descriptor": {
+ "properties": {
+ "realm": "${cluster-env/kerberos_domain}",
+ "keytab_dir": "/etc/security/keytabs"
+ },
+ "identities": [
+ {
+ "principal": {
+ "value": "HTTP/_HOST@${realm}",
+ "configuration": null
},
- "configuration": null,
- "group": {
- "name": "${hadoop-env/user_group}",
- "access": "r"
+ "name": "spnego",
+ "keytab": {
+ "file": "${keytab_dir}/spnego.service.keytab",
+ "owner": {
+ "name": "root",
+ "access": "r"
+ },
+ "configuration": null,
+ "group": {
+ "name": "${hadoop-env/user_group}",
+ "access": "r"
+ }
}
- }
- },
- {
- "principal": {
- "value": "hdfs@${realm}",
- "configuration": "cluster-env/hdfs_principal_name"
},
- "name": "hdfs",
- "keytab": {
- "file": "${keytab_dir}/hdfs.headless.keytab",
- "owner": {
- "name": "root",
- "access": "r"
+ {
+ "principal": {
+ "value": "hdfs@${realm}",
+ "configuration": "cluster-env/hdfs_principal_name"
},
- "configuration": "hadoop-env/hdfs_user_keytab",
- "group": {
- "name": "${cluster-env/user_group}",
- "access": "r"
+ "name": "hdfs",
+ "keytab": {
+ "file": "${keytab_dir}/hdfs.headless.keytab",
+ "owner": {
+ "name": "root",
+ "access": "r"
+ },
+ "configuration": "hadoop-env/hdfs_user_keytab",
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": "r"
+ }
}
- }
- },
- {
- "principal": {
- "value": "hbase@${realm}",
- "configuration": "hbase-env/hbase_principal_name"
},
- "name": "hbase",
- "keytab": {
- "file": "${keytab_dir}/hbase.headless.keytab",
- "owner": {
- "name": "root",
- "access": "r"
+ {
+ "principal": {
+ "value": "hbase@${realm}",
+ "configuration": "hbase-env/hbase_principal_name"
},
- "configuration": "hbase-env/hbase_user_keytab",
- "group": {
- "name": "${cluster-env/user_group}",
- "access": "r"
+ "name": "hbase",
+ "keytab": {
+ "file": "${keytab_dir}/hbase.headless.keytab",
+ "owner": {
+ "name": "root",
+ "access": "r"
+ },
+ "configuration": "hbase-env/hbase_user_keytab",
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": "r"
+ }
}
- }
- },
- {
- "principal": {
- "value": "ambari-qa@${realm}",
- "configuration": "cluster-env/smokeuser_principal_name"
},
- "name": "smokeuser",
- "keytab": {
- "file": "${keytab_dir}/smokeuser.headless.keytab",
- "owner": {
- "name": "root",
- "access": "r"
+ {
+ "principal": {
+ "value": "ambari-qa@${realm}",
+ "configuration": "cluster-env/smokeuser_principal_name"
},
- "configuration": "cluster-env/smokeuser_keytab",
- "group": {
- "name": "${cluster-env/user_group}",
- "access": "r"
+ "name": "smokeuser",
+ "keytab": {
+ "file": "${keytab_dir}/smokeuser.headless.keytab",
+ "owner": {
+ "name": "root",
+ "access": "r"
+ },
+ "configuration": "cluster-env/smokeuser_keytab",
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": "r"
+ }
}
}
- }
- ],
- "configurations": [
- {
- "core-site": {
- "hadoop.security.authentication": "kerberos",
- "hadoop.rpc.protection": "authentication; integrity; privacy",
- "hadoop.security.authorization": "true"
+ ],
+ "configurations": [
+ {
+ "core-site": {
+ "hadoop.security.authentication": "kerberos",
+ "hadoop.rpc.protection": "authentication; integrity; privacy",
+ "hadoop.security.authorization": "true"
+ }
}
- }
- ],
- "services": [
- {
- "name": "HDFS",
- "components": [
- {
- "name": "NAMENODE",
- "identities": [
- {
- "name": "namenode_nn",
- "principal": {
- "value": "nn/_HOST@${realm}",
- "configuration": "hdfs-site/dfs.namenode.kerberos.principal"
- },
- "keytab": {
- "file": "${keytab_dir}/nn.service.keytab",
- "owner": {
- "name": "${hadoop-env/hdfs_user}",
- "access": "r"
+ ],
+ "services": [
+ {
+ "name": "HDFS",
+ "components": [
+ {
+ "name": "NAMENODE",
+ "identities": [
+ {
+ "name": "namenode_nn",
+ "principal": {
+ "value": "nn/_HOST@${realm}",
+ "configuration": "hdfs-site/dfs.namenode.kerberos.principal"
},
- "group": {
- "name": "${cluster-env/user_group}",
- "access": ""
- },
- "configuration": "hdfs-site/dfs.namenode.keytab.file"
- }
- },
- {
- "name": "namenode_host",
- "principal": {
- "value": "host/_HOST@${realm}",
- "configuration": "hdfs-site/dfs.namenode.kerberos.https.principal"
+ "keytab": {
+ "file": "${keytab_dir}/nn.service.keytab",
+ "owner": {
+ "name": "${hadoop-env/hdfs_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ },
+ "configuration": "hdfs-site/dfs.namenode.keytab.file"
+ }
},
- "keytab": {
- "file": "${keytab_dir}/host.keytab",
- "owner": {
- "name": "${hadoop-env/hdfs_user}",
- "access": "r"
- },
- "group": {
- "name": "${cluster-env/user_group}",
- "access": ""
+ {
+ "name": "namenode_host",
+ "principal": {
+ "value": "host/_HOST@${realm}",
+ "configuration": "hdfs-site/dfs.namenode.kerberos.https.principal"
},
- "configuration": "hdfs-site/dfs.namenode.keytab.file"
- }
- },
- {
- "name": "/spnego",
- "principal": {
- "configuration": "hdfs-site/dfs.web.authentication.kerberos.principal"
- },
- "keytab": {
- "configuration": "hdfs/dfs.web.authentication.kerberos.keytab"
- }
- }
- ]
- },
- {
- "name": "DATANODE",
- "identities": [
- {
- "name": "datanode_dn",
- "principal": {
- "value": "dn/_HOST@${realm}",
- "configuration": "hdfs-site/dfs.namenode.kerberos.principal"
+ "keytab": {
+ "file": "${keytab_dir}/host.keytab",
+ "owner": {
+ "name": "${hadoop-env/hdfs_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ },
+ "configuration": "hdfs-site/dfs.namenode.keytab.file"
+ }
},
- "keytab": {
- "file": "${keytab_dir}/dn.service.keytab",
- "owner": {
- "name": "${hadoop-env/hdfs_user}",
- "access": "r"
- },
- "group": {
- "name": "${cluster-env/user_group}",
- "access": ""
+ {
+ "name": "/spnego",
+ "principal": {
+ "configuration": "hdfs-site/dfs.web.authentication.kerberos.principal"
},
- "configuration": "hdfs-site/dfs.namenode.keytab.file"
+ "keytab": {
+ "configuration": "hdfs/dfs.web.authentication.kerberos.keytab"
+ }
}
- },
- {
- "name": "datanode_host",
- "principal": {
- "value": "host/_HOST@${realm}",
- "configuration": "hdfs-site/dfs.datanode.kerberos.https.principal"
- },
- "keytab": {
- "file": "${keytab_dir}/host.keytab.file",
- "owner": {
- "name": "${hadoop-env/hdfs_user}",
- "access": "r"
- },
- "group": {
- "name": "${cluster-env/user_group}",
- "access": ""
+ ]
+ },
+ {
+ "name": "DATANODE",
+ "identities": [
+ {
+ "name": "datanode_dn",
+ "principal": {
+ "value": "dn/_HOST@${realm}",
+ "configuration": "hdfs-site/dfs.namenode.kerberos.principal"
},
- "configuration": "hdfs-site/dfs.namenode.secondary.keytab.file"
- }
- }
- ]
- },
- {
- "name": "SECONDARY_NAMENODE",
- "identities": [
- {
- "name": "secondary_namenode_nn",
- "principal": {
- "value": "nn/_HOST@${realm}",
- "configuration": "hdfs-site/dfs.namenode.secondary.kerberos.principal"
+ "keytab": {
+ "file": "${keytab_dir}/dn.service.keytab",
+ "owner": {
+ "name": "${hadoop-env/hdfs_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ },
+ "configuration": "hdfs-site/dfs.namenode.keytab.file"
+ }
},
- "keytab": {
- "file": "${keytab_dir}/snn.service.keytab",
- "owner": {
- "name": "${hadoop-env/hdfs_user}",
- "access": "r"
+ {
+ "name": "datanode_host",
+ "principal": {
+ "value": "host/_HOST@${realm}",
+ "configuration": "hdfs-site/dfs.datanode.kerberos.https.principal"
},
- "group": {
- "name": "${cluster-env/user_group}",
- "access": ""
- },
- "configuration": "hdfs-site/dfs.namenode.secondary.keytab.file"
+ "keytab": {
+ "file": "${keytab_dir}/host.keytab.file",
+ "owner": {
+ "name": "${hadoop-env/hdfs_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ },
+ "configuration": "hdfs-site/dfs.namenode.secondary.keytab.file"
+ }
}
- },
- {
- "name": "secondary_namenode_host",
- "principal": {
- "value": "host/_HOST@${realm}",
- "configuration": "hdfs-site/dfs.namenode.secondary.kerberos.https.principal"
- },
- "keytab": {
- "file": "${keytab_dir}/host.keytab.file",
- "owner": {
- "name": "${hadoop-env/hdfs_user}",
- "access": "r"
+ ]
+ },
+ {
+ "name": "SECONDARY_NAMENODE",
+ "identities": [
+ {
+ "name": "secondary_namenode_nn",
+ "principal": {
+ "value": "nn/_HOST@${realm}",
+ "configuration": "hdfs-site/dfs.namenode.secondary.kerberos.principal"
},
- "group": {
- "name": "${cluster-env/user_group}",
- "access": ""
+ "keytab": {
+ "file": "${keytab_dir}/snn.service.keytab",
+ "owner": {
+ "name": "${hadoop-env/hdfs_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ },
+ "configuration": "hdfs-site/dfs.namenode.secondary.keytab.file"
+ }
+ },
+ {
+ "name": "secondary_namenode_host",
+ "principal": {
+ "value": "host/_HOST@${realm}",
+ "configuration": "hdfs-site/dfs.namenode.secondary.kerberos.https.principal"
},
- "configuration": "hdfs-site/dfs.namenode.secondary.keytab.file"
- }
- },
- {
- "name": "/spnego",
- "principal": {
- "configuration": "hdfs-site/dfs.web.authentication.kerberos.principal"
+ "keytab": {
+ "file": "${keytab_dir}/host.keytab.file",
+ "owner": {
+ "name": "${hadoop-env/hdfs_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ },
+ "configuration": "hdfs-site/dfs.namenode.secondary.keytab.file"
+ }
},
- "keytab": {
- "configuration": "hdfs/dfs.web.authentication.kerberos.keytab"
+ {
+ "name": "/spnego",
+ "principal": {
+ "configuration": "hdfs-site/dfs.web.authentication.kerberos.principal"
+ },
+ "keytab": {
+ "configuration": "hdfs/dfs.web.authentication.kerberos.keytab"
+ }
}
+ ]
+ }
+ ]
+ },
+ {
+ "name": "FALCON",
+ "identities": [
+ {
+ "name": "/spnego"
+ },
+ {
+ "name": "/smokeuser"
+ },
+ {
+ "name": "/hdfs"
+ }
+ ],
+ "configurations": [
+ {
+ "falcon-startup.properties": {
+ "*.falcon.http.authentication.type": "kerberos",
+ "*.falcon.authentication.type": "kerberos",
+ "*.dfs.namenode.kerberos.principal": "nn/_HOST@${realm}"
}
- ]
- }
- ]
- },
- {
- "name": "FALCON",
- "identities": [
- {
- "name": "/spnego"
- },
- {
- "name": "/smokeuser"
- },
- {
- "name": "/hdfs"
- }
- ],
- "configurations": [
- {
- "falcon-startup.properties": {
- "*.falcon.http.authentication.type": "kerberos",
- "*.falcon.authentication.type": "kerberos",
- "*.dfs.namenode.kerberos.principal": "nn/_HOST@${realm}"
}
- }
- ],
- "components": [
- {
- "name": "FALCON_SERVER",
- "identities": [
- {
- "principal": {
- "value": "falcon/${host}@${realm}",
- "configuration": "falcon-startup.properties/*.falcon.service.authentication.kerberos.principal"
- },
- "name": "falcon_server",
- "keytab": {
- "file": "${keytab_dir}/falcon.service.keytab",
- "owner": {
- "name": "${falcon-env/falcon_user}",
- "access": "r"
+ ],
+ "components": [
+ {
+ "name": "FALCON_SERVER",
+ "identities": [
+ {
+ "principal": {
+ "value": "falcon/${host}@${realm}",
+ "configuration": "falcon-startup.properties/*.falcon.service.authentication.kerberos.principal"
},
- "configuration": "falcon-startup.properties/*.falcon.service.authentication.kerberos.keytab",
- "group": {
- "name": "${cluster-env/user_group}",
- "access": ""
+ "name": "falcon_server",
+ "keytab": {
+ "file": "${keytab_dir}/falcon.service.keytab",
+ "owner": {
+ "name": "${falcon-env/falcon_user}",
+ "access": "r"
+ },
+ "configuration": "falcon-startup.properties/*.falcon.service.authentication.kerberos.keytab",
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ }
}
- }
- },
- {
- "principal": {
- "value": "HTTP/${host}@${realm}",
- "configuration": "falcon-startup.properties/oozie.authentication.kerberos.principal"
},
- "name": "/spnego",
- "keytab": {
- "file": null,
- "owner": {
- "name": null,
- "access": null
+ {
+ "principal": {
+ "value": "HTTP/${host}@${realm}",
+ "configuration": "falcon-startup.properties/oozie.authentication.kerberos.principal"
},
- "configuration": "falcon-startup.properties/oozie.authentication.kerberos.keytab",
- "group": {
- "name": null,
- "access": null
+ "name": "/spnego",
+ "keytab": {
+ "file": null,
+ "owner": {
+ "name": null,
+ "access": null
+ },
+ "configuration": "falcon-startup.properties/oozie.authentication.kerberos.keytab",
+ "group": {
+ "name": null,
+ "access": null
+ }
}
}
- }
- ]
- }
- ]
- }
- ]
+ ]
+ }
+ ]
+ }
+ ]
+ }
}
};
[2/2] ambari git commit: AMBARI-15456. Manual Kerberos: JS error on
clicking next button of "Configure Identities page" on Add Service wizard
(alexantonenko)
Posted by al...@apache.org.
AMBARI-15456. Manual Kerberos: JS error on clicking next button of "Configure Identities page" on Add Service wizard (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cb3d49bb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cb3d49bb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cb3d49bb
Branch: refs/heads/trunk
Commit: cb3d49bb456e3a7ff81c18d1a03635c185273ee0
Parents: dcb4ed8
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Mar 17 11:20:19 2016 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Thu Mar 17 14:07:45 2016 +0200
----------------------------------------------------------------------
ambari-web/app/routes/add_service_routes.js | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/cb3d49bb/ambari-web/app/routes/add_service_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js
index 00e7c82..d95943d 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -287,6 +287,7 @@ module.exports = App.WizardRoute.extend({
next: function (router) {
if (App.Cluster.find().objectAt(0).get('isKerberosEnabled')) {
if (router.get('mainAdminKerberosController.isManualKerberos')) {
+ router.get('wizardStep8Controller').set('wizardController', router.get('addServiceController'));
router.get('wizardStep8Controller').updateKerberosDescriptor(true);
}
router.get('addServiceController').cacheStepConfigValues(router.get('kerberosWizardStep4Controller'));