Launch offer: the first 1,000 users get Settl free for a year* Claim your spot
settlbuilding in public

Stop making the whole bucket public. Pre-sign the one file instead.

If you have been vibe coding for a while and wiring up file storage, you have hit this wall: the app needs to show one image, or let one user download one PDF, and the fastest fix that Stack Overflow hands you is to flip the bucket to public. It works in five minutes and it is wrong in a way that does not show up until someone finds it. I build Settl, an expense-splitting app, solo with Claude, and here is the actual fix — delegated access via pre-signed URLs — how it works, and the prompts that build it right.

A public bucket is not "share one file." It is "share every file, forever."

You wanted one receipt image visible on one screen. A public bucket makes every object in it readable by anyone who can guess or enumerate a key — every other user's receipts, every draft upload, every file you forgot was in there. There is no "just this one" setting on a bucket ACL; public is public.

Delegated access: permission to one thing, for a short time

The fix is not "make it private and build an API to proxy every byte." It is delegated access — your server, which already trusts the credentials, hands out a narrow, time-boxed permission slip for one object instead of handing out the credentials themselves.

A pre-signed URL is that permission slip. It is a normal link with a cryptographic signature glued onto the query string — ?X-Amz-Signature=...&X-Amz-Expires=.... The signature encodes exactly which object, which operation (GET or PUT), and until when. Nothing else in the bucket is exposed, and the moment the URL expires it is worthless.

Where the opportunities hide

Copy these prompts

1. Find every public or unscoped storage access in the codebase

Search this codebase for direct storage/bucket access. Report every place
that (a) reads a bucket policy or ACL setting it to public, (b) builds a
URL directly from a bucket + key with no signature, or (c) serves
user-uploaded files through a public path. For each, give me: file:line,
the bucket/path involved, and whether the ACL is public. Change nothing.
I want the list.

2. Check what your storage provider's signing API actually supports

Read the SDK installed under node_modules (or the docs I paste) for
<S3 / GCS / R2 / Supabase Storage>. Tell me: the exact function that
generates a pre-signed URL, whether it supports GET and PUT, the max
expiry it allows, and whether it can scope to content-type or file size.
Mark anything you cannot verify against a real file as UNVERIFIED.

3. Build the signer correctly

Write a pre-signed URL endpoint for <provider>. Requirements, in order:
1. Verify the caller is authorized for THIS SPECIFIC OBJECT before signing
   anything — the signature is not the authorization check, your server is.
2. Set the shortest expiry that the use case tolerates (seconds for a
   one-time download, minutes for an upload flow) — never default to hours.
3. For uploads, scope the signature to content-type and max size so a
   signed PUT cannot be used to upload something else.
4. Never log the full signed URL — it IS a bearer credential until it
   expires. Log the object key instead.
Show me the route, the authorization check, and a test that requests a
URL for an object the caller does NOT own and confirms it is rejected
before any signature is generated.

4. Audit and lock down existing public buckets

List every bucket/container in this project's infra config. For each,
show me its current ACL. For any that are public, propose the pre-signed
URL replacement for each code path that reads from it, and the exact ACL
change to make it private. Show me the diff for the ACL change and the
new signing endpoint separately — I want to review the lockdown before
anything touches production data.

The two things people get wrong

They treat the signature as the authorization. Anyone who can call your signing endpoint gets a valid signature — the check for "does this caller actually own this object" has to happen before you sign anything, not be implied by the fact that a signed URL exists.

They set the expiry to whatever the SDK defaults to. Most SDKs default to an hour or more. A one-time receipt view needs seconds, not an hour a link could sit in someone's browser history.

When public really is fine

A CDN-fronted asset that is meant to be public — your app icon, a marketing image, a font file — doesn't need signing. Pre-signing is for objects where "who can see this" is actually a question: user content, receipts, private documents, anything uploaded rather than shipped.

Run this on your codebase

Audit this project's storage access for anything that should be
delegated instead of public.

1. Find every bucket/container ACL, every direct bucket-URL reference,
   and every user-uploaded file served without a per-object check.
2. For each, state whether it is currently public, proxied, or signed.
3. Rank the list by how sensitive the content is (auth-only user
   uploads first, static assets last).
4. Change no code. I want the ranked list, then the one endpoint I
   should build first with the four requirements: authorize before
   signing, shortest workable expiry, scope uploads to content-type
   and size, never log the raw signed URL.

Get the next one in your inbox