Open strideynet opened 9 months ago
There's two issues here:
// shouldDialAndForward returns whether a connection should be proxied
// and forwarded or not.
func shouldDialAndForward(params reversetunnelclient.DialParams, recConfig types.SessionRecordingConfig) bool {
// connection is already being tunneled, do not forward
if params.FromPeerProxy {
return false
}
// the node is an agentless node, the connection must be forwarded
if params.TargetServer != nil && params.TargetServer.IsOpenSSHNode() {
return true
}
// proxy session recording mode is being used and an SSH session
// is being requested, the connection must be forwarded
if params.ConnType == types.NodeTunnel && services.IsRecordAtProxy(recConfig.GetMode()) {
return true
}
return false
}
It looks like this would potentially impact leaf nodes when proxy recording mode is enabled as well.
Expected behavior: When connecting to an agentless node in a leaf cluster, no TOFU dialogue is presented
Current behavior:
Bug details:
This was previously discussed as a follow on from https://github.com/gravitational/teleport/issues/31281