feat: add agentapi endpoint to report connections for audit (#16507)

This change adds a new `ReportConnection` endpoint to the `agentapi`.

The protocol version was bumped previously, so it has been omitted here.

This allows the agent to report connection events, for example when the
user connects to the workspace via SSH or VS Code.

Updates #15139
This commit is contained in:
Mathias Fredriksson
2025-02-20 14:52:01 +02:00
committed by GitHub
parent dedc32fb1a
commit b07b33ec9d
16 changed files with 1488 additions and 709 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ type DRPCTailnetClient23 interface {
}
// DRPCTailnetClient24 is the Tailnet API at v2.4. It is functionally identical to 2.3, because the
// change was to the Agent API (ResourcesMonitoring methods).
// change was to the Agent API (ResourcesMonitoring and ReportConnection methods).
type DRPCTailnetClient24 interface {
DRPCTailnetClient23
}
+2
View File
@@ -43,6 +43,8 @@ import (
// - Shipped in Coder v2.{{placeholder}} // TODO Vincent: Replace with the correct version
// - Added support for GetResourcesMonitoringConfiguration and
// PushResourcesMonitoringUsage RPCs on the Agent API.
// - Added support for reporting connection events for auditing via the
// ReportConnection RPC on the Agent API.
const (
CurrentMajor = 2
CurrentMinor = 4