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
/workloads: authorize caller-named PVCs per subject, and scope workload names #358
POST /workloads forwards a caller-supplied workspace.claimName to Context Service (packages/knative-server/src/context-service.ts, createWorkload). Neither the harness nor Context Service checks that the caller may use that PVC. #350 binds a workload to the subject that created it (MI1 R7), but owning the workload says nothing about owning the volume it names. Without a guard, a user could create a workload over another user's claim, run on it, and read that user's workspace.
Workload names are also one namespace across subjects, first come, first served. Existence is probeable: re-creating another subject's live name answers 409, and deleting an unowned one answers 204.
This is a stop-gap, not authorization: claimName is refused (400 claim_name_not_allowed) from any authenticated caller and always under MOCA_TENANCY=multi. Only the anonymous caller of an unauthenticated deployment may still name a claim. So multi-user deployments lose the "bring your own PVC" feature entirely.
What closing it needs
Claim authorization: a mapping from subject to the claims it may mount, held by the control plane or Context Service rather than asserted by the caller. The harness checks it before forwarding claimName. Alternatively, Context Service scopes claim names per subject (for example a subject-derived prefix or label) and refuses a claim outside the caller's scope.
Subject-scoped workload names, so one user's name neither collides with nor reveals another's (for example keying sh:workload:<subject>:<name>, or subject-prefixed pool names).
Once those exist, lift the claim_name_not_allowed stop-gap, with tests that Alice cannot name Bob's claim and can name her own.
Context
docs/context-service.md ("Security boundary") and docs/specs/2026-09-28-moca-multi-user-isolation-design.md §4.3 and §13 ("Per-subject PVC authorization and subject-scoped workload names") record this. It was found in round 2 of #350's review.
Activity
feat: /workloads phase 1 — owner-bound workloads with a Context
docs(spec): satisfy prettier on the rossoctl#358 spec
docs(spec): per-subject claim names design for #358
Merge pull request #543 from pdettori/fix/358-subject-claim-names
fix(workloads): tell a repeated delete from a wrong id
feat(mocactl): add `workloads list` (rossoctl#552)
feat(mocactl): list your own config bundles (bundles list)