[
https://issues.apache.org/jira/browse/METRON-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15960929#comment-15960929
]
ASF GitHub Bot commented on METRON-799:
---------------------------------------
Github user justinleet commented on a diff in the pull request:
https://github.com/apache/incubator-metron/pull/518#discussion_r110411025
--- Diff:
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/metron_security.py
---
@@ -0,0 +1,74 @@
+"""
+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.
+"""
+
+import os.path
+from resource_management.core.source import Template
+from resource_management.core.resources.system import Directory, File
+from resource_management.core import global_lock
+from resource_management.core.logger import Logger
+from resource_management.core.resources.system import Execute
+from resource_management.libraries.functions import format as ambari_format
+
+
+# Convenience function for ensuring home dirs are setup consistently.
+def storm_security_setup(params):
+ if params.security_enabled:
+ # I don't think there's an Ambari way to get a user's local home
dir , so have Python perform tilde expansion.
+ # Ambari's Directory doesn't do tilde expansion.
+ metron_storm_dir_tilde = '~' + params.metron_user + '/.storm'
+ metron_storm_dir = os.path.expanduser(metron_storm_dir_tilde)
+ Directory(metron_storm_dir,
+ mode=0755,
+ owner=params.metron_user,
+ group=params.metron_group
+ )
+
+ File(ambari_format('{client_jaas_path}'),
+ content=Template('client_jaas.conf.j2'),
+ owner=params.metron_user,
+ group=params.metron_group,
+ mode=0755
+ )
+
+ File(metron_storm_dir + '/storm.yaml',
+ content=Template('storm.yaml.j2'),
+ owner=params.metron_user,
+ group=params.metron_group,
+ mode=0755
+ )
+
--- End diff --
It's not possible to change it via Ambari, but it will populate the
variable appropriately. There's some translation magic happening somewhere,
because Ambari lists the value of nimbus.seeds as 'node1', but it actually
passes it down as a list (which is why the new commit doesn't surround it with
square brackets). I'm guessing this magic is also why the thrift config doesn't
get passed.
> The MPack should function in a kerberized cluster
> -------------------------------------------------
>
> Key: METRON-799
> URL: https://issues.apache.org/jira/browse/METRON-799
> Project: Metron
> Issue Type: Improvement
> Reporter: Casey Stella
> Assignee: Justin Leet
> Labels: kerberos
>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)