Xuanwo opened a new pull request, #9089:
URL: https://github.com/apache/opendal/pull/9089

   # Which issue does this PR close?
   
   Refs #6274. #7276 forwarded S3 presigned write options, and #8690 added 
metadata coverage. This PR handles a separate case involving append.
   
   # Rationale for this change
   
   S3 advertises `write_can_append` for ordinary writes. As a result, an append 
request passed the capability check in `Operator::presign_write_options`. The 
S3 presigner then built an ordinary `PutObject` without the 
`x-amz-write-offset-bytes` header used by the append writer. Sending that 
signed request to MinIO replaced the contents of an existing object.
   
   # What changes are included in this PR?
   
   `S3Backend::presign` rejects a write with `append: true` before building or 
signing the PUT. A regression test exercises `Operator::presign_write_options` 
on an operator with `write_can_append` enabled.
   
   # Are there any user-facing changes?
   
   Yes. Requesting a presigned S3 write with `append: true` returns 
`ErrorKind::Unsupported`. The caller receives no request that could overwrite 
the destination.
   
   We reproduced the overwrite on MinIO `RELEASE.2024-09-22T00-33-43Z`. With 
the fix, the same call returned `Unsupported` and the seeded bytes remained 
intact. A plain presigned PUT and its metadata round trip also passed. 
Cloud-side AWS append was outside this verification.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Pi, GPT-6.2-Sol (`xhigh`), implemented the guard and regression test and 
ran the MinIO reproduction and verification.
   - Pi, SWE-2 (`high`), independently reviewed the change and ran the focused 
regression test.
   - Pi, Gemini 4 Neon (`high`), drafted the PR description.
   - Pi, GPT-6.2-Astra (`high`), coordinated the work and edited the 
description.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to