ListPolicies RPC reads across orgs #313

Closed
opened 2026-10-27 13:35:49 +00:00 by sam · 0 comments
Owner

StateStore RPC ListPolicies (internal/infrastructure/staterpc/access.go) and Store.ListPolicies (internal/infrastructure/postgres/access.go), query ListAccessPolicies in internal/infrastructure/postgres/queries/access.sql: no org filter, so every org's policy text goes to any caller. The dashboard handler filters in Go after the fact, so the leak is at the RPC. The in-process policy engine needs all rows, so keep an unscoped path for it. Done when the query filters on the caller's org, plus instance-level rows for instance viewers.

Acceptance criteria

ListPolicies returns only the caller organization and applicable instance-level policies; the policy engine retains its all-row path.

Close reason

Fixed on feat/org-epic (PR #1634)


Imported from beads archie-core-kgxw.25 · GitHub #1590 · type bug · priority P1 · created 2026-10-10 · closed 2026-10-11

StateStore RPC ListPolicies (internal/infrastructure/staterpc/access.go) and Store.ListPolicies (internal/infrastructure/postgres/access.go), query ListAccessPolicies in internal/infrastructure/postgres/queries/access.sql: no org filter, so every org's policy text goes to any caller. The dashboard handler filters in Go after the fact, so the leak is at the RPC. The in-process policy engine needs all rows, so keep an unscoped path for it. Done when the query filters on the caller's org, plus instance-level rows for instance viewers. ### Acceptance criteria ListPolicies returns only the caller organization and applicable instance-level policies; the policy engine retains its all-row path. ### Close reason Fixed on feat/org-epic (PR #1634) --- _Imported from beads `archie-core-kgxw.25` · GitHub #1590 · type bug · priority P1 · created 2026-10-10 · closed 2026-10-11_
sam added the highbug labels 2026-10-27 13:35:49 +00:00
sam self-assigned this 2026-10-27 13:35:49 +00:00
sam closed this issue 2026-10-27 13:35:49 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#313