Skip to content

Secure WebSocket connection on authentication with Http cookies #591

@Aschen

Description

@Aschen

Feature Description

When using the WebSocket protocol with the SDK, the login action will be sent through HTTP with the secured way described below.

Once the cookie is set in the browser, the SDK can start the WebSocket handshake (which is through HTTP so the cookie will be sent) so Kuzzle have to handle the cookie sent during this handshake to authenticate the connection for the duration of the token.
The token is not needed in the subsequent request since Kuzzle already authenticate the websocket connection.

⚠️ This is not enough to protect WebSocket against CSRF https://christian-schneider.net/CrossSiteWebSocketHijacking.html

image

See also:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions