mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Till Toenshoff via Review Board <nore...@reviews.apache.org>
Subject Re: Review Request 70883: Added optional 'peer_hostname' argument to Socket::connect().
Date Fri, 21 Jun 2019 01:07:59 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70883/#review216013
-----------------------------------------------------------


Ship it!




We have discussed this patch a bit out of band and agreed that passing the `peer_hostname`
as an additional argument into the `process::connect` function and socket stack below was
the most sensible we can do. Alternatives like passing as a new `network::Address` member
has surprising conversion/typecasting results while exploiting the idea of a network address.
Adding a setter to our `Socket` might be another option but here we would have to supply a
noop member of the non SSL variant. With both variants we would have widened the scope of
this argument to areas where it does not play a role.


3rdparty/libprocess/include/process/socket.hpp
Lines 371 (patched)
<https://reviews.apache.org/r/70883/#comment302959>

    Too bad we can't default.


- Till Toenshoff


On June 19, 2019, 2:34 p.m., Benno Evers wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70883/
> -----------------------------------------------------------
> 
> (Updated June 19, 2019, 2:34 p.m.)
> 
> 
> Review request for mesos, Joseph Wu and Till Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The Socket::connect() function now takes an optional string
> as an additional argument. This is to prepare support for proper
> TLS hostname validation.
> 
> With TCP, a connection is always made to a specific IP address,
> with the hostname just serving as an artifact to help humans
> remember that address.
> 
> With TLS, the roles are switched: A connection is made to a
> specific hostname (which is recorded in a TLS certificate),
> with the IP address just being a network-layer artifact to
> help packets route to that hostname.
> 
> Therefore, a connecting TLS socket must be aware of the
> hostname it is supposed to connect to.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/http.hpp 029605eaff72e80206cb7dfd64c2f898084155e0

>   3rdparty/libprocess/include/process/socket.hpp 4f0f6e9aa6e95e826e3de96e518a7200ad7a8f83

>   3rdparty/libprocess/src/http.cpp 3e73ee936f5c6329f41704a179f3d88ab65dfb6d 
>   3rdparty/libprocess/src/poll_socket.hpp 15b7902ba2b10fad63e2ba7b8d5081d4b9e2d1c7 
>   3rdparty/libprocess/src/posix/libevent/libevent_ssl_socket.hpp 6ef5a86566af3439cfe0b06ab3576076623f7be0

>   3rdparty/libprocess/src/posix/libevent/libevent_ssl_socket.cpp 29a1bf71c1df9d80370455a6269ecea0ec4193b0

>   3rdparty/libprocess/src/posix/poll_socket.cpp 74acb6942682a9d9626df81b303eba0a1c24ecf7

>   3rdparty/libprocess/src/windows/poll_socket.cpp 565b0088dc2b270193e615655f57f48419eb2c12

> 
> 
> Diff: https://reviews.apache.org/r/70883/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Benno Evers
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message