File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 11// Package boundarylogproxy provides a Unix socket server that receives boundary
22// audit logs and forwards them to coderd via the agent API.
3+ //
4+ // Wire Format:
5+ // Boundary sends length-prefixed protobuf messages over the Unix socket.
6+ // Each message is:
7+ // - 4 bytes: big-endian uint32 length of the protobuf data
8+ // - N bytes: protobuf-encoded BoundaryLogsRequest
9+ //
10+ // Boundary must generate its proto types with the same field numbers as the
11+ // agent proto (see agent/proto/agent.proto BoundaryLog and ReportBoundaryLogsRequest).
312package boundarylogproxy
413
514import (
@@ -138,7 +147,8 @@ func (s *Server) handleConnection(conn net.Conn) {
138147 return
139148 }
140149
141- // Unmarshal proto message.
150+ // Unmarshal proto message. Boundary's proto wire format must match
151+ // the agent proto exactly (same field numbers and types).
142152 var req agentproto.ReportBoundaryLogsRequest
143153 if err := proto .Unmarshal (buf , & req ); err != nil {
144154 s .logger .Warn (s .ctx , "unmarshal error" , slog .Error (err ))
You can’t perform that action at this time.
0 commit comments