Repository navigation
fix(s3): stop storing and returning the server-side encryption header - #14990
Conversation
The gateway stored the x-amz-server-side-encryption request header as object metadata and returned it on PutObject, GetObject and HeadObject, including for multipart and copied objects. Gateway buckets require Appwrite encryption to be disabled and objects are stored as sent, so the response header reported encryption that was not applied. Other x-amz-* request headers the gateway does not implement (storage class, tagging, ACL grants, object lock) are accepted and ignored, so the encryption header now follows the same rule. Requests that send it still succeed, and responses omit the header, which is how S3 reports that no server-side encryption was applied. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Review complete. No blocking issues — approved ✅; 1 nitpick below. 🧹 Nitpicks (1) — 🟢 1 low
The change strips server-side-encryption header handling from the S3 proxy layer and pins the new contract with e2e assertions. Verification found the removal consistent across source and tests, with only stale documentation left behind.
Reviewed commit: 78b4643 |
🟢 Tier S · Ready to mergeThe S3 gateway no longer stores or returns
📂 Walkthrough · 6
Reviewed |
Security rulesNo new WARNING or ERROR findings from security rules. 6 existing findings tracked in
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
commit: |
|
@hansi-codes review |
What does this PR do?
The S3 gateway stored the
x-amz-server-side-encryptionrequest header as object metadata and returned it on PutObject, GetObject and HeadObject responses, including for copied and multipart objects. Buckets served through the gateway require Appwrite encryption to be disabled and objects are stored as sent, so the response header reported encryption that was not applied.Other
x-amz-*request headers the gateway does not implement (storage class, tagging, ACL grants, object lock) are accepted and ignored, so the encryption header now follows the same rule: requests that send it still succeed, the value is no longer stored, and responses omit the header, which is how S3 reports that no server-side encryption was applied. The header is also dropped from the exposed CORS headers.Test Plan
S3CustomServerTest::testPutObjectServerSideEncryptionNotReportedsendsx-amz-server-side-encryption: AES256on a PutObject, a copy withREPLACEmetadata and a multipart upload, and asserts the header is absent on the PUT, GET and HEAD responses.assertArrayNotHasKey('x-amz-server-side-encryption', ...)because the PUT response echoes the header.Related PRs and Issues
🤖 Generated with Claude Code