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

Feat: Ability to configure and use SSL in websocket server #108

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Phixyn
Copy link
Owner

@Phixyn Phixyn commented Jan 26, 2021

Pull Request Submission

Description

Give a short and brief description of the pull request. Add a screenshot if appropriate and helpful. Changes can be listed in the next section.

Introduces SSL to the Python websocket server.

Closes #104.

Changes

List the changes made.

  • Added constants USE_SSL, CERTCHAIN_PATH and KEYFILE_PATH
  • Added conditional to init the server with or without SSL
  • Initialize an SSL context and try to load a certchain, if using SSL

Breaking Change?

Will these changes cause existing functionality to not work as expected? Will contributors be able to run the project after these changes are merged, without needing to take any additional steps?

No.

Merging Checklist

Lastly, before merging we need to make sure that these are done.

  • Project builds and runs
  • All changes were tested
  • Code style follows current style guide
  • Code documentation is up-to-date
  • Project documentation is up-to-date

Update websocket server to introduce SSL. New constants were added to
define the SSL certificate chain and private key files. By default,
SSL is disabled. It may be enabled by setting USE_SSL to True.

SSL should be used for secure websocket communication whenever possible.
If the server is using SSL, be sure that clients also connect using SSL
and the WSS:// protocol.
... and also the secure websocket example.
@Phixyn Phixyn added the backend Backend development label Jan 26, 2021
@Phixyn Phixyn added this to the v1.2.0 milestone Jan 26, 2021
@Phixyn
Copy link
Owner Author

Phixyn commented Jan 26, 2021

Needs testing with a real certificate

@Phixyn
Copy link
Owner Author

Phixyn commented Jan 31, 2021

Branch needs to be updated from master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support HTTPS by making use of WSS
1 participant