Design Guide: Tenant-Isolated Storage and Export for AI-Generated Images
The article argues that tenant isolation should be enforced as a storage invariant rather than added as a filter during export, since a mixed-tenant export would be a security incident. It recommends storing each image under a tenant-scoped object key and recording its metadata, including checksum, media type, and prompt revision, in a database where tenant_id is part of every lookup. Exports are built from a per-tenant snapshot of ready records, streamed into an archive with a manifest, and delivered through an authorization check instead of a public bucket. The author stresses that client-supplied filenames and model-generated metadata are untrusted, so the server should derive object keys from authenticated context and generated IDs. An illustrative Python storage adapter and an acceptance test using two tenants with similar asset names are included to verify the isolation boundary.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in