Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGELOG.mdSummary of changes
In recent PR #70, termpair was changed so that the only info someone needed to connect via a browser was the terminal ID, not the AES key as before. It used public key encryption to securely obtain the AES keys. The terminal ID is 128 bits, so it would be extremely difficult for someone to guess a terminal id. While no plaintext data is exposed to the server, the id is known by the server, which makes for a trivial attack vector (log the terminal id being issued, and go to the corresponding url to obtain the keys). This scheme was never published to PyPI, only the master branch of this repo.
This PR removes the public key encryption and replaces it with a third AES key: a "bootstrap" key for the other two. This third key is provided via the url hash as before, so the terminal id is not sufficient to gain access to the session. Upon initial websocket connection, the broadcasting terminal encrypts the other two AES keys with the bootstrap key before sending over the wire.
In addition to embedding in the URL, users can also enter the base-64 encoded key via an input in the webpage.
Test plan
Tested by running
(note the new
Secret encryption key)fyi @colmmacc @ignoramous