Extend execution clients search to enode, ENR, IP and peers - #839
Conversation
The search box on the EL clients page only matched the client name. Bring it in line with the CL page search and extend it: matches now include the node's peer ID, version, enode, ENR, IP and listen address, plus the enode/ENR/peer ID/name of its connected peers - so searching for an IP address, enode or ENR also finds the clients connected to that peer. Sensitive fields are empty when ShowSensitivePeerInfos is disabled and simply never match.
There was a problem hiding this comment.
Summary
The PR extends the execution clients search to match each node's name, peer ID, version, enode/ENR/IP/listen-addr and every connected peer's ID/enode/ENR/name. The JS field names line up with the Go model and the lookups resolve correctly, but peer enode/name are searched even when ShowSensitivePeerInfos is disabled, contradicting the PR's stated 'sensitive fields never match' invariant.
Issues
- 🟡
templates/clients/clients_el.html:561— peer enode/name are searchable even when ShowSensitivePeerInfos is off — see the thread on that line
Reviewed @ efa3dadc
"When in doubt, leave it out." — Joshua Porter
Peer enode, name, caps and protocols were sent in the page data unconditionally and only hidden client-side, so the extended search could still match a peer's enode/IP with ShowSensitivePeerInfos disabled. Only populate them (together with the already-gated ENR) when the flag is on, matching the gating of the node's own enode/ENR/IPs.
There was a problem hiding this comment.
The PR extends the execution-clients page search to match a node's own enode/ENR/IP/listen-address/version plus the enode/ENR/peer-ID/name of its connected peers, mirroring the CL page's search pattern. The companion change gates per-peer sensitive fields (name, enode, caps, protocols, ENR) server-side behind ShowSensitivePeerInfos. I traced every field the JS matches against to its model json tag, ran the match function through a node repro (empty sensitive fields never match when the flag is off; all fields match when on), confirmed the gate aligns with the template's existing ko-if gating, and found the Go refactor touches no locks or error paths. No functional bugs or leaks found.
Reviewed 2 changed file(s) @ 293adf7a — no blocking issues found.
"When in doubt, leave it out." — Joshua Porter
Summary
The search box on the execution clients page only matched the client name. This brings it in line with the CL page search (name / peer ID / ENR) and extends it further.
A client row now matches when the search text is found in any of:
Matching against connected peers means you can paste an IP address, enode, or ENR into the search box and find which of your clients are connected to that peer — handy for tracking down who is peered with a specific node on a devnet.
Notes
ShowSensitivePeerInfosis disabled, so they simply never match — no information leak through search behavior.