Skip to content

fix(s3-signer): sign only allowlisted query parameters and headers - #2102

Merged
brgr-s merged 5 commits into
mainfrom
harden/s3-signer-object-allowlist
Oct 15, 2026
Merged

brgr-s merged 5 commits into
mainfrom
harden/s3-signer-object-allowlist

Conversation

@c-thiel

@c-thiel c-thiel commented Oct 8, 2026 •

Copy link
Copy Markdown
Member
  • Each kind of request (object, list, DeleteObjects) has an allowlist of query parameters, and every x- header must be allowlisted; anything else is refused. The policy lives in s3_signer/policy.rs.
  • ACLs grant only the bucket owner, storage classes are readable without a restore, and objects are encrypted with the warehouse's KMS key, or with S3-managed keys when it has none. Customer-provided keys only read.
  • Copies are signed when their source lies inside the table.
  • Object versions may only be read.
  • Header names must be ASCII tokens without _.

Summary by CodeRabbit

  • New Features
    • S3 request signing supports copy requests and checks query parameters, headers, object locations, and version information before signing.
    • Signing preserves supported streaming-trailer payloads and handles header names without regard to capitalization.
  • Bug Fixes
    • Rejects ambiguous or unsupported request inputs, including repeated parameters, versioned bulk deletes, and copy sources outside the authorized table.
  • Documentation
    • Added guidance on remote-signing security, credential use, and the limits of relying on object tags for access or lifecycle rules.

- Each kind of request (object, list, DeleteObjects) has an allowlist of
  query parameters, and every `x-` header must be allowlisted; anything
  else is refused. The policy lives in `s3_signer/policy.rs`.
- ACLs grant only the bucket owner, storage classes are readable without
  a restore, and objects are encrypted with the warehouse's KMS key, or
  with S3-managed keys when it has none. Customer-provided keys only read.
- Copies are signed when their source lies inside the table.
- Object versions may only be read.
- Header names must be ASCII tokens without `_`.
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ecf8c1fd-c8fe-4662-a4d5-5017e4ac964f
📥 Commits

Reviewing files that changed from the base of the PR and between 5be4a5c and 03e02b1.

📒 Files selected for processing: 7
  • .github/workflows/integration_test_matrix.yml
  • crates/lakekeeper/src/server/s3_signer/policy.rs
  • crates/lakekeeper/src/server/s3_signer/sign.rs
  • docs/docs/storage.md
  • tests/README.md
  • tests/python/tests/test_pyiceberg.py
  • tests/python/tox.ini
🚧 Files skipped from review as they are similar to previous changes: 1
  • docs/docs/storage.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

The S3 signer now validates request parameters and headers, parses affected object locations for supported request types, and rejects ambiguous or unsupported inputs. Storage documentation adds guidance about remote-signing limits. The integration test matrix and test runner include an AWS remote-signing test environment.

Changes

S3 Signing Policy and Request Parsing

Layer / File(s) Summary
Query and header policies
crates/lakekeeper/src/server/s3_signer/mod.rs, crates/lakekeeper/src/server/s3_signer/policy.rs, crates/lakekeeper/src/server/s3_signer/sign.rs
Adds request-specific query allowlists and header validation. Checks include repeated parameters, version changes, ACLs, storage classes, encryption rules, and removal of the former request-access rejection helpers.
Request classification and locations
crates/lakekeeper/src/server/s3_signer/sign.rs
Classifies object, list, and delete requests. Parses copy sources and bulk-delete identifiers, rejects versioned changes, and checks for ambiguous keys and paths.
Signer validation and integration
crates/lakekeeper/src/server/s3_signer/sign.rs, docs/docs/storage.md, .github/workflows/integration_test_matrix.yml, tests/README.md, tests/python/*
The signer validates hosts and headers before parsing requests, preserves the unsigned streaming-trailer payload mode, and replaces matching client headers case-insensitively. Tests and runner configuration add AWS remote-signing coverage. Storage guidance describes remote-signing limits and object-tag considerations.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant Signer
  participant RequestPolicy
  participant RequestParser
  Client->>Signer: Submit S3 request
  Signer->>RequestPolicy: Validate host, headers, and query parameters
  Signer->>RequestParser: Classify request and parse affected locations
  RequestParser-->>Signer: Return parsed locations
  Signer-->>Client: Return signing result
Loading

Suggested reviewers: brgr-s

Merge Risk: ⚪ Minimal · up to 03e02

This change limits S3 remote signing to allowlisted query parameters and headers, and checks copy sources and delete keys against the table location. Remaining review found no unresolved defects, so the change appears ready to merge.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 69.88% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 83 functions across 4 files. (4 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: restricting S3 signing to allowlisted query parameters and headers.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 69.88% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 83 functions across 4 files. (4 skipped: 4 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks each header’s name,
And counts query keys the same.
It maps the source and bucket path,
Then signs the request after the math.
The test runner joins the trail,
While carrots wait beside the pail.

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 8, 2026
…ct-allowlist

# Conflicts:
#	crates/lakekeeper/src/server/s3_signer/sign.rs
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ PR Title Formatted Correctly

The title of this PR match the correct format. Thank you!

@brgr-s
brgr-s merged commit 58520c8 into main Oct 15, 2026
79 checks passed
@brgr-s
brgr-s deleted the harden/s3-signer-object-allowlist branch October 15, 2026 14:16
brgr-s added a commit that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants