metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From justinleet <...@git.apache.org>
Subject [GitHub] incubator-metron pull request #518: METRON-799: The MPack should function in...
Date Fri, 07 Apr 2017 15:15:35 GMT
Github user justinleet commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/518#discussion_r110413918
  
    --- 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 --
    
    Yeah, you're right, you should be able to change it via HA.  I just meant I can't go and
change it to something in full dev.
    
    Re: the AutoTGT stuff
    I'm unsure if HA Storm would be an issue, but assuming Storm handles spinning up secure
nimbuses correctly it shouldn't be.  New nimbuses are required to make sure they get all code
of active topologies.  I would assume this includes getting any TGTs (although I haven't verified
this) to ensure that active topologies can continue to run.  We'd need to test on an actual
HA cluster.
    
    I disagree with AutoHDFS/AutoHBase being less complex, because if I recall correctly (and
I don't, please correct me), that solution required setting up symlinks on each Storm node.
 I don't even know that we easily have that capability in Ambari as the Metron service. Even
if we do work around that, I don't see AutoTGT as complicated, and the Storm docs mention
"On a kerberos secure cluster they should be set by default to point to org.apache.storm.security.auth.kerberos.AutoTGT."
 It seems reasonable to go with Storm's recommendation unless we have a compelling reason
not to.
    
    The custom storm.yaml only contains 3 configs that we need to run
    1. Nimbus seeds (gathered from Storm configs themselves)
    2. Jaas file
    3. Thrift protocol (which admittedly doesn't grab correctly from Storm, but is essentially
a constant for the purpose of Kerberos).
    
    Of these, only the jaas file really matters for management, and all it does it define
named stanzas and it's not anything particularly complicated.
    
    Having said that, the Storm service check could make AutoTGT a lot less attractive if
it's not easily workable.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message