Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ func applyAuthConfig(fc *FileConfig, cfg *servicecfg.Config) error {
ProxyPingInterval: fc.Auth.ProxyPingInterval,
AssistCommandExecutionWorkers: assistCommandExecutionWorkers,
CaseInsensitiveRouting: fc.Auth.CaseInsensitiveRouting,
SSHDialTimeout: fc.Auth.SSHDialTimeout,
})
if err != nil {
return trace.Wrap(err)
Expand Down
2 changes: 2 additions & 0 deletions lib/config/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ func TestConfigReading(t *testing.T) {
WebIdleTimeout: types.Duration(19 * time.Second),
RoutingStrategy: types.RoutingStrategy_MOST_RECENT,
ProxyPingInterval: types.Duration(10 * time.Second),
SSHDialTimeout: types.Duration(45 * time.Second),
},
SSH: SSH{
Service: Service{
Expand Down Expand Up @@ -1495,6 +1496,7 @@ func makeConfigFixture() string {
conf.Auth.DisconnectExpiredCert = types.NewBoolOption(true)
conf.Auth.RoutingStrategy = types.RoutingStrategy_MOST_RECENT
conf.Auth.ProxyPingInterval = types.NewDuration(10 * time.Second)
conf.Auth.SSHDialTimeout = types.NewDuration(45 * time.Second)

// ssh service:
conf.SSH.EnabledFlag = "true"
Expand Down
6 changes: 5 additions & 1 deletion lib/config/fileconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,9 @@ type Auth struct {
// CaseInsensitiveRouting causes proxies to use case-insensitive hostname matching.
CaseInsensitiveRouting bool `yaml:"case_insensitive_routing,omitempty"`

// SSHDialTimeout is the timeout value that should be used for SSH connections.
SSHDialTimeout types.Duration `yaml:"ssh_dial_timeout,omitempty"`

// LoadAllCAs tells tsh to load the CAs for all clusters when trying
// to ssh into a node, instead of just the CA for the current cluster.
LoadAllCAs bool `yaml:"load_all_cas,omitempty"`
Expand Down Expand Up @@ -858,7 +861,8 @@ func (a *Auth) hasCustomNetworkingConfig() bool {
a.RoutingStrategy != empty.RoutingStrategy ||
a.TunnelStrategy != empty.TunnelStrategy ||
a.ProxyPingInterval != empty.ProxyPingInterval ||
(a.Assist != nil && a.Assist.CommandExecutionWorkers != 0)
(a.Assist != nil && a.Assist.CommandExecutionWorkers != 0) ||
a.SSHDialTimeout != empty.SSHDialTimeout
}

// hasCustomSessionRecording returns true if any of the session recording
Expand Down