Support Questions

Find answers, ask questions, and share your expertise

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

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.


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

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 (

I didn't receive any support on this issue.

New Contributor

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

New Contributor

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