Your proxy can become an unintended sharing bridge
A backend that fetches any user-provided job ID with one account key can expose another customer's private result. The same issue applies to uploaded reference IDs and internal task records. Resource IDs should be references to authorized data, not passwords that substitute for a real ownership check.
What to do next
- 01
Store ownership at creation
Associate the internal task, approved payload and returned job ID with the requesting tenant and user. Keep that association durable through queue workers and retries.
- 02
Authorize every operation
Before polling, downloading or reusing a reference, load the server-side ownership record for the signed-in user. Ignore arbitrary owner fields supplied by the browser.
- 03
Test cross-user denial
Use fixtures representing two application users under one remote account. Verify that one cannot request the other's task or media through your own backend, without needing paid generations.
A concrete example
Illustrative attack path: a user edits a URL to contain another internal job ID. A correctly designed application denies access before calling the remote content route, even though its account-wide key could retrieve the underlying asset.
Before you call it ready
- Every task has an application owner.
- The server checks ownership on retrieval.
- Cross-user denial is tested deliberately.
When to stop or choose another method
If your proxy relies only on a hard-to-guess identifier, fix authorization before serving private media. Do not make customer outputs public to simplify frontend access.
