Skip to content

Conversation

@amogh-jahagirdar
Copy link
Contributor

@amogh-jahagirdar amogh-jahagirdar commented Aug 21, 2023

Update S3V4RestSignerClient to send body for DeleteObjects (bulk delete) requests. Added a test which tests against a MinIO container. Follow up to #8361

@github-actions github-actions bot added the AWS label Aug 21, 2023
@amogh-jahagirdar amogh-jahagirdar force-pushed the wip-s3sign-body branch 2 times, most recently from 7cf5447 to 459427e Compare August 21, 2023 23:54
@amogh-jahagirdar amogh-jahagirdar force-pushed the wip-s3sign-body branch 6 times, most recently from b8b2419 to 222142b Compare August 22, 2023 23:56

private boolean isDeleteObjectsRequest(SdkHttpFullRequest request) {
return request.method() == SdkHttpMethod.POST
&& request.rawQueryParameters().containsKey("delete");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S3 supports a lot of requests for other operations. Are there any other combinations of requests that might meet this criteria? Just wondering because we may be exposing the client for other operations and I want to make sure this uniquely identifies the bulk delete operation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I glanced over a few other common request types and couldn't find anything that would match this, but would be good to do a thorough check

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to find anything either (referencing https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations_Amazon_Simple_Storage_Service.html) , I'll do a double pass and also see if there's even more specific criteria for bulk deletes beyond the method type and query parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a double pass to make sure there wasn't any other request that could possibly match this criteria.
As far as getting even more unique, we could actually perform an extraction of the DeleteObjectsRequest contents from the body (because we know no other request at the moment would send that). But this is probably too complex for what it brings considering what we have now looks to be unique already (we would need to add the jackson XML dependency to the signer client, etc).

Lmk if you have any concerns @danielcweeks @nastra

@amogh-jahagirdar amogh-jahagirdar force-pushed the wip-s3sign-body branch 2 times, most recently from 1fd773c to 8e38f9a Compare August 23, 2023 21:37
@amogh-jahagirdar
Copy link
Contributor Author

Merging, thanks @nastra @danielcweeks for the reviews!

@amogh-jahagirdar amogh-jahagirdar merged commit 258c184 into master Aug 25, 2023
@amogh-jahagirdar amogh-jahagirdar deleted the wip-s3sign-body branch August 25, 2023 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants