Skip to content

Client-isolation lock blocks read-only stats RPCs for any client other than the controlling one #77

Description

@m4l3vich

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:

  1. 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).
  2. From a different host/container/IP, call GetStats (REST GET /stats or gRPC NodeService/GetStats) with a valid x-api-key for that node.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions