Skip to content
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

Fix race in TestSSH/ssh_jump_host_access #24195

Merged
merged 2 commits into from Apr 6, 2023

Conversation

rosstimothy
Copy link
Contributor

Fixes a data race in the proxyClusterGuesser as seen in TestSSH/ssh_jump_host_access. The proxy ssh client proxyClusterGuesser now uses a similar mechanism as the proxy grpc client to protect the inferred cluster name from being updated concurrently.

In addition to prevent tests from falling back to using ssh instead of grpc the transport server tls config is no longer using setupTLSConfigClientCAsForCluster. Instead GetConfigForClient is set directly and it only updates the tls.Config.ClientCAs.

Uses the same mechanism as api.client.proxy.clusterName within
lib.client.proxyClusterGuesser to prevent races on the cluster
name when connecting via ssh.
Using `setupTLSConfigClientCAsForCluster` was overwriting the
tls.Config.ClientAuth on each client connection which caused falling
back to connecting via ssh.
@rosstimothy rosstimothy added this pull request to the merge queue Apr 6, 2023
Merged via the queue into master with commit 502174f Apr 6, 2023
21 checks passed
@rosstimothy rosstimothy deleted the tross/cluster_guesser_race branch April 6, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants