teleport/lib/proxy
rosstimothy a5898a2a99
Convert tsh ssh to use the proxy transport service instead of ssh (#23228)
* Convert tsh ssh to use the proxy transport service instead of ssh

In an effort to reduce latency establishing sessions `tsh ssh` is
migrating away from connecting to the Proxy via SSH in favor of
using gRPC. The SSH handshakes with the Proxy increase latency in
situations where the distance between geolocations of the client
and Proxy are large. TLS handshakes used by the gRPC service have
proven to reduce latency by ~20% in the same scenario.

A new `lib/client.ClusterClient` has been introduced that should
be used instead of `lib/client.ProxyClient` to connect to a Teleport
cluster. Most of the functionality within the `ClusterClient` was
a direct copy from the `ProxyClient`.

The `lib/client.TeleportClient` now has a `ConnectToCluster` method
which will connect to both the Proxy and Auth service via the
`api/client.ProxyClient` which first attempts to use gRPC and reverts
back to SSH to preserve backwards compatability. The `ClusterClient`
should be passed around and reused instead of following the
established pattern of `tc.ConnectToProxy` followed by a
`proxy.ConnectToCluster` to get an `auth.ClientI`.

Additionally some of the `agentless` package was refactored to reduce
dependencies and allow it to work with connections to the Proxy that
originated via gRPC instead of SSH.

Changes to the integration tests are mostly to accomodate IP Pinning
and ensure that it works for both connections established via SSH
and gPRC.

This is the final PR needed to complete #19812.

* fix typos and unify span attributes

* pass node name to ConnectToNode

* simplify jump host resetting
2023-04-04 21:31:39 +00:00
..
clusterdial Make proxy routing logic reusable (#18370) 2022-11-18 13:11:32 +00:00
peer Validate proxy peer identity (#23392) 2023-03-23 13:12:59 +00:00
router.go Convert tsh ssh to use the proxy transport service instead of ssh (#23228) 2023-04-04 21:31:39 +00:00
router_test.go Convert tsh ssh to use the proxy transport service instead of ssh (#23228) 2023-04-04 21:31:39 +00:00