Cloudflare Can Now Sign Private S3 Reads. Who Gets the File?
Cloudflare’s November 27 announcement adds HMAC signing, SigV4 key derivation, and automatic UTC date formatting to Rules. Request Header Transform Rules can use them to authenticate reads from private S3 and Google Clou
Cloudflare’s November 27 announcement adds HMAC signing, SigV4 key derivation, and automatic UTC date formatting to Rules. Request Header Transform Rules can use them to authenticate reads from private S3 and Google Cloud Storage buckets. That can simplify an origin connection. Before putting a media library behind it, answer a separate question: which caller should receive which file?
Disclosure: This article was generated with AI assistance from the linked public sources. The access-review exercise below is proposed.
Cloudflare’s implementation guide makes the distinction explicit: visitors matching a signing rule can cause an authenticated origin read. Protecting the visitor-facing hostname requires a separate access decision. A successful download through that hostname proves a working route; it does not establish that the reader was entitled to the content.
Start with the asset’s job
In my historical Cloud Media Distribution build, a Flask control panel coordinated an S3 media library and remote Windows publishing workers. The 2023–2024 implementation stored media alongside coordination material such as captions and selected paths. Workers staged files locally for account-specific publishing flows.
That architecture gives a useful reason to distinguish storage from delivery. A video waiting for a publishing worker, its accompanying caption, and an internal coordination file can live in the same storage system while having different intended readers. Putting a simpler download address in front of storage does not resolve those differences.
For a hypothetical rebuild, I would begin with a small asset inventory: who prepares an item, which worker needs it, and whether anyone outside that workflow should retrieve it. A publicly released clip might eventually have a public delivery path. A queued clip could remain restricted to its assigned workflow. Coordination records would have their own access decision.
These are proposed delivery choices, rather than a description of a Cloudflare integration in the historical system.
Whose permission reaches S3?
AWS documents IAM policies in terms of principals, actions, resources, and conditions. A storage credential can be allowed to read an object. The application still needs to decide whether the person or worker asking the proxy should benefit from that permission.
Consider an illustrative test library containing one clip assigned to Worker A and another assigned to Worker B. If a shared origin identity can read both, accepting a path from either worker and signing it is too broad for that proposed assignment policy. A correct signature for Worker B’s file would be entirely compatible with an incorrect application decision to give it to Worker A.
I would resolve the requested asset to a known record, check the caller’s permitted workflow, and allow the origin fetch only after that decision. The exact enforcement mechanism depends on the application. The acceptance condition can stay concrete: Worker A receives its assigned fixture and cannot retrieve Worker B’s fixture by changing the requested asset.
This also helps explain why a bucket’s “private” status is an incomplete delivery review. S3 Block Public Access constrains public access granted through S3 policies and ACLs. A proxy using permitted credentials is a different route to the bytes. Review the caller-facing route as well as the bucket configuration.
Exercise the visitor boundary and the origin boundary
Use harmless fixtures in an isolated test environment. Write down the expected result before each request: the assigned worker gets the intended bytes; an unapproved caller gets no fixture bytes; an approved caller requesting the other assignment also gets no fixture bytes. Record where the decision was enforced.
Then deliberately break the storage authentication in that test environment and repeat an allowed read. Cloudflare’s guide recommends bypassing caching throughout validation, including an incorrect-secret test, so a cached success cannot conceal an origin-authentication failure. It also checks that an unsigned direct-origin request fails.
Those checks answer different questions. A rejected direct-origin request tells you something about the storage boundary. The wrong-worker request tests the application’s assignment rule. Neither result substitutes for the other.
Before enabling caching in production, test the intended access policy after an allowed fetch has populated the cache. In the proposed two-worker exercise, repeat the unauthorized request against that same fixture. Keep the expected outcome tied to access to the bytes, rather than assuming that a particular HTTP error code proves the whole design.
The vendor example is deliberately narrow: bodyless GET and HEAD reads of one object with no query string. Expanding it into a general media gateway requires additional design. Use the complete guide when evaluating implementation details.
Assign an owner to the signing configuration
The launch makes these signing functions available on Pro, Business, and Enterprise plans. It does not remove credential maintenance. Cloudflare warns that secrets embedded in expressions are visible to people who can read the rule configuration.
For the proposed rebuild, the handoff would identify who can edit the delivery route, who can read its configuration, and who maintains its storage identity. Keep fixture results beside that handoff: allowed asset, denied assignment, failed origin authentication, and behavior after a cache fill.
A maintainer investigating “the clip downloads” could then ask which result changed. The storage connection may be healthy while the assignment check is wrong—or the caller may be authorized while the origin credential has stopped working. The release evidence should make those cases distinguishable.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.