— Infrastructure

Signed download URLs: expiry is not the same as ongoing account authorization

Design signed report downloads with authorization at issuance and renewal, bounded bearer-link exposure and separate expiry and account-removal tests.

4 min readUpdated 2026-11-05By AptixLabs studio
A violet visitor pass rests beyond an account checkpoint with a separate return path.AptixLabs · 2026-11-05

AI-generated conceptual illustration. The article’s labelled figure explains the technical mechanism.

A signed download URL is a time-limited capability, not a continuous account-membership check. Authorize the request that issues it, keep its lifetime and exposure bounded, and recheck account access before renewing it. Someone possessing an active URL may be able to use it without the application's login session. Expiry, account removal and deletion of the underlying artifact are separate events.

Put issuance behind normal application authorization

A synthetic report-download endpoint should verify the requester, resolve the report's workspace and check current access before signing anything. The model or browser can supply a report identifier, but the server chooses the permitted object and method. Avoid accepting an unrestricted storage path and signing whatever object the caller named. Record a stable report ID and authorization outcome instead of logging the signed query string.

Google Cloud Storage documents signed URLs as time-limited access usable by anyone in possession while active. Its documentation also specifies the supported access endpoint behavior. This is why a successful application logout or membership removal should not automatically be described as invalidating every already issued URL. Check the provider's actual credential and object controls when designing revocation.

Google Cloud Storage: signed URL possession and expiry

A report view outlives its first link

In a fictional workflow, Mira opens a report page and receives a short-lived URL. She pauses, returns after expiry and tries to download. The application should recognize an expired artifact-access state and request renewal through its authenticated endpoint. That endpoint must check Mira's current membership and report eligibility again. It must not renew merely because the browser still holds the previous URL or an old success flag.

Proposed signed-download state matrix
StateExisting linkRenewal decision
Permitted member, active linkProvider capability validNot yet needed
Permitted member, expired linkExpiredRecheck and issue if eligible
Removed memberMay persist until provider boundaryDeny replacement
Artifact removedObject unavailableExplain retention or regeneration
Account request: Current membership check; Signed access: Possession plus expiry; Download view: May outlive link; Renewal: Reauthorize report access
Original explanatory figure of a synthetic or proposed design; not a deployed product screenshot. View full size

The table is a proposed behavior contract, not an executed storage experiment. Choose the actual duration from the workflow and provider limits; this guide does not prescribe one universal number. Very short lifetimes increase renewal and retry complexity, while long lifetimes increase exposure if a URL is shared. Keep the expiry visible where it helps the user, without placing secret-bearing links in screenshots or support messages.

Separate artifact identity from bearer access

Persist a report ID and generation metadata in durable application state. Generate the bearer URL only when needed and avoid storing it in long-lived chat memory. If the artifact changes, decide whether the same report ID refers to an immutable generation or a moving latest object. A user reviewing an audit report needs to know which version was downloaded, not just which friendly filename was displayed.

Proposed renewal contract
POST /reports/{report_id}/download-access
inputs: authenticated account plus report identity
server checks: current membership, report ownership, retention
output: short-lived access plus expiry metadata
logs: report ID and outcome; omit signed URL

Do not make the URL's presence in a cache an authorization decision. Browser history, analytics collection, referrers, logs and shared documents can all expand where a capability appears. Review cache headers and delivery paths according to the sensitivity of the artifact. A signed URL can be useful precisely because it delegates a bounded download, but that delegation should be deliberate and visible to operators.

Test expiry and membership changes independently

Use a disposable object containing fictional data. Test before expiry, after expiry, renewal while permitted, renewal after membership removal and a missing object. Also inspect how the browser or client handles partial downloads and retries; do not promise that expiry interrupts every transfer at an identical byte boundary without verifying provider behavior. The timestamp governing request acceptance and an already established transfer can have distinct semantics.

No Cloud Storage request was executed for this article. The example is a proposed access-and-renewal contract, and a source helper that creates a signed URL does not establish the caller's authorization or a deployed revocation policy. If immediate per-request account checks are essential, compare an authenticated download proxy or another provider-supported design. Make that tradeoff explicit before selecting convenience, caching and transfer behavior.

Multi-tenant SaaS data isolation with FastAPI and PostgreSQL

Building UltraFit360: the app, coach portal and shared backend

Bring one API or data workflow and a sanitized failure example for a bounded implementation assessment.

AptixLabs saas development

Does a signed download URL keep checking account authorization?

Usually it grants access by possession until its documented expiry; authorize issuance and renewal separately and verify provider-specific revocation behavior.

Does logging out revoke every signed URL?

Do not assume so. Check the provider’s capability and credential rules; application logout is a separate boundary.

What should renewal check?

Current identity, membership, report ownership, retention and any other eligibility required before issuing replacement access.

Need help with b2b saas development for connected customer workflows?

Tell us about your product, existing stack and the problem you need to solve. We can discuss integration scope, implementation tradeoffs and a practical first milestone.

Start a conversation