Problem
Volume names form a single global namespace shared across all API keys, and a volume's name is used verbatim as its stable ID. This surfaces in two ways:
-
Name collision across callers. handleCreateVolume sets volumeID = req.Name when a name is supplied, and VolumeRecord.Name carries a uniqueIndex. Two independent callers that pick the same volume name cannot coexist — the second POST /volumes fails with 409 volume already exists. Common names (data, cache, workspace) collide immediately.
-
No ownership boundary. GET /volumes returns every volume regardless of the authenticated caller, and Sandbox.create(volume_mounts=…) resolves a volume purely by name with no ownership check, so any authenticated caller can enumerate and mount any other caller's volume.
A UUID is only generated when the caller omits the name entirely; the official SDK's Volume.create(name) makes name mandatory, so in practice every SDK-created volume is keyed by the human-supplied name.
Question
Is per-tenant (per-API-key) volume scoping on the roadmap? Concretely: is the intended model that volume names be unique per owner rather than globally, with an internal opaque ID as the stable key — so that different callers may reuse the same human-readable name, and list/attach are scoped to the owner?
Environment
Observed on master (CubeMaster/pkg/service/httpservice/cube/volume.go, CubeMaster/pkg/base/db/models/volume.go, CubeAPI/src/handlers/volumes.rs).
Problem
Volume names form a single global namespace shared across all API keys, and a volume's name is used verbatim as its stable ID. This surfaces in two ways:
Name collision across callers.
handleCreateVolumesetsvolumeID = req.Namewhen a name is supplied, andVolumeRecord.Namecarries auniqueIndex. Two independent callers that pick the same volume name cannot coexist — the secondPOST /volumesfails with409 volume already exists. Common names (data,cache,workspace) collide immediately.No ownership boundary.
GET /volumesreturns every volume regardless of the authenticated caller, andSandbox.create(volume_mounts=…)resolves a volume purely by name with no ownership check, so any authenticated caller can enumerate and mount any other caller's volume.A UUID is only generated when the caller omits the name entirely; the official SDK's
Volume.create(name)makesnamemandatory, so in practice every SDK-created volume is keyed by the human-supplied name.Question
Is per-tenant (per-API-key) volume scoping on the roadmap? Concretely: is the intended model that volume names be unique per owner rather than globally, with an internal opaque ID as the stable key — so that different callers may reuse the same human-readable name, and
list/attach are scoped to the owner?Environment
Observed on
master(CubeMaster/pkg/service/httpservice/cube/volume.go,CubeMaster/pkg/base/db/models/volume.go,CubeAPI/src/handlers/volumes.rs).