mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
fix(tailnet): enforce valid agent and client addresses (#12197)
This adds the ability for `TunnelAuth` to also authorize incoming wireguard node IPs, preventing agents from reporting anything other than their static IP generated from the agent ID.
This commit is contained in:
@ -155,7 +155,7 @@ func (api *API) workspaceAgentRPC(rw http.ResponseWriter, r *http.Request) {
|
||||
streamID := tailnet.StreamID{
|
||||
Name: fmt.Sprintf("%s-%s-%s", owner.Username, workspace.Name, workspaceAgent.Name),
|
||||
ID: workspaceAgent.ID,
|
||||
Auth: tailnet.AgentTunnelAuth{},
|
||||
Auth: tailnet.AgentCoordinateeAuth{ID: workspaceAgent.ID},
|
||||
}
|
||||
ctx = tailnet.WithStreamID(ctx, streamID)
|
||||
ctx = agentapi.WithAPIVersion(ctx, version)
|
||||
|
Reference in New Issue
Block a user