Commit Graph
4 Commits
Author SHA1 Message Date
rosstimothy 8f1522bb34 Convert api to use slog instead of logrus (#39255)
THe use of slog now allows logrus to be removed from the api
module entirely.
2024-03-18 21:20:28 +00:00
Edoardo Spadolini 7ebaf6aabb Abort reverse tunnel connections early if the proxy is already claimed (#27683)
* Don't loop over authMethods in (*agentDialer)DialContext

* Make HostKeyCallbackConfig.OnCheckCert fallible

* Add a way to check if a proxy is claimed

* Abort reverse tunnel conns early if the proxy is already claimed

* Document the pre-closed global request channel
2023-06-09 19:36:23 +00:00
rosstimothy 3cca37fff6 Fix web ssh session with proxy recording mode (#18910)
* Fix web ssh session with proxy recording mode

The agent was not being propagated when establishing an ssh session
via the web which resulted in the error described in #18850. Providing
the agent was straightforward, however, due to the changes from #18656
when using the forward server, as is required with proxy recording mode,
the ssh connection is now being performed directly over a `net.Pipe`.
Due to the synchronous nature of `net.Pipe` this causes a deadlock when
performing the ssh handshake. To mitigate the deadlocks, `DualPipeNetConn`
was changed to leverage `syscall.Socketpair` instead of `net.Pipe`.

`TestTerminal` now has two cases, one for node recording mode and another
for proxy recording mode. In order for the proxy recording mode test to pass
the fake clock used in the test needed to be properly propagated to the
`ssh.CertChecker` and `forward.ServerConfig`.

Fixes #18850
2022-12-02 19:45:02 +00:00
Roman Tkachenko e1c3f80aa0 Fixes for cert checker and Postgres config builder (#8251) 2021-09-17 13:28:40 -07:00