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

Tobin commented on METRON-2024:
-------------------------------

Hi,

echo -n 'password' > password.txt

is how I did it.

I’ve tested in the REPL and had exactly the same issue.

Experiments with REST_GET indicates that it works as expected until I try to 
use Basic Auth. I’ve tried it using the global Basic Auth settings and passing 
a config object to REST_GET.

Unfortunately, I’m in a restricted environment and don’t have a dev environment 
with which to point a debugger at the thing.

My use case was developing and deploying enrichments via Zepplin. I’ve worked 
around this issue for now by deploying via curl in a %sh paragraph.

Cheers,
Tobin

From: Ryan Merriman (JIRA) <[email protected]>
Sent: 05 March 2019 14:22
To: Landricombe, Tobin <[email protected]>
Subject: [jira] [Commented] (METRON-2024) REST_GET function ignoring Basic Auth 
settings


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

Ryan Merriman commented on METRON-2024:
---------------------------------------

I think there could be 2 potential issues here.  First I'm not sure that the 
Stellar interpreter in Zeppelin is setup correctly for HDFS.  I would suggest 
testing with the REPL first to ensure things are working correctly.  The 
Stellar REST_GET function reads a password from HDFS and it's easy for a 
newline character to sneak into that HDFS file.  Unix commands like `echo` and 
`vi` automatically add them.  The correct way to create a password file is like 
this:


{code:java}
echo -n 'password' > password.txt
hdfs dfs -put password.txt /apps/metron
{code}
If it's working in the REPL and not in Zeppelin, then it's likely the Hadoop 
config isn't set on the classpath correctly.










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

________________________________________
Roke Manor Research Limited, Romsey, Hampshire, SO51 0ZN, United Kingdom.Part 
of the Chemring Group. 
Registered in England & Wales. Registered No: 00267550
http://www.roke.co.uk
_______________________________________
The information contained in this e-mail and any attachments is proprietary to 
Roke Manor Research Limited and 
must not be passed to any third party without permission. This communication is 
for information only and shall 
not create or change any contractual relationship.
________________________________________


> REST_GET function ignoring Basic Auth settings
> ----------------------------------------------
>
>                 Key: METRON-2024
>                 URL: https://issues.apache.org/jira/browse/METRON-2024
>             Project: Metron
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Tobin
>            Priority: Major
>
> In Zeppelin:
> %stellar
> swagger_conf := \{ "basic.auth.user": "admin", "basic.auth.password.path": 
> "/user/zeppelin/swagger_pass" }
> REST_GET("http://metron.node:8082/api/v1/sensor/enrichment/config/bro";, 
> swagger_conf)
> It returns with no response and no error.
>  
> Zeppelin logs show the normal "status 401" and "unauthorized" messages from 
> Swagger.
> tcpdump shows no "Authorization" header in the request.
>  
> I can't find anything else in the zeppelin, metron-rest, etc logs.



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

Reply via email to