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

make the raw http express server secure #2031

Open
williamstein opened this issue May 31, 2017 · 0 comments
Open

make the raw http express server secure #2031

williamstein opened this issue May 31, 2017 · 0 comments

Comments

@williamstein
Copy link
Contributor

The reason there is a scary warning message at https://github.com/sagemathinc/cocalc/blob/master/src/dev/docker/README.md
is because one can use the raw http server from one project to access any other project (whose project_id you know), since it listens on localhost. You have to scan through all ports of course, but that's not too hard. This isn't a problem for production, since in prod the raw server does not listen on localhost at all.

We should fix this by changing the raw server to secure, even in docker. That would also be generally better, since it improves security in production as well (providing two layers instead of one).

Ideas:

  • Add the local_hub's secret token to the base_url that the raw server uses. Then the raw server is useless to anybody who connects to it if they don't also know that secret token. The proxy server would then modify the incoming client urls by adding that token, so all client url's would still be the same.
  • Have the proxy server add an extra auth header to all requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant