Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Course Image Isolation: 5 Private-Bucket Controls for Resizing and Signed URLs

Short answer: keep course media in a private bucket, authorize direct uploads against a server-owned tenant record, let a worker create a fixed set of thumbnails, and mint a signed URL only after the application rechecks tenant access to the finished derivative. The resize library is not the security boundary. The binding among tenant, source object, transform, and derivative is. I've been paged…

The key to securing media files lies in isolating them within a private bucket and managing uploads, transformations, and access through a series of controls. First, create a media record before allowing an upload, binding an opaque media ID to the authenticated tenant, a server-derived source key, allowed content class, and a limited set of permitted derivatives.

This central invariant ensures every subsequent operation derives storage locations from the tenant ID and media ID pair, preventing filename-based collisions and disclosure bugs.

Next, establish an authority matrix to clearly define the permissions of each actor before deciding on the physical bucket layout. This approach is more effective than relying solely on vendor feature lists, as shared credentials can undermine even the most carefully designed key schemes. Actors such as the browser uploader, resize worker, application signer, and operator each have specific roles and permissions that must be explicitly defined.

For resizing, treat each resize message as a reference to trusted state rather than a self-authorizing command. The worker should receive the tenant ID, media ID, transform name, and immutable source identity, then load the media record, recompute the source and destination keys, and only permit transformations from the allowed catalog.

Outputs must be deterministic, ensuring that for a specific immutable source identity and transform name, every delivery addresses the same derivative key. This prevents duplicate deliveries from inventing new owners or output locations, even if the same task is completed multiple times.

Finally, after the client reports completion, verify the expected source object against the existing media record before advancing the state of the media. This separation between "upload was authorized" and "the expected source is present" is crucial, as a worker must not infer ownership from a queue message or a client assertion.

The state sequence should be created, upload_authorized, source_verified, derivatives_pending, and ready, with transitions conditional on the current expected state. This approach ensures that messages can arrive multiple times or late without timing dependencies affecting authorization.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Why Client Emails Land in Spam After DNS Migrations (SPF 10-Lookup Limit, Duplicate DMARC & Cutover Diffing)

Every freelance web developer has lived through this exact horror story: you migrate a client's domain to Cloudflare, the new website loads in 120ms, SSL is green—and 3 hours later the client calls in…

  • Clients experience email deliverability issues after domain migrations to services like Cloudflare
  • Duplicate dmarc or v=spf1 records cause deliverability problems; merging with commas resolves issue

PrismML Ternary Bonsai 2.5 27B: A Local Setup Guide

The 5.9GB open model targets local coding agents, but choosing the right download matters as much as its compressed size.

  • PrismML releases 5.9GB Ternary Bonsai 2.5 27B model on November 24, 2026
  • Model designed for coding agents with llama.cpp fork requirement
  • Offers three GGUF packings (PTQ10, PQ20, Q20) and Apple MLX package

Building a Numerical Analysis HTTP Endpoint with greenServeFE

I've been working with the gs_compute and server native modules in greenServeFE . Here's a small example that combines numerical computation with an HTTP endpoint.

  • greenServeFE integrates numerical computation and HTTP server functionality
  • /api/analysis GET route provides statistical analysis and linear equations solution
  • Program runs on greenServeFE server, port 8080, accessible for analysis

More from Thursday 26 November →