Skip to content

fix(directory): open per-network list_nodes to members (PILOT-347)#14

Merged
TeoSlayer merged 1 commit into
mainfrom
fix/list-nodes-member-access-PILOT-347
May 29, 2026
Merged

fix(directory): open per-network list_nodes to members (PILOT-347)#14
TeoSlayer merged 1 commit into
mainfrom
fix/list-nodes-member-access-PILOT-347

Conversation

@TeoSlayer
Copy link
Copy Markdown
Contributor

Per PILOT-347 threat model: the network admin token is held by network administrators only; normal users have no admin token. The previous HandleListNodes required the admin token for every list_nodes call, which locked every user out of their own networks.

Split the policy:

  • backbone (netID==0) — admin-only (still closes the enumeration vector)
  • per-network (netID!=0) — open to any caller (users need this to function)

This is the symmetric per-PILOT-347 fix to common's #8 (admin-token only on managed.policy.set, not user-owned ops).

The previous HandleListNodes gated EVERY list_nodes call on the admin
token. The intent was to close an enumeration vector — any peer being
able to list any network's members — but it locked normal users out
of their own networks because only the network administrators hold
the admin token (per PILOT-347).

Split the policy by network ID:
- netID == 0 (backbone) — admin-only. Real enumeration risk; only
  network admins need this view; users use lookup with a specific
  node_id instead.
- netID != 0 (per-network) — open. Users are members of networks
  they joined and need to enumerate the members of those networks
  to send messages, do peer discovery, etc. No admin token required.

Targeted tests pass.
@TeoSlayer TeoSlayer merged commit b28456f into main May 29, 2026
1 check passed
@TeoSlayer TeoSlayer deleted the fix/list-nodes-member-access-PILOT-347 branch May 29, 2026 21:17
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants