feat: log tailnet tunnels to the connection log (#27423)

Co-authored-by: Chris DiGiamo <cd@anthropic.com>
Co-authored-by: Chris DiGiamo <cdigiamo@anthropic.com>
This commit is contained in:
Jon Ayers
2026-07-28 15:30:12 -05:00
committed by GitHub
co-authored by Chris DiGiamo Chris DiGiamo
parent 8cc7f2bb0e
commit 1a6a8be96c
21 changed files with 381 additions and 30 deletions
+6
View File
@@ -26,6 +26,7 @@ type ConnectionLog struct {
// WebInfo is only set when `type` is one of:
// - `ConnectionTypePortForwarding`
// - `ConnectionTypeWorkspaceApp`
// - `ConnectionTypeTunnel`
WebInfo *ConnectionLogWebInfo `json:"web_info,omitempty"`
// SSHInfo is only set when `type` is one of:
@@ -46,6 +47,11 @@ const (
ConnectionTypeReconnectingPTY ConnectionType = "reconnecting_pty"
ConnectionTypeWorkspaceApp ConnectionType = "workspace_app"
ConnectionTypePortForwarding ConnectionType = "port_forwarding"
// ConnectionTypeTunnel is recorded by coderd when a client
// establishes a tailnet tunnel to a workspace agent, and carries
// the authenticated user's identity. Tunnels via the user-scoped
// tailnet API (e.g. Coder Desktop) are not currently recorded.
ConnectionTypeTunnel ConnectionType = "tunnel"
)
// ConnectionLogStatus is the status of a connection log entry.