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? #83

Closed
stephanbuys opened this Issue Aug 30, 2018 · 5 comments

Comments

3 participants
@stephanbuys

stephanbuys commented Aug 30, 2018

Hi all, simple question - is warp ready to be run using TLS? I'm suspecting its a bit early for the question and that some hyper innards need to be exposed in the API first?

@stephanbuys

This comment has been minimized.

stephanbuys commented Sep 28, 2018

Referencing #101 and re-opening. It would be great to get exposed to hyper in some way. Ideally a builder step. We're considering forking or patching warp to get to it in the meantime. @seanmonstar if this is something we can help with I am happy to jump in and start proposing PRs, please advise.

@stephanbuys stephanbuys reopened this Sep 28, 2018

@seanmonstar

This comment has been minimized.

Owner

seanmonstar commented Sep 28, 2018

I would like to provide TLS support built-in, but I haven't explored/decided on the exact details.

  • I think I'd like to default to rustls, since I feel warp can be more opinionated that hyper.
  • Someone suggest tls-api, which is intriguing, but I haven't investigated how mature the integration crates are.

In the meantime, in order to support #101 and such, I believe some kind of serve_incoming(impl Stream<Item = impl AsyncRead + AsyncWrite>) could be added to warp::Server. That'd allow any transport layer to work.

seanmonstar added a commit that referenced this issue Sep 28, 2018

Add ability to use a custom "incoming" stream of connections with Server
- Adds `Server::run_incoming` to start running the runtime immediately.
- Adds `Server::serve_incoming` to return an `impl Future` that can be
  spawned in a runtime.

ref #83
ref #101

seanmonstar added a commit that referenced this issue Sep 28, 2018

Add ability to use a custom "incoming" stream of connections with Server
- Adds `Server::run_incoming` to start running the runtime immediately.
- Adds `Server::serve_incoming` to return an `impl Future` that can be
  spawned in a runtime.

ref #83
ref #101

seanmonstar added a commit that referenced this issue Sep 28, 2018

Add ability to use a custom "incoming" stream of connections with Server
- Adds `Server::run_incoming` to start running the runtime immediately.
- Adds `Server::serve_incoming` to return an `impl Future` that can be
  spawned in a runtime.

ref #83
ref #101

@seanmonstar seanmonstar added the feature label Oct 2, 2018

@seanmonstar

This comment has been minimized.

Owner

seanmonstar commented Nov 20, 2018

I'm leaning towards providing TLS via rustls.

@stephanbuys

This comment has been minimized.

stephanbuys commented Nov 21, 2018

@seanmonstar it seems like a really good choice - great defaults and lots of support for CA certificate management.

@andy-rust

This comment has been minimized.

andy-rust commented Nov 25, 2018

As far as I understand, now there is the ability to use a custom "incoming" stream of connections with Server.

Could anyone be so kind as to share a working Warp + TLS example using this feature?

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