-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add secure client IP propagation throughout teleport #21080
Conversation
ddbe4b9
to
cdb93da
Compare
1482f80
to
6f8471d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work - I've raised a few nits I've picked up on an initial run through, and I'll do a deeper assessment of the actual networking tomorrow.
da25f80
to
ed0f9d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's come to my attention lately that we actually officially support mixing and matching minor/patch versions in the same cluster (as long as everything is at the same major version as the auth), so please doublecheck that an auth server that's not aware of the client IP propagation through the PROXY line will still allow connections in from clients or proxies that are aware.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass. Only made it to lib/multiplexer
.
626d184
to
acc9583
Compare
c2b72e2
to
89c7e95
Compare
89c7e95
to
75497fa
Compare
* Add secure client IP propagation throughout teleport (#21080) * Allow node to handle old and new way of client IP propagation on same listener With addition of signed PROXY headers, node was listening on multiplexer, but because of that it couldn't processing incoming connection from older proxies when ProxyHelloSignature was used, because both ends were waiting for the other side to send data first. Here we integrate ability to handle PROXY headers into connection itself, so we can start ssh server without waiting for multiplexer to detect connection * Enabled IP pinning enforcement for Kube and DB (#22310) * Don't allow different tcp version IP addresses in signed PROXY headers * Send signed proxy header to the kube service Because it was checking version, which was empty, signed headers were not sent, when we contacted leaf cluster's kube service * Temporary disable ip propagation tests.
This PR adds client IP information propagation through teleport infrastructure. It builds upon first stage where signed PROXYv2 headers were added for propagating client IP to the auth server through ALPN (#19008).
Main approach is that we transfer client IP information through reverse tunnel system when we can and then we send signed PROXY header if we have to connect to a server directly. This allows us to only need to send signed headers within single cluster, because we can always transfer IP information in the tunnel between clusters. To make it possible to send IP information through tunnel we add a few new fields to
DialReq
struct:We need to know teleport version of the target server, since old versions don't support receiving PROXY headers and would fail.