Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] - versitygw REST DeleteObjects command doesn't require Content-MD5 or checksum header #1040

Open
lrm25 opened this issue Jan 21, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@lrm25
Copy link
Contributor

lrm25 commented Jan 21, 2025

Describe the bug
If a REST DeleteObjects command is sent without a Content-MD5 or checksum header, an error similar to the following is returned:

<Error><Code>InvalidRequest</Code><Message>Missing required header for this request: Content-MD5 OR x-amz-checksum-*</Message><RequestId>QKSB6PEC5MC19HFB</RequestId><HostId>0Ewj3m2sa0RhUIUqv5c3OKbJc5KCEf/FcVQ6tvvbmZh5P+tNK72GRdYH7ERWRRNNHb+BFdNa4xk=</HostId></Error>

versitygw doesn't require this, and just returns the standard successful DeleteObjects response.

To Reproduce

  1. Start versitygw, e.g.: ./versitygw --access=******** --secret=******** --region=us-east-1 --iam-dir=/Users/lukemccrone/devel/versitygw/iam --cert /Users/lukemccrone/devel/versitygw/cert.pem --key /Users/lukemccrone/devel/versitygw/versitygw.pem posix --versioning-dir /tmp/versioning /tmp/gw
  2. Create a bucket, e.g.: aws --no-verify-ssl s3api create-bucket --bucket versity-gwtest-bucket-one-1
  3. Send a REST DeleteObjects command without a content-md5 header. It should look like this: curl -ks -w %{http_code} -X POST https://localhost:7070/versity-gwtest-bucket-one-1?delete -H Authorization: AWS4-HMAC-SHA256 Credential=********/20250121/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=9ddb3eba5ddf3a332db585f741142ad650eaa28b23624525f33429186c32ba02 -H x-amz-content-sha256: f3cb07c8b87063ff05ddb3bdc06f6e2f966ecb85169d4cdb23e113bfdcfac07e -H x-amz-date: 20250121T172339Z -H Content-Type: application/xml -o /Users/lukemccrone/devel/versitygw/versity-gwtest-files/result.txt -d <Delete xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Object> <Key>test_file</Key> </Object> <Object> <Key>test_file_two</Key> </Object> </Delete>

Expected behavior
As with direct, error is returned.

Server Version
Version : v1.0.9
Build : 1718f85
BuildTime: 2025-01-21_04:33:10PM
Darwin Lukes-MacBook-Pro.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030 arm64

@lrm25 lrm25 added the bug Something isn't working label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant