linkerd2-proxy/tests/support
Eliza Weisman 761a08e4ac
Make TLS accept logic compatible with disabled protocol detection (#158)
This branch changes the proxy's accept logic so that the proxy will no
longer attempt to terminate TLS on ports which are configured to skip
protocol detection. This means that a Linkerd deployment with 
`--tls optional` will no longer break server-speaks-first protocols like
 MySQL (although that traffic will not be encrypted). 

Since it's necessary to get the connection's original destination to
determine if it's on a port which should skip protocol detection, I've
moved the SO_ORIGINAL_DST call down the stack from `Server` to
`BoundPort`. However, to avoid making an additional unnecessary syscall,
the original destination is propagated to the server, along with the
information about whether or not protocol detection is enabled. This is
the approach described in
https://github.com/linkerd/linkerd2/issues/1270#issuecomment-406124236.

I've also written a new integration test for server-speaks-first
protocols with TLS enabled. This test is essentially the same as the
existing `transparency::tcp_server_first` test, but with TLS enabled for
the test proxy. I've confirmed that this fails against master.
Furthermore, I've validated this change by deploying the `booksapp` demo
with MySQL with TLS enabled, which [previously didn't work](https://github.com/linkerd/linkerd2/issues/1648#issuecomment-432867702).

Closes linkerd/linkerd2#1270

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-12-13 12:31:13 -08:00
..
client.rs Add basic tap integration tests (#154) 2018-12-04 18:37:26 -08:00
controller.rs replace proxy::http usage of tower-h2 with hyper 2018-11-27 17:29:18 -08:00
mod.rs Add basic tap integration tests (#154) 2018-12-04 18:37:26 -08:00
proxy.rs change Inbound to always use localhost 2018-11-14 15:59:48 -08:00
server.rs replace proxy::http usage of tower-h2 with hyper 2018-11-27 17:29:18 -08:00
tap.rs Add basic tap integration tests (#154) 2018-12-04 18:37:26 -08:00
tcp.rs Make TLS accept logic compatible with disabled protocol detection (#158) 2018-12-13 12:31:13 -08:00