metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ottobackwards <...@git.apache.org>
Subject [GitHub] metron pull request #888: METRON-1389: Zeppelin notebook import does not wor...
Date Fri, 12 Jan 2018 14:49:26 GMT
Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/metron/pull/888#discussion_r161240092
  
    --- Diff: metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py
---
    @@ -150,12 +151,36 @@ def zeppelin_notebook_import(self, env):
             env.set_params(params)
     
             Logger.info(ambari_format('Searching for Zeppelin Notebooks in {metron_config_zeppelin_path}'))
    +
    +        # With Ambari 2.5+, Zeppelin server is enabled to work with Shiro authentication,
which requires user/password
    +        # for authentication (see https://zeppelin.apache.org/docs/0.6.0/security/shiroauthentication.html
for details).
    +        ses = requests.session()
    +
    +        # Check if authentication is enabled on the Zeppelin server
    +        try:
    +            conn = ses.get(ambari_format('http://{zeppelin_server_url}/api/login'))
    +
    +            # Establish connection if authentication is enabled
    +            try:
    +                # The following credentials are created at install time by Ambari at
/etc/zeppelin/conf/shiro.ini
    +                # when Shiro auth is enabled on the Zeppelin server
    +                zeppelin_payload = {'userName': 'admin', 'password' : 'admin'}
    --- End diff --
    
    Why wouldn't we expose this through the ambari configuration?


---

Mime
View raw message