Skip to content

[v16] Improve client tools host resolution#50800

Merged
rosstimothy merged 1 commit intobranch/v16from
tross/backport-50175/v16
Jan 17, 2025
Merged

[v16] Improve client tools host resolution#50800
rosstimothy merged 1 commit intobranch/v16from
tross/backport-50175/v16

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

Backport #50175 to branch/v16

Changelog: Honor the cluster routing strategy when client initiated host resolution via proxy templates or label matching is ambiguous.

Host resolution performed because labels, fuzzy search, or predicate
expressions were supplied to commands that establish connections to
a single host has historically been performed client side in tsh.
While that works in most cases, it can prevent correctly
resolving hosts in some situations, i.e. when there are ambiguous
hosts and tsh is unaware that the cluster routing strategy is set
to ROUTE_TO_MOST_RECENT.

To improve the experience, a new ResolveSSHTarget was added to
Auth to allow host resolution to be performed server side. The
resolution works in a similar manner to, and was inspired by
GetSSHTargets. In the event that the new RPC is not implemented,
because the client is newer than Auth, tsh has also been updated
to pull the cluster networking config and address any host
ambiguity if allowed.

As a result tsh scp and tsh proxy ssh should be much more
tolerant to, and still permit access in situations where
ambiguous hosts are present for some amount of time. Prior to
this the only way to connect in these situations was to find
the UUID of the correct target instance and try again after
seeing an ambiguous host error.
@rosstimothy rosstimothy marked this pull request as ready for review January 6, 2025 21:33
@github-actions github-actions Bot added machine-id size/md tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Jan 6, 2025
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from fspmarshall January 7, 2025 10:55
@rosstimothy rosstimothy added this pull request to the merge queue Jan 17, 2025
Merged via the queue into branch/v16 with commit 8b6bc97 Jan 17, 2025
@rosstimothy rosstimothy deleted the tross/backport-50175/v16 branch January 17, 2025 14:34
@camscale camscale mentioned this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport machine-id size/md tsh tsh - Teleport's command line tool for logging into nodes running Teleport.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants