tailcfg: add SSHRecorderFailureAction and SSHRecordingFailureNotifyRequest

This allows control to specify how to handle situations where the recorder
isn't available.

Updates tailscale/corp#9967

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2023-04-19 21:10:55 -07:00
committed by Maisem Ali
parent e3b2250e26
commit f66ddb544c
3 changed files with 68 additions and 1 deletions
+5
View File
@@ -399,6 +399,10 @@ func (src *SSHAction) Clone() *SSHAction {
dst := new(SSHAction)
*dst = *src
dst.Recorders = append(src.Recorders[:0:0], src.Recorders...)
if dst.OnRecordingFailure != nil {
dst.OnRecordingFailure = new(SSHRecorderFailureAction)
*dst.OnRecordingFailure = *src.OnRecordingFailure
}
return dst
}
@@ -412,6 +416,7 @@ var _SSHActionCloneNeedsRegeneration = SSHAction(struct {
HoldAndDelegate string
AllowLocalPortForwarding bool
Recorders []netip.AddrPort
OnRecordingFailure *SSHRecorderFailureAction
}{})
// Clone makes a deep copy of SSHPrincipal.