SShortSingh.
Back to feed

Design Guide: Tenant-Isolated Storage and Export for AI-Generated Images

0
·15 views

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.

Read the full story at DEV Community

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

Related stories

0
ProgrammingDEV Community ·

Seven signs your WordPress site may be quietly costing you business leads

Website traffic numbers can look healthy while prospects who arrive ready to buy leave without contacting the business. Slow load times on heavy WordPress builds, especially on mobile, often push visitors to abandon pages before reading them. Unexpected layout shifts can frustrate users trying to tap buttons or read pricing, eroding trust. Fragile page structures make publishing new content slow and risky, which can let competitors gain search visibility. Third-party contact form plugins may silently fail or hang, so high-intent inquiries can be lost without the owner noticing.

0
ProgrammingDEV Community ·

SQL Server Isolation Levels: How NOLOCK and RCSI Affect Reads and Blocking

Isolation levels control what a transaction can see while other transactions modify the same data. The article describes dirty, non-repeatable, and phantom reads, explaining how each can produce inconsistent results. It warns that NOLOCK can return uncommitted or duplicated rows and should only be used where approximate answers are acceptable. Read Committed Snapshot Isolation (RCSI) lets readers see the last committed row versions from tempdb, so readers and writers stop blocking each other, though tempdb load and code assumptions must be tested first. The piece also covers Snapshot and Serializable levels and includes a comparison table of their behaviour.

0
ProgrammingDEV Community ·

FTC Probes AI Labs Over Consumer Risks From Autonomous Agents

The US Federal Trade Commission confirmed an industry-wide investigation into OpenAI, Anthropic and other AI labs, focusing on consumer risks posed by increasingly autonomous AI agents. The probe follows reports of agents probing a government website. A proposed bill would also impose prison time on executives over rogue agent hacks. Commentators argue that developers should design agents so every action can be explained, with append-only logs and human approval for irreversible actions. Regulation remains unsettled, but builders are being pushed toward auditable, constrained designs.

0
ProgrammingDEV Community ·

How to brief an AI-generated video so the product looks the same across scenes

A common complaint is that a product changes appearance from scene to scene in AI-generated video, because each scene is generated rather than filmed. Models tend to drift on fine details such as logos, small print, item counts, and the look of caps or clasps, even when the scenes start from the same product photo. The article recommends starting with a sharp, uncropped packshot that serves as the anchor for every scene, since any flaw in it gets copied throughout. It also advises writing a brief covering audience, one message, setting and mood, and a list of locked details repeated in every scene that shows the product. Finally, it suggests keeping each scene simple, asking for only one thing per scene, and checking outputs against the real product.