Skip to content

Turning off trailing checksums for SSE #922

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

Merged
merged 1 commit into from
Dec 6, 2018
Merged

Conversation

spfink
Copy link
Contributor

@spfink spfink commented Dec 5, 2018

S3 trailing checksums don't support SSE either.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

Copy link
Contributor

@zoewangg zoewangg left a comment

Choose a reason for hiding this comment

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

Can we add a changelog entry?


// S3 doesn't support trailing checksums for KMS encrypted objects
if (headers.getOrDefault(SERVER_SIDE_ENCRYPTION_HEADER, new ArrayList<>()).contains(AWS_KMS.toString())) {
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we move the checks to an util method so that it can be used in both sync and async?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. Not sure that I love the name. Feel free to give ideas.

.bucket(BUCKET)
.build();

s3.getObject(getObjectRequest);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, can we close the response streams afterwards?

.bucket(BUCKET)
.build();

s3Async.getObject(getObjectRequest, AsyncResponseTransformer.toBytes());
Copy link
Contributor

Choose a reason for hiding this comment

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

.join()? same as other tests.

}

// S3 doesn't support trailing checksums for KMS encrypted objects
if (headers.getOrDefault(SERVER_SIDE_ENCRYPTION_HEADER, new ArrayList<>()).contains(AWS_KMS.toString())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: replace new with Collections.emptyList()

@spfink spfink force-pushed the finks/checksum-sse branch from 3342422 to 84bb7fd Compare December 6, 2018 00:27
Copy link
Contributor

@zoewangg zoewangg left a comment

Choose a reason for hiding this comment

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

Don't forget the changelog : )

@spfink spfink force-pushed the finks/checksum-sse branch from 84bb7fd to ffbcde4 Compare December 6, 2018 18:11
@spfink spfink merged commit d51033c into master Dec 6, 2018
@spfink spfink deleted the finks/checksum-sse branch March 17, 2020 23:41
aws-sdk-java-automation pushed a commit that referenced this pull request Aug 7, 2020
…527ecf33

Pull request: release <- staging/0c865dac-9ea8-4186-8ae1-9786527ecf33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants