Since v0.5.3, every API call in backendMethods (both REST and gRPC) requires the caller's source IP to match whichever client last called Start. That's correct for control-plane ops (Start/Stop/SyncUser(s)), but the same map also sweeps in read-only methods (GetStats, GetUserOnlineStats, GetUserOnlineIpListStats, GetBackendStats, GetSystemStats, GetLogs), so any independent, correctly API-key-authenticated client gets PermissionDenied: node is controlled by another client since it's never the same IP as the Panel.
Steps to reproduce:
- Run a node with a Panel actively managing it (Panel has called
Start at least once, so currentClient is set to the Panel's IP).
- From a different host/container/IP, call
GetStats (REST GET /stats or gRPC NodeService/GetStats) with a valid x-api-key for that node.
- Observe:
rpc error: code = PermissionDenied desc = node is controlled by another client
(REST returns the same message as a 403.)
Expected behaviour:
A client presenting a valid API key should be able to call read-only stats endpoints (GetStats, GetUserOnlineStats, GetUserOnlineIpListStats, GetBackendStats, GetSystemStats, GetLogs) regardless of which client is currently "in control" of Start/Stop. These endpoints don't mutate controller state and shouldn't require control-plane ownership.
Since v0.5.3, every API call in
backendMethods(both REST and gRPC) requires the caller's source IP to match whichever client last calledStart. That's correct for control-plane ops (Start/Stop/SyncUser(s)), but the same map also sweeps in read-only methods (GetStats,GetUserOnlineStats,GetUserOnlineIpListStats,GetBackendStats,GetSystemStats,GetLogs), so any independent, correctly API-key-authenticated client getsPermissionDenied: node is controlled by another clientsince it's never the same IP as the Panel.Steps to reproduce:
Startat least once, socurrentClientis set to the Panel's IP).GetStats(RESTGET /statsor gRPCNodeService/GetStats) with a validx-api-keyfor that node.403.)Expected behaviour:
A client presenting a valid API key should be able to call read-only stats endpoints (
GetStats,GetUserOnlineStats,GetUserOnlineIpListStats,GetBackendStats,GetSystemStats,GetLogs) regardless of which client is currently "in control" ofStart/Stop. These endpoints don't mutate controller state and shouldn't require control-plane ownership.