Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

NiFi: How to pass basic authentication header while connecting to secured websocket

Highlighted

NiFi: How to pass basic authentication header while connecting to secured websocket

client.txtI need to connect to a secure websocket wss://...... I am able to connect to the socket using java client. I pass username and password as Basic Authorization in the header.

  1. headers.put("Authorization", Arrays.asList("Basic " + new BASE64Encoder().encode(credentials.getBytes())));

Attached the full java code.

In NiFi I followed the article

https://community.hortonworks.com/articles/68378/nifi-websocket-support.html

and started using connectWebSocket processor but looks like I should be using java keystore or trust store which I don't have.

How can I pass the header while connecting to the websocket api.

Please guide.

5 REPLIES 5
Highlighted

Re: NiFi: How to pass basic authentication header while connecting to secured websocket

I am new to NiFi, can some one comment if this is some thing I shouldn't be doing in NiFi

Highlighted

Re: NiFi: How to pass basic authentication header while connecting to secured websocket

New Contributor

Hi @Balakrishna Dhanekula

Were you able to find a solution to this issue yet?

I'm also trying to use the ConnectWebSocket processor with a basic header, but I'm having the same problem as you.

I asked a question in the forum before seeing yours (

https://community.hortonworks.com/questions/157914/nifi-connectwebsocket-processor-failing-how-to-ad...)

Highlighted

Re: NiFi: How to pass basic authentication header while connecting to secured websocket

I didn't receive any support on this issue.

Highlighted

Re: NiFi: How to pass basic authentication header while connecting to secured websocket

New Contributor

okay, so you decided not to use Nifi for you websocket client?

Re: NiFi: How to pass basic authentication header while connecting to secured websocket

New Contributor

Hi. There seems to be some development going on concerning this topic:

https://issues.apache.org/jira/browse/NIFI-5114

Regards,

FW

Don't have an account?
Coming from Hortonworks? Activate your account here