access: org-filtered store lookups return the existing not-found sentinels #1688

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

Rest of archie-core-qc8p step 2 (docs/prds/orgs-and-access.md, 'Denials' + 'Verification'): org-filtered lookups at the State Store. Get/List surfaces for org-owned records (TaskByID, Tasks, TaskByIssue, GetBinding, ListBindings, GetSource, ListSources, mapping/event-type reads) take the caller's org and filter; a record of another org returns the store's existing not-found sentinel byte-for-byte (ErrBindingNotFound, ErrMappingNotFound, ...) and foreign records never appear in lists.

Blocked on principal scope: the webui handlers and dispatch need the caller's org threaded from the assembled principal (access.PrincipalSource) into these calls, which is the same identity->org resolution archie-core-scbe tracks for producers. Implement after or with scbe; wire the org through the webui authorize wrapper (it already assembles the principal per request) into the store calls.

Notes

Confirmed during org-owned workflow work: EDA binding and capture list/read adapters still return unfiltered records, and workflow/stage statistics are not scoped to the caller org. Workflow-definition documents are scoped correctly; this separate task must finish filtering the surrounding record surfaces. The daemon dispatch change selects and filters bindings against each configured identity org locally, but does not replace the store-side isolation this issue requires.

Close reason

Already done: scopeOrg filters in postgres lookups (9e9506fa, 3960a00f); cross-org reads return not-found


Imported from beads archie-core-z66d · GitHub #1224 · type task · priority P2 · created 2026-09-26 · closed 2026-10-17

Rest of archie-core-qc8p step 2 (docs/prds/orgs-and-access.md, 'Denials' + 'Verification'): org-filtered lookups at the State Store. Get/List surfaces for org-owned records (TaskByID, Tasks, TaskByIssue, GetBinding, ListBindings, GetSource, ListSources, mapping/event-type reads) take the caller's org and filter; a record of another org returns the store's existing not-found sentinel byte-for-byte (ErrBindingNotFound, ErrMappingNotFound, ...) and foreign records never appear in lists. Blocked on principal scope: the webui handlers and dispatch need the caller's org threaded from the assembled principal (access.PrincipalSource) into these calls, which is the same identity->org resolution archie-core-scbe tracks for producers. Implement after or with scbe; wire the org through the webui authorize wrapper (it already assembles the principal per request) into the store calls. ### Notes Confirmed during org-owned workflow work: EDA binding and capture list/read adapters still return unfiltered records, and workflow/stage statistics are not scoped to the caller org. Workflow-definition documents are scoped correctly; this separate task must finish filtering the surrounding record surfaces. The daemon dispatch change selects and filters bindings against each configured identity org locally, but does not replace the store-side isolation this issue requires. ### Close reason Already done: scopeOrg filters in postgres lookups (9e9506fa, 3960a00f); cross-org reads return not-found --- _Imported from beads `archie-core-z66d` · GitHub #1224 · type task · priority P2 · created 2026-09-26 · closed 2026-10-17_
sam added the mediumtask labels 2026-10-27 13:41:23 +00:00
sam self-assigned this 2026-10-27 13:41:23 +00:00
sam closed this issue 2026-10-27 13:41:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1688