Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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

avatar
Contributor

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

avatar
Contributor

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

avatar

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...)

avatar
Contributor

I didn't receive any support on this issue.

avatar

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

avatar
New Contributor

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

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

Regards,

FW