Urgent.News

What's breaking now, across hundreds of outlets.

Tech

How to Operate Private File Uploads: Signed Downloads with Tenant Isolation

Short answer: Use a private file upload architecture in which the app assigns every e-commerce training artifact a tenant-scoped object storage key, then gives the browser separate signed upload and download grants. The control plane must own region, validation state, and an immutable deletion deadline; possession of an object key must never be enough to mint a download. Fail closed. That shape…

To operate private file uploads, assign every e-commerce training artifact a tenant-scoped object storage key. The app provides separate signed upload and download grants to the browser. The control plane manages region, validation state, and deletion deadline. Possession of an object key does not grant download rights. Treat signed URLs as temporary capabilities, not proof of read access.

Implement four states: pending, quarantined, ready, and deleting. Upload artifacts into quarantine, verify the stored object, then promote to ready for downloads. Persist delete_at at creation time, not recalculated from policy. The control plane and data plane should be separate. The app API is the control plane, generating an opaque object key, recording ownership and retention, and requesting scoped upload or download grants from a storage signer.

The browser-to-object-storage request is the data plane, carrying bytes but not deciding tenant, bucket, region, object key, or expiration. Do not store signing credentials in browser code. Follow OWASP's secrets guidance, centralizing and limiting access to secrets, using authorized uploaders, generated filenames, size limits, and storage outside the webroot or on a separate host.

Use an application-level record with fields like tenant_id, authenticated server context, authorization boundary, object_key, storage address, region, and delete_at for policy reproducibility. Separate buckets or accounts may be necessary for contractual isolation, separate administrative ownership, or independent encryption authority.

Implement a tenant grant control plane using Go, with a Signer adapter to connect to an object store. The demo signer returns inert example URLs for local testing; production code must return real signed grants from a server-side implementation.

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

Text vs Binary Export in GBase Database: A Reproducible Performance Comparison

Which database export method is faster: text or binary? There are plenty of performance comparisons online, but their results rarely apply directly to your environment.

  • Text export provides visibility and flexibility for selective review
  • Binary export is faster but less transparent and has compatibility constraints
  • Verification effort and artifact size differ between text and binary methods

A delivery web app still ships its route-optimizer heuristic to every driver

Delivery and field-service web apps love to show an optimized stop list the moment a driver opens the shift. That snappy UX usually means the scoring heuristic — distance, time windows, vehicle…

  • Heuristic runs in driver's browser, accessible to everyone
  • Numbers in functions tied to enterprise clients' SLAs
  • Critical components must be computed on server side

More from Tuesday 24 November →