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: Custom WebSocket authentication protocol

Nifi: Custom WebSocket authentication protocol

Explorer

I try to connect to a websocket server that has a custom authentication protocol. It goes like this:


1. Client: connect to websocket

2. Server: open connection

2. Client: send challenge request as jsonrpc

3. Server: send jsonrpc containing a token

4. Client: send jsonrpc with user/password (hex sha them with the token)

5. Server: upgrades protocol


Looking at the nifi ConnectWebSocket processor I cannot see a way to implement such authentication. I simply tried to connect to the websocket and got following error:

Failed to process session due to Failed to register processor to WebSocket service due to: java.io.IOException: Failed to connect wss://foobar:443 due to: java.util.concurrent.ExecutionException: org.eclipse.jetty.websocket.api.UpgradeException: 0 null: org.apache.nifi.processor.exception.ProcessException: Failed to register processor to WebSocket service due to: java.io.IOException: Failed to connect wss://foobar:443 due to: java.util.concurrent.ExecutionException: org.eclipse.jetty.websocket.api.UpgradeException: 0 null

Can you give me some directions, how I could implement this protocol? A the moment I am experimenting with the source code of the ConnectWebSocket processor from @kkawamura https://github.com/apache/nifi/tree/master/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-pro...

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