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

Support SSL Termination #9139

bryevdv opened this issue Aug 4, 2019 · 0 comments · Fixed by #9158

Support SSL Termination #9139

bryevdv opened this issue Aug 4, 2019 · 0 comments · Fixed by #9158


Copy link

bryevdv commented Aug 4, 2019

Apparently it's fairly trivial to support SSL termination in Tornado, e.g. this works with a self-signed cert:

diff --git a/bokeh/server/ b/bokeh/server/
index 04ce230e1..fb8a6e129 100644
--- a/bokeh/server/
+++ b/bokeh/server/
@@ -394,6 +394,10 @@ class Server(BaseServer):

+            import ssl
+            context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
+            context.load_cert_chain(certfile="/Users/bryan/tmp/ssl/cert.pem")
+            http_server_kwargs['ssl_options'] = context
             http_server = HTTPServer(tornado_app, **http_server_kwargs)


Propose to add server opts and corresponding command line args for certfile and (optionally) keyfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

1 participant