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

TLS Support #143

Open
HT154 opened this issue Sep 21, 2018 · 4 comments
Open

TLS Support #143

HT154 opened this issue Sep 21, 2018 · 4 comments

Comments

@HT154
Copy link

HT154 commented Sep 21, 2018

I'd like to run bjoern in production, but my organization requires TLS behind load balancers/proxies. I attempted to wrap a socket I created before calling bjoern.server_run, but it looks like the wrap call is actually supposed be called after socket.accept() is called. We're deploying in containers, so I'd like to avoid the heavyweight solution of deploying a webserver like nginx just to get TLS termination on the backend.

It would be great if bjoern.server_run could also accept an ssl.SSLContext as an argument and use it to automatically wrap the socket when accepting connections.

@jonashaag
Copy link
Owner

PR welcome!

@pgmillon
Copy link

What's the real status on this given that you already rejected #37 ?

@jonashaag
Copy link
Owner

I'm happy to merge anything that doesn't add SSL logic per se, but just changes some of the socket handling, if that's possible at all.

@Gabriel-Gardin
Copy link

Hello guys,

I've refactor the bjoern.py functions to a class, and then I overwrite the bind_and_listen method to wrap the socket on SSL. However it didn't work and the server continues to just listen to HTTP even though the socket is wrapped.

Any hints?

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

No branches or pull requests

4 participants