GetHarnessSecret: derive the org from the task grant, not the request #1459

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

Follow-up to archie-core-jo15w. Org-scoped callers are now confined to their own org, but unscoped internal callers (daemon, egress proxy, launcher) still name the org in the request, so anyone holding the instance credential can read or write any org's harness token set. Derive the org from the task's own grant so a caller cannot name an org other than its task's, then drop the Org field from GetHarnessSecretRequest and the PutHarnessSecret secret org. Done when the request carries no org and a test shows a task grant cannot reach another org's secret.

Acceptance criteria

The request field is gone; the org comes from the task grant; a test pins that a grant cannot read another org's harness secret.

Close reason

Removed org fields from harness-secret inputs. State Store derives scope from the authenticated caller or a live grant's stored task. Launcher and proxy forward run grants; setup streams forward and resolve the principal and reject another org. Regression tests cover legacy forged org fields, cross-org denial, revocation, and OAuth injection/refresh. Full task check passed; commit d0f4842c.


Imported from beads archie-core-myzgd · GitHub #1667 · type bug · priority P2 · created 2026-10-13 · closed 2026-10-17

Follow-up to archie-core-jo15w. Org-scoped callers are now confined to their own org, but unscoped internal callers (daemon, egress proxy, launcher) still name the org in the request, so anyone holding the instance credential can read or write any org's harness token set. Derive the org from the task's own grant so a caller cannot name an org other than its task's, then drop the Org field from GetHarnessSecretRequest and the PutHarnessSecret secret org. Done when the request carries no org and a test shows a task grant cannot reach another org's secret. ### Acceptance criteria The request field is gone; the org comes from the task grant; a test pins that a grant cannot read another org's harness secret. ### Close reason Removed org fields from harness-secret inputs. State Store derives scope from the authenticated caller or a live grant's stored task. Launcher and proxy forward run grants; setup streams forward and resolve the principal and reject another org. Regression tests cover legacy forged org fields, cross-org denial, revocation, and OAuth injection/refresh. Full task check passed; commit d0f4842c. --- _Imported from beads `archie-core-myzgd` · GitHub #1667 · type bug · priority P2 · created 2026-10-13 · closed 2026-10-17_
sam added the mediumbug labels 2026-10-27 13:40:29 +00:00
sam self-assigned this 2026-10-27 13:40:29 +00:00
sam closed this issue 2026-10-27 13:40:29 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1459