mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +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:
@@ -312,7 +312,7 @@ func (*FakeCoordinator) ServeMultiAgent(uuid.UUID) tailnet.MultiAgentConn {
|
||||
panic("unimplemented")
|
||||
}
|
||||
|
||||
func (f *FakeCoordinator) Coordinate(ctx context.Context, id uuid.UUID, name string, a tailnet.TunnelAuth) (chan<- *proto.CoordinateRequest, <-chan *proto.CoordinateResponse) {
|
||||
func (f *FakeCoordinator) Coordinate(ctx context.Context, id uuid.UUID, name string, a tailnet.CoordinateeAuth) (chan<- *proto.CoordinateRequest, <-chan *proto.CoordinateResponse) {
|
||||
reqs := make(chan *proto.CoordinateRequest, 100)
|
||||
resps := make(chan *proto.CoordinateResponse, 100)
|
||||
f.CoordinateCalls <- &FakeCoordinate{
|
||||
@@ -337,7 +337,7 @@ type FakeCoordinate struct {
|
||||
Ctx context.Context
|
||||
ID uuid.UUID
|
||||
Name string
|
||||
Auth tailnet.TunnelAuth
|
||||
Auth tailnet.CoordinateeAuth
|
||||
Reqs chan *proto.CoordinateRequest
|
||||
Resps chan *proto.CoordinateResponse
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user