-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 TLS Routing jumphost flow #11282
Conversation
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.
@smallinsky Can you also make sure it works with ssh -J
before merging?
@@ -166,6 +174,57 @@ func testLeafClusterSSHAccess(t *testing.T, s *suite) { | |||
require.NoError(t, err) | |||
} | |||
|
|||
func testJumpHostSSHAccess(t *testing.T, s *suite) { |
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.
I think converting this test cases to a test table would make this test easier to understand.
// Check if JumpHost address is a proxy web address. | ||
resp, err := webclient.Find(ctx, sshProxyAddr, tc.InsecureSkipVerify, nil) | ||
// If JumpHost address is a proxy web port and proxy supports TLSRouting dial proxy with TLSWrapper. | ||
if err == nil && resp.Proxy.TLSRoutingEnabled { |
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.
What if the error is returned here? Shouldn't be returned instead of "ignored"?
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.
This is on purpose if the call err != nil it means sshProxyAddr is not proxy web service flow should proceed with standard dialer.
Tested it manually both following cases works:
|
ef0006a
to
fa0e61a
Compare
Issue: #11271
What
TLS Routing broke JumpHost access in case where leaf cluster is used as JumpHost. The JumpHost address is not properly propagated to
makeProxySSHClient
function call and alway root cluster is used.How
Fix JumpHost address propagation. Also added support for case where JumpHost is set to Teleport proxy web port and proxy support TLS Routing.