You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ROADMAP-11 — P1 — Run ownership/tenancy: any API key can read any run by id #103
Series:ROADMAP — filed from the 2026-10-27 whole-project assessment · Backlog task: M15-T04 · Priority: P1 · Effort: medium · Labels: security, enhancement
Problem
API_KEYS is a flat shared list and runs has no owner column. Any valid key can read any run's full goal + final answer (and once ROADMAP-08 lands, list other tenants' runs) by knowing or enumerating run UUIDs. Keys cannot be revoked per-consumer or attributed per-consumer.
Evidence
agentkit/config.py:247 — flat API_KEYS
agentkit/core/types.py / agentkit/db/models.py — no owner/tenant on runs
agentkit/api/auth.py — verification returns only the matched key string
Suggested fix / acceptance criteria
runs.owner_key column records a hash of the API key (never the key itself) at create_run
GET /runs/{id}, GET /runs/{id}/trace, DELETE, and the new GET /runs filter by owner
Migration backfills existing rows as NULL = admin-visible only (documented)
Unit + integration test: cross-tenant access yields 404
Suggested branch / commit
feat/run-ownership · feat(db): scope run reads/cancels/deletes to the owning API key
Activity