-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Request/Response Checksum Behavior Updates #3277
base: flexible-checksums-v2
Are you sure you want to change the base?
Request/Response Checksum Behavior Updates #3277
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## flexible-checksums-v2 #3277 +/- ##
========================================================
Coverage ? 93.04%
========================================================
Files ? 66
Lines ? 14405
Branches ? 0
========================================================
Hits ? 13403
Misses ? 1002
Partials ? 0 ☔ View full report in Codecov by Sentry. |
# `payload_signing_enabled` config overrides this logic and forces the | ||
# header. | ||
def test_content_sha256_not_set_if_config_value_is_true(self): | ||
# By default, put_object() provides a trailing checksum and includes the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right? I wouldn't expect us to be using trailing checksums by default on put_object
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because CRC32 is the new default, put_object
will use trailing checksums by default. This is because put_object
has streaming input.
You can see this behavior in the current version of the SDK by running:
import boto3
boto3.set_stream_logger('')
s3 = boto3.client("s3")
response = s3.put_object(
Body=b"Example data.",
Bucket="<bucket_name>",
Key="example_key.txt",
ChecksumAlgorithm="CRC32",
)
2d66b37
to
d586cba
Compare
ccbc9c0
to
17ef6f7
Compare
Add ``request_checksum_calculation`` and ``response_checksum_validation`` config options.
* Add support for CRC64NVME when the CRT is available. * Update crc64nvme priority
…ed checksums." This reverts commit 93a47eb.
Add ``request_checksum_calculation`` and ``response_checksum_validation`` config options.
* Add support for CRC64NVME when the CRT is available. * Update crc64nvme priority
d586cba
to
fac0754
Compare
009ea3d
to
626c08a
Compare
This PR makes the following updates to the botocore flexible checksum behavior:
Request Checksum Calculation
request_checksum_calculation
config is set towhen_supported
(default value), a checksum will be generated whenever one of the following conditions is true:httpchecksum
trait and defines arequestAlgorithmMember
.httpchecksum
trait and definesrequestChecksumRequired: true
.request_checksum_calculation
config is set towhen_required
, a checksum will be generated only when:httpchecksum
trait and definesrequestChecksumRequired: true
.S3 Customizations:
Response Checksum Validation
requestValidationModeMember
by the user will be used by the SDK.requestValidationModeMember
value is not set by the user, the following behavior is experienced:response_checksum_validation
config is set towhen_supported
(default value), therequestValidationModeMember
will be set toENABLED
.response_checksum_validation
config is set towhen_required
, therequestValidationModeMember
will be set toENABLED
.