Compare commits

...

2 Commits

Author SHA1 Message Date
Maisem Ali 04662a8078
Merge a0dadf584d into a4a282cd49 2024-04-26 17:27:36 +00:00
Maisem Ali a0dadf584d ssh/tailssh: remove deprecated local recording envknob
It is now exposed as a bool that must be toggled at compile time.

Updates tailscale/corp#9967

Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-09-03 12:57:14 -07:00
1 changed files with 13 additions and 4 deletions

View File

@ -46,6 +46,7 @@ import (
"tailscale.com/util/httpm"
"tailscale.com/util/mak"
"tailscale.com/util/multierr"
"tailscale.com/version"
)
var (
@ -1226,10 +1227,18 @@ func (ss *sshSession) run() {
return
}
// recordSSHToLocalDisk is a deprecated dev knob to allow recording SSH sessions
// to local storage. It is only used if there is no recording configured by the
// coordination server. This will be removed in the future.
var recordSSHToLocalDisk = envknob.RegisterBool("TS_DEBUG_LOG_SSH")
var debugLogSSH = envknob.RegisterBool("TS_DEBUG_LOG_SSH")
// recordSSHToLocalDisk is a dev knob to allow recording SSH sessions to local
// storage. It is only used if there is no recording configured by the
// coordination server. It is only enabled in dev builds for testing, for
// production use recorders should be configured by the coordination server.
func recordSSHToLocalDisk() bool {
if !version.GetMeta().IsDev {
return false
}
return debugLogSSH()
}
// recorders returns the list of recorders to use for this session.
// If the final action has a non-empty list of recorders, that list is