security - How to make the safest Websocket Authentication -
i have seen question answered few times, have specific problem it.
i making game, html5 programm talking c++ programm on server side. game include matches valuable prices , therefore low latency between client , server security should high priority.
and leads question: safe enough authenticate websocket session (tls encrypted) single time when started or should send sessionid every message send form client server?
this question opinion based, , not apply nature of questions of stackoverflow.
here opinion:
websockets protocol implemented on top of tcp network layer protocol connection based. means connection established , persisted until closed client or server. interceptions in between unlikely possible.
after tcp connection established websockets send http headers client, other http request do, not close connection, , wait response server, if "fine" header approving http protocol upgrade websockets communication. since websockets valid used on client , server side communication. since tcp connects persistent connection. sending session every request - pointless, sent once connection established.
so no, not idea send session details on every message pointless. better make sure restoring session secure process, , obtaining cookies of client - not allow connect user.
Comments
Post a Comment