Skip to content
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

client can spoof its username #10

Open
rcmiller opened this issue Feb 23, 2020 · 0 comments
Open

client can spoof its username #10

rcmiller opened this issue Feb 23, 2020 · 0 comments
Labels

Comments

@rcmiller
Copy link
Member

The server trusts client's initial SYNC message to have the right username, which it shouldn't.

Better design would be for server to look at the signed session cookie of the incoming websocket connection, which should have been set up by the openid interaction. But SockJS doesn't give access to the cookies (https://github.com/sockjs/sockjs-node#various-issues-and-design-considerations).

Solutions:

  • pass the signed session cookie with SYNC, instead of the username
  • stop using SockJS and do our own lower-level websocket stuff, adapted from cswac. Would have the benefit that the cswac code already has automatic reconnection with backoff and retry, which SockJS doesn't have by default (see client websocket doesn't reconnect if server restarts #7).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants