Skip to content

Feature Request: Direct-serve via presigned URL #96

Closed

Description

@jmealo

I'm experimenting with adding Azure Blob Storage support and noticed that direct serving isn't implemented for S3 yet.

Proposed Implementation:

  • Unified Signed URLs: Instead of writing separate SDK code paths for Azure and S3, we can leverage gocloud.dev/blob. A single call to blob.Bucket.SignedURL(ctx, key, &blob.SignedURLOptions{Method: "GET", Expiry: ttl}) already works for both drivers under the hood (generating SigV4 for S3 and User Delegation SAS for Azure).
  • Security Policy Flag: We need to introduce a per-handler CanDirectServe() policy flag. This ensures we don't accidentally leak artifacts from authenticated upstreams via public presigned URLs.
  • Refactor Cache-Hit Accounting: Currently, cache hits are counted on the io.Copy path. Because issuing a 302 redirect will bypass io.Copy, we need to move the accounting logic higher up so we don't lose those metrics.
  • Managed Identities / Workload Identity should work here, as it's supported in gocloud.dev/blob

Activity

  1. andrew commented on Apr 27, 2026

    @andrew
    Contributor

    Opened a pr for it over here: #97

  2. added a commit that references this issue on May 1, 2026
    c73b0a3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions