seaweedfs/test
7y-9 44d575100a
fix(s3api): preserve requested AES256 copy encryption (#10049)
* fix(s3api): preserve requested AES256 copy encryption

Problem
CopyObject metadata processing ignored an explicit x-amz-server-side-encryption: AES256 request header. A destination copy could lose the requested SSE-S3 metadata even though KMS requests were handled.

Root cause
processMetadataBytes only wrote the destination SSE header when the requested algorithm was aws:kms. Any other explicit SSE algorithm fell through to the source-preservation branch.

Fix
Write the requested SSE algorithm whenever x-amz-server-side-encryption is present, and keep KMS-specific metadata handling limited to aws:kms.

Co-authored-by: Codex <noreply@openai.com>

* fix(s3api): reject unsupported copy encryption algorithms

A mistyped or unsupported x-amz-server-side-encryption value on a copy
request slipped past validation and got persisted as the destination's
algorithm header, advertising encryption that was never applied. Reject
anything other than AES256 or aws:kms up front.

* fix(s3api): write SSE key metadata for empty encrypted copies

A zero-byte source copied with an explicit SSE request took the
no-content branch and never ran the encryption path, leaving the object
with a bare algorithm header but no key. HEAD then advertised SSE while
the encryption-state machine saw the header as orphaned. Run the inline
encryption path when the destination requests encryption so the key
metadata is written too.

* s3api: use SSEAlgorithmKMS constant in copy metadata handling

* test(s3api): cover source SSE preservation on copy

* test(iam): allow the local client's real source IP in SourceIp tests

The aws:SourceIp allow policies hardcoded the loopback CIDRs, but a CI
runner reaching the server over localhost can be observed with one of the
host's RFC1918 addresses (the S3 endpoint is advertised on a 10.x
interface), so the positive-condition PutObject was denied and the allow
assertion flaked while the deny path passed trivially. Broaden the allow
list to loopback plus private ranges via a shared helper, and log the
denial on each failed attempt so any residual failure is diagnosable.

---------

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Chris Lu <chris.lu@gmail.com>
2026-06-22 22:19:24 -07:00
..
benchmark/fuse_db test: add FUSE database load/durability/perf benchmark (#9980) 2026-06-15 13:25:27 -07:00
data volume: large_volume version has bug when using in memory index 2021-06-28 15:48:07 -07:00
erasure_coding test(ec): deterministically populate disks before multi-disk EC balance check (#9611) 2026-05-21 09:39:55 -07:00
foundationdb go 1.25 2026-03-09 23:10:27 -07:00
fuse_dlm test/fuse_dlm: cross-mount POSIX locks + survival across a ring change (#9677) 2026-05-25 16:20:23 -07:00
fuse_integration filer: POSIX advisory lock set primitive (phase 1 of distributed FUSE locking) (#9660) 2026-05-24 21:56:48 -07:00
fuse_p2p chore(filer): remove -mount.p2p flag; registry is always on (#9183) 2026-04-21 23:00:11 -07:00
java/spark build(deps): bump io.netty:netty-handler from 4.2.13.Final to 4.2.15.Final in /test/java/spark (#9875) 2026-06-08 22:08:07 -07:00
kafka build(deps): bump github.com/rclone/rclone from 1.74.1 to 1.74.3 in /test/kafka (#9996) 2026-06-16 23:31:19 -07:00
kms fix: serialize SSE-KMS metadata when bucket default encryption applies KMS (#8780) 2026-03-26 14:07:01 -07:00
metadata_subscribe fix: keep metadata subscriptions progressing (#8730) (#8746) 2026-03-23 15:26:54 -07:00
mq fix: add missing backslash for volume extraArgs in helm chart (#7676) 2025-12-08 23:21:02 -08:00
multi_master go fmt 2026-04-10 17:31:14 -07:00
pjdfstest ci(pjdfstest): cache docker layers via GHA to avoid apt mirror flakes (#9106) 2026-04-16 12:50:19 -07:00
plugin_workers fix(ec): don't mix EC shards from different encode runs (#9880) 2026-06-10 22:31:18 -07:00
postgres update go version 2026-03-09 11:12:05 -07:00
random_access Java 3.59 2023-11-13 08:23:53 -08:00
s3 fix(s3api): preserve requested AES256 copy encryption (#10049) 2026-06-22 22:19:24 -07:00
s3tables ci(s3tables): stop Lakekeeper flaking on Docker Hub pull timeouts (#9920) 2026-06-10 13:26:30 -07:00
samba test: fix fd leak in the Samba DLM handoff test (promote xfail checks) (#9592) 2026-05-20 16:17:13 -07:00
sftp chore: execute goimports to format the code (#7983) 2026-01-07 13:06:08 -08:00
testutil test: keep AllocateMiniPorts off weed mini default ports 2026-05-26 16:48:46 -07:00
tls_rotation feat(security): hot-reload HTTPS certs without restart (k8s cert-manager) (#9181) 2026-04-21 20:20:11 -07:00
tus Add TUS protocol support for resumable uploads (#7592) 2025-12-14 21:56:07 -08:00
vacuum test(vacuum): fix flaky TestVacuumIntegration across multiple volumes (#9061) 2026-04-13 17:56:32 -07:00
volume_server fix(ec): never delete recoverable EC shards on startup/reconcile (the non-empty-.dat sibling of the stub bug) (#9941) 2026-06-12 23:51:29 -07:00