-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebSocket transport progress #3581
Comments
I have question regarding the websocket transport design. Some websocket servers require a client to send a binary payload to subscribe to a channel or create an authenticated session. This payload is application specific and must be provided by the user. Moreover, since this payload might contain a nonce, it might change every time it is needed (so it can't be simply cached). If restarting the websocket is done behind the curtain by zeromq (like for the other transports), there should be a way for the socket to get this user provided payload (or payloads) every time the socket is restarted. Maybe a function pointer would do the trick? |
My plan is to use the mechanism framework for that, initially I will support the plain mechanism which include a user and a password. Later I plan to add bearer mechanism. With mechanism each message include metadata of the sender. And you authenticate each new client using the ZAP protocol. |
I'm not following. Authentication on websockets is kind of the wild west. Each API as its own way of authenticating. How could ZAP be adapted for these abitrary mechanism? |
The websocket transport is not general. It is specific to zeromq, for example the more flag is encoded as the first byte of every message. I'm working on the javascript side of it, it will be ready in few days. So only a client that will implement the ZWS protocol (which is not documented yet) will be able to communicate with zeromq on top of the websocket transport. As part of the protocol NULL & Plain mechanism are going to be used and later bearer mechanism. |
Gotcha, I though it was more a general purpose transport. If you also control the remote websocket it makes sense to use ZAP. |
Any news? |
I will push to github the pure javascript library today. |
Javascript zeromq port that can communicate with libzmq over WS transport:https://github.com/somdoron/jszmq |
First draft of the protocol is ready: |
WebSocket over TLS (WSS) is implemented #3695 |
CURVE and PLAIN mechanisms now work with WS and WSS transports. |
There are no tests for a websocket |
Yes. The close workflow is implemented, so testing should be feasible. |
I just noticed that yesterday, when I extended the test coverage job to include some more transports. I have however not seen a way to produce a close message from the libzmq code, I just found code that reacts to receiving such a message, so I wondered how that could be tested :) |
I guess we should implement initiation of the close handshake as well? We can do so on the unplug method and delay the termination a bit (with a timeout timer). |
The close handshake from the rfc: I've also added this as a checkbox item to the above list |
Hi, Is there any example for wss libzmq transport in python please. It will be great. I was struggle for more than 1 week for secure websocket |
The text was updated successfully, but these errors were encountered: