Support SigV4 presigned URL verification

Open
#39 0 comments 0 reactions 0 assignees View on GitHub

@alukach is already working on this.

Since Jul 22, 2026.

  • #125 by @alukach — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
58/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
aws, rust

Research direction

Read resolve_identity() in auth/identity.rs and parse_sigv4_auth() in auth/sigv4.rs first. Trace the existing CredentialRegistry and TokenKey resolution, then compare the header-based canonical request handling with the requirements in the issue. Done means valid SigV4 query parameters authenticate, X-Amz-Signature is excluded from canonicalization, UNSIGNED-PAYLOAD is used, and X-Amz-Expires is enforced.

Written by the indexing model from the issue text.

Description

Problem

The auth module only supports header-based SigV4 authentication (the Authorization header). When no Authorization header is present, the request is treated as anonymous.

AWS S3 presigned URLs encode the signature in query parameters instead:

  • X-Amz-Algorithm
  • X-Amz-Credential
  • X-Amz-Date
  • X-Amz-Expires
  • X-Amz-SignedHeaders
  • X-Amz-Signature
  • X-Amz-Security-Token (for temporary credentials)

Currently these are ignored, so presigned URLs generated with STS credentials are treated as anonymous requests.

Why it matters

Presigned URLs are commonly used for:

  • Direct <img>/<a> tags in browsers (can't set Authorization header)
  • Sharing time-limited download links for restricted data
  • Any context where the HTTP client can't set custom headers

Without this, the STS credential flow only works for SDK-based requests that set the Authorization header.

What needs to change

  1. resolve_identity() in auth/identity.rs — when the Authorization header is absent, check query parameters for X-Amz-Algorithm=AWS4-HMAC-SHA256 before falling back to anonymous.

  2. parse_sigv4_auth() in auth/sigv4.rs — add a parallel code path (or new function) to extract credential, signed headers, and signature from query parameters instead of the header.

  3. Signature verification — presigned URL canonical requests differ from header-based ones:

    • The X-Amz-Signature parameter is excluded from the canonical query string
    • The payload hash is always UNSIGNED-PAYLOAD
    • Expiration (X-Amz-Expires) must be validated
  4. Credential resolution — the existing CredentialRegistry + TokenKey resolver should work as-is once the access key is extracted from the query string.

References

Dominant language
Rust
Stars
21
Forks
1
Avg merge
16h 39m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from developmentseed/multistore

All issues in developmentseed/multistore

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.