[ 
https://issues.apache.org/jira/browse/METRON-1389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16327042#comment-16327042
 ] 

ASF GitHub Bot commented on METRON-1389:
----------------------------------------

Github user anandsubbu commented on a diff in the pull request:

    https://github.com/apache/metron/pull/888#discussion_r161735380
  
    --- 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 --
    
    Hi @cestella and @ottobackwards - I found a way to get the Shiro INI 
content from Ambari and parse the admin credentials. Please have a look at my 
latest commit.


> Zeppelin notebook import does not work with Ambari 2.6
> ------------------------------------------------------
>
>                 Key: METRON-1389
>                 URL: https://issues.apache.org/jira/browse/METRON-1389
>             Project: Metron
>          Issue Type: Bug
>    Affects Versions: 0.4.2
>            Reporter: Anand Subramanian
>            Assignee: Anand Subramanian
>            Priority: Major
>             Fix For: Next + 1
>
>
> This issue is seen with Ambari 2.6.0.0.
> Doing 'Metron -> Service Actions -> Zeppelin Notebook Import' shows that the 
> notebooks have been imported, but when I go to the Zeppelin dashboard, I 
> cannot find any of the notebooks.
> In recent versions of Ambari, [Shiro 
> Authentication|https://zeppelin.apache.org/docs/0.6.0/security/shiroauthentication.html]
>  is enabled which requires a user/password authentication in order to 
> interact with Zeppelin. We need to incorporate this in order to be able to 
> import metron Zeppelin notebooks.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to