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

allow frontend to be served statically #49

Merged
merged 7 commits into from Aug 6, 2021
Merged

Conversation

cs01
Copy link
Owner

@cs01 cs01 commented Jun 3, 2021

This implements a static frontend as suggested in #36.

background

Currently, the browser contains decrypted data and the encryption key. If the browser's JavaScript were modified to be malicious and a malicious server were created, it would be hard to detect.

this pr

This PR allows the backend to accept cross origin requests, and the frontend to be served statically on GitHub pages, Vercel, or a local static server, which can be manually built. The static page still routes the terminal traffic through a (potentially) untrusted server, but that is okay since the traffic is encrypted before going over the wire.

Changes

  • Accept cross origin requests on backend
  • Create script to publish built frontend to https://cs01.github.io/termpair/connect/
  • Make UI to define url of TermPair server where encrypted terminal data should be sent via websocket
  • Also added UI to let regular server specify Terminal ID on the landing page instead of requiring it in the URL
  • Update docs

@cs01 cs01 marked this pull request as draft June 3, 2021 06:04
@ignoramous
Copy link

Thanks. Add a CSP attribute to the script tag so that in-browser plugins / MiTM access-points don't interfere with the JavaScript loaded by the static html-page served from a audit-able / trusted endpoint.

The static page still routes the terminal traffic through a (potentially) untrusted server, but that is okay since the traffic is encrypted before going over the wire.

As mentioned in #36, the server can still store the cipher text forever, which enables all sorts of correlation attacks as it bides its time for quantum computers to go main stream and decrypt it all (:

@cs01
Copy link
Owner Author

cs01 commented Jul 26, 2021

I haven’t merged this PR yet because it requires updates to the UI. I have been doing lots of refactoring in the UI, so I will pick this up when the UI refactors are done.

@cs01 cs01 marked this pull request as ready for review August 4, 2021 04:22
@cs01
Copy link
Owner Author

cs01 commented Aug 4, 2021

This is ready for review if you want. It's a pretty big PR. It prettymuch implements what we talked about.

Copy link

@ignoramous ignoramous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! (:

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@cs01 cs01 merged commit 084a598 into master Aug 6, 2021
@cs01 cs01 deleted the cs01/standalone-frontend branch August 6, 2021 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants