Skip to content

Commit 6234f72

Browse files
committed
report user ID as uuid.Nil
1 parent 425f1e5 commit 6234f72

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

coderd/agentapi/audit.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,17 @@ func (a *AuditAPI) ReportConnection(ctx context.Context, req *agentproto.ReportC
8787
Log: a.Log,
8888
Time: req.GetConnection().GetTimestamp().AsTime(),
8989
OrganizationID: workspace.OrganizationID,
90-
UserID: workspace.OwnerID, // NOTE(mafredri): This may not be accurate if e.g. an owner is connecting.
9190
RequestID: connectionID,
9291
Action: action,
9392
New: workspaceAgent,
9493
Old: workspaceAgent,
9594
IP: req.GetConnection().GetIp(),
9695
Status: int(req.GetConnection().GetStatusCode()),
9796
AdditionalFields: riBytes,
97+
98+
// It's not possible to tell which user connected. Once we have
99+
// the capability, this may be reported by the agent.
100+
UserID: uuid.Nil,
98101
})
99102

100103
return &emptypb.Empty{}, nil

0 commit comments

Comments
 (0)