fix: RBAC name-scoped access — CUID resolution + list filtering #23

Merged
michal merged 1 commits from fix/rbac-name-scoped-access into main 2026-02-23 12:27:49 +00:00
Owner

Summary

  • Fix: GET by CUID now resolves to human name before RBAC check (fixes 403 on name-scoped bindings)
  • Fix: List endpoints now filter responses via preSerialization hook so name-scoped users only see their resources
  • Add getAllowedScope() method to RbacService
  • Add 14 integration tests reproducing both bugs
  • Add fulldeploy.sh orchestrator script

Test plan

  • 437 mcpd tests pass (including 14 new integration + getAllowedScope unit tests)
  • 270 CLI tests pass
  • Manual: mcpctl get servers as name-scoped user shows only permitted server
  • Manual: mcpctl get server my-home-assistant -o yaml returns 200
## Summary - Fix: GET by CUID now resolves to human name before RBAC check (fixes 403 on name-scoped bindings) - Fix: List endpoints now filter responses via preSerialization hook so name-scoped users only see their resources - Add `getAllowedScope()` method to RbacService - Add 14 integration tests reproducing both bugs - Add `fulldeploy.sh` orchestrator script ## Test plan - [x] 437 mcpd tests pass (including 14 new integration + getAllowedScope unit tests) - [x] 270 CLI tests pass - [ ] Manual: `mcpctl get servers` as name-scoped user shows only permitted server - [ ] Manual: `mcpctl get server my-home-assistant -o yaml` returns 200
michal added 1 commit 2026-02-23 12:26:52 +00:00
fix: RBAC name-scoped access — CUID resolution + list filtering
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / typecheck (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / package (pull_request) Has been cancelled
604bd76d60
Two bugs fixed:
- GET /api/v1/servers/:cuid now resolves CUID→name before RBAC check,
  so name-scoped bindings match correctly
- List endpoints now filter responses via preSerialization hook using
  getAllowedScope(), so name-scoped users only see their resources

Also adds fulldeploy.sh orchestrator script.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
michal merged commit 5844d6c73f into main 2026-02-23 12:27:49 +00:00
michal deleted branch fix/rbac-name-scoped-access 2026-02-23 12:27:49 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: michal/mcpctl#23