bpanel icon indicating copy to clipboard operation
bpanel copied to clipboard

Websockets over TLS

Open tynes opened this issue 6 years ago • 3 comments

I noticed that running the server over TLS, the websocket connection still attempts to happen over ws instead of wss. The window.protocol is stored in redux, a line of code could probably be added here or so: https://github.com/bpanel-org/bpanel/blob/development/webapp/store/actions/socketActions.js#L9 to fix this

tynes avatar Jan 07 '19 17:01 tynes

I think we'd also need to add support for it on the SocketManager too right?

bucko13 avatar Jan 08 '19 00:01 bucko13

Because the server is currently served on both http and https, we would have to support both ws and wss simultaneously in the SocketManager. Maybe its better to always serve over the same port and one of http or https, so that SocketManager also only has to accept one or the other. There is already configuration for serving over TLS, so the SocketManager could use that value. This would also prevent accidental usage of bpanel over http when it was meant to be over https

tynes avatar Jan 08 '19 16:01 tynes

Yeah, I was thinking the same thing when reviewing the server code recently, probably better to just run one or the other. Avoiding "accidental" unsafe access is definitely a huge added benefit.

bucko13 avatar Jan 08 '19 16:01 bucko13