Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?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" supports_adding_forbidden="true">
<property>
<name>content</name>
<display-name>metron_client_jaas template</display-name>
<description>Metron client JAAS configuration</description>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template that previously lived in client_jaas.conf.j2 is now here. This allows the user to edit the template in Ambari.

<value>
StormClient {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=false
storeKey=false
useTicketCache=true
serviceName="nimbus"
principal="{{metron_principal_name}}";
};
Client {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="{{metron_keytab_path}}"
storeKey=true
useTicketCache=false
serviceName="zookeeper"
principal="{{metron_principal_name}}";
};
KafkaClient {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="{{metron_keytab_path}}"
storeKey=true
useTicketCache=false
serviceName="kafka"
principal="{{metron_principal_name}}";
};
</value>
<value-attributes>
<type>content</type>
<show-property-name>false</show-property-name>
</value-attributes>
<on-ambari-upgrade add="false"/>
</property>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@
<config-type>kafka-broker</config-type>
<config-type>kafka-env</config-type>
<config-type>zeppelin-config</config-type>
<config-type>metron-client-jaas-conf</config-type>
</configuration-dependencies>
<restartRequiredAfterChange>true</restartRequiredAfterChange>
<quickLinksConfigurations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import os.path
from resource_management.core.source import Template
from resource_management.core.source import InlineTemplate
from resource_management.core.resources.system import Directory, File
from resource_management.core import global_lock
from resource_management.core.logger import Logger
Expand Down Expand Up @@ -46,7 +47,7 @@ def storm_security_setup(params):
)

File(ambari_format('{client_jaas_path}'),
content=Template('client_jaas.conf.j2'),
content=InlineTemplate(params.metron_client_jaas_conf_template),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of populating the template from the static .j2 file, the template now comes from the configuration. In MPack parlance, its now using an InlineTemplate.

owner=params.metron_user,
group=params.metron_group,
mode=0755
Expand Down Expand Up @@ -80,4 +81,3 @@ def kinit(kinit_path_local, keytab_path, principal_name, execute_user=None):
Execute(kinitcmd, user=execute_user)
finally:
kinit_lock.release()

Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@
kafka_principal_name = kafka_principal_raw.replace('_HOST', hostname_lowercase)
kafka_keytab_path = config['configurations']['kafka-env']['kafka_keytab']

metron_client_jaas_conf_template = config['configurations']['metron-client-jaas-conf']['content']

nimbus_seeds = config['configurations']['storm-site']['nimbus.seeds']
# Check wether Solr mpack is installed
if 'solr-config-env' in config['configurations']:
Expand Down

This file was deleted.