mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: log tailnet tunnel authorization decisions (#27819)
This commit is contained in:
@@ -46,10 +46,8 @@ 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 records accepted and denied tailnet tunnel
|
||||
// requests made by authenticated users.
|
||||
ConnectionTypeTunnel ConnectionType = "tunnel"
|
||||
)
|
||||
|
||||
@@ -73,10 +71,10 @@ func (s ConnectionLogStatus) Valid() bool {
|
||||
|
||||
type ConnectionLogWebInfo struct {
|
||||
UserAgent string `json:"user_agent"`
|
||||
// User is omitted if the connection event was from an unauthenticated user.
|
||||
// User is omitted if the connection event was unauthenticated.
|
||||
User *User `json:"user"`
|
||||
SlugOrPort string `json:"slug_or_port"`
|
||||
// StatusCode is the HTTP status code of the request.
|
||||
// StatusCode is the HTTP status code or tunnel authorization outcome.
|
||||
StatusCode int32 `json:"status_code"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user