Skip to content

Commit 63b4265

Browse files
committed
fix: accept node tokens on /api/v1/nodes endpoint for peer discovery
Nodes inside environments need to look up other nodes for cross-node messaging. The nodes list endpoint now accepts node token auth (via groupMemberAuth) in addition to session tokens.
1 parent e6750d2 commit 63b4265

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/relay/relay.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ func buildMux(hub *NodeHub, sessions *PendingSessions, st store.Store, cfg Relay
218218
mux.HandleFunc("POST /api/v1/node-enrollments/redeem", nodeEnrollmentRedeemHandler(st))
219219
mux.Handle("POST /api/v1/nodes", authMiddleware(http.HandlerFunc(nodeRegisterDeprecatedHandler())))
220220
mux.Handle("DELETE /api/v1/nodes/{name}", authMiddleware(http.HandlerFunc(nodeRevokeHandler(st))))
221-
mux.Handle("GET /api/v1/nodes", authMiddleware(http.HandlerFunc(nodesListHandler(st))))
221+
mux.Handle("GET /api/v1/nodes", groupMemberAuth(nodesListHandler(st)))
222222

223223
// Invite management (owner-only).
224224
mux.Handle("POST /api/v1/invites", authMiddleware(http.HandlerFunc(inviteCreateHandler(st))))

0 commit comments

Comments
 (0)