Skip to content

Fix fakefront S3 compatibility for moto [RHELDST-44306] - #769

Merged
crungehottman merged 1 commit into
release-engineering:masterfrom
crungehottman:signed-fakefront-s3-reqests
Aug 21, 2026
Merged

Fix fakefront S3 compatibility for moto [RHELDST-44306]#769
crungehottman merged 1 commit into
release-engineering:masterfrom
crungehottman:signed-fakefront-s3-reqests

Conversation

@crungehottman

Copy link
Copy Markdown
Member

Two changes to fakefront's S3 session for compatibility with spec-compliant S3 implementations (e.g. moto):

  1. Sign requests with AWS SigV4. Per the S3 API spec, response override query parameters (e.g. response-content-type) require authenticated requests; unsigned requests return 403. This adds SigV4 signing using the same credentials already configured via environment variables.

  2. Stream S3 response bytes without transparent decompression. The requests library auto-decompresses Content-Encoding: gzip bodies via urllib3, but fakefront passes the original S3 headers (including Content-Encoding: gzip) through to the client unchanged. This mismatch causes ContentDecodingError on the client side. Using raw.stream(decode_content=False) preserves the original bytes, keeping headers and body consistent.

Both changes are backwards-compatible with LocalStack, which accepts signed requests and does not set Content-Encoding: gzip.

Two changes to fakefront's S3 session for compatibility with
spec-compliant S3 implementations (e.g. moto):

1. Sign requests with AWS SigV4. Per the S3 API spec, response override
   query parameters (e.g. response-content-type) require authenticated
   requests; unsigned requests return 403. This adds SigV4 signing using
   the same credentials already configured via environment variables.

2. Stream S3 response bytes without transparent decompression. The
   requests library auto-decompresses Content-Encoding: gzip bodies via
   urllib3, but fakefront passes the original S3 headers (including
   Content-Encoding: gzip) through to the client unchanged. This
   mismatch causes ContentDecodingError on the client side. Using
   raw.stream(decode_content=False) preserves the original bytes,
   keeping headers and body consistent.

Both changes are backwards-compatible with LocalStack, which accepts
signed requests and does not set Content-Encoding: gzip.
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0cea8d21-ee49-43cb-88dc-c3f993b2fae1


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

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

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3b44659) to head (7e309a5).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #769   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          340       340           
=========================================
  Hits           340       340           
Flag Coverage Δ
unit-tests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@crungehottman
crungehottman merged commit 6b6cd34 into release-engineering:master Aug 21, 2026
5 checks passed
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