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

CLDSRV-620: Ignore trailing checksums in upload requests #5757

Merged
merged 2 commits into from
Mar 17, 2025

Conversation

fredmnl
Copy link
Contributor

@fredmnl fredmnl commented Mar 7, 2025

Motivation

Since aws-cli 2.23 (and associated SDK version), put-object now defaults to using unsigned payload with trailing checksums for integrity.

This is particularly nice from a computational point of view because the client only needs to read their file once to perform the upload. With AuthV4 signed payload, you would need to first compute the checksum of the object, to eventually include it in the signature contained in the header. With trailing checksums (and unsigned payload), the checksum is computed while the upload is happening and the checksum is sent at the end of the body.

Implementation

In this first iteration we are only interested in accepting the incoming requests using trailing checksums and unsigned payload. We are not yet verifying the checksum although the current proposal is extensible to perform this checksum verification as well.

@bert-e
Copy link
Contributor

bert-e commented Mar 7, 2025

Hello fredmnl,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Mar 7, 2025

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

@fredmnl
Copy link
Contributor Author

fredmnl commented Mar 7, 2025

/create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 7, 2025

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/7.4

You can set option create_pull_requests if you need me to create
integration pull requests in addition to integration branches, with:

@bert-e create_pull_requests

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 7, 2025

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

The following options are set: create_integration_branches

@fredmnl fredmnl force-pushed the bugfix/CLDSRV-620/strip-trailing-checksums branch from e324d8a to a9afd5f Compare March 7, 2025 14:30
@bert-e
Copy link
Contributor

bert-e commented Mar 7, 2025

History mismatch

Merge commit #e324d8a72894b218324c9f640f175ff54d06cbb0 on the integration branch
w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums is merging a branch which is neither the current
branch bugfix/CLDSRV-620/strip-trailing-checksums nor the development branch
development/7.70.

It is likely due to a rebase of the branch bugfix/CLDSRV-620/strip-trailing-checksums and the
merge is not possible until all related w/* branches are deleted or updated.

Please use the reset command to have me reinitialize these branches.

The following options are set: create_integration_branches

@fredmnl
Copy link
Contributor Author

fredmnl commented Mar 7, 2025

/reset

@bert-e
Copy link
Contributor

bert-e commented Mar 7, 2025

Reset complete

I have successfully deleted this pull request's integration branches.

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 7, 2025

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/7.4

You can set option create_pull_requests if you need me to create
integration pull requests in addition to integration branches, with:

@bert-e create_pull_requests

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 7, 2025

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 7, 2025

Conflict

A conflict has been raised during the update of
integration branch w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums with contents from bugfix/CLDSRV-620/strip-trailing-checksums
and development/7.70.

Please resolve the conflict on the integration branch (w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums).

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums
 $ git pull  # or "git reset --hard origin/w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums"
 $ git merge origin/development/7.70
 $ # <intense conflict resolution>
 $ git commit
 $ git merge origin/bugfix/CLDSRV-620/strip-trailing-checksums
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums

The following options are set: create_integration_branches

@fredmnl fredmnl changed the title S3C-9769: Ignore trailing checksums in upload requests CLDSRV-620: Ignore trailing checksums in upload requests Mar 7, 2025
@bert-e
Copy link
Contributor

bert-e commented Mar 7, 2025

Conflict

A conflict has been raised during the update of
integration branch w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums with contents from w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums
and development/8.8.

Please resolve the conflict on the integration branch (w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums).

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums
 $ git pull  # or "git reset --hard origin/w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums"
 $ git merge origin/development/8.8
 $ # <intense conflict resolution>
 $ git commit
 $ git merge origin/w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 7, 2025

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

The following options are set: create_integration_branches

Comment on lines +41 to +43
const trailingChecksumTransform = new TrailingChecksumTransform(log);
stream.pipe(trailingChecksumTransform);
trailingChecksumTransform.headers = stream.headers;
return trailingChecksumTransform;
Copy link
Contributor

Choose a reason for hiding this comment

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

Good to confirm as well if we are still enforcing the common md5 check in this mode (both stored in the object md and that we properly fail in case of mismatch). Could be through a new unit/ft test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I checked and when the trailing checksum mode is activated, the client does not send md5 checksums. Therefore in this mode we do not check integrity. This is not a first, there are already ways to upload where cloudserver does not check payload integrity. In fact, it only checks payload integrity in two scenarios: content-md5 header is provided, or streaming AuthV4 is used (in this case, the signature verification also indirectly verifies payload integrity).

In the absence of integrity check in cloudserver, integrity is still verified at the TCP level (although it's quite a weak verification) and at the HTTPS level.

I have circled back with David to triple check that this is what we want from a product standpoint.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, if we all align, good to mention it in the release notes: integrity is not guaranteed by the S3 service with trailing checksums PUTs.

Comment on lines +41 to +43
const trailingChecksumTransform = new TrailingChecksumTransform(log);
stream.pipe(trailingChecksumTransform);
trailingChecksumTransform.headers = stream.headers;
return trailingChecksumTransform;
Copy link
Contributor

Choose a reason for hiding this comment

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

I see, if we all align, good to mention it in the release notes: integrity is not guaranteed by the S3 service with trailing checksums PUTs.

// no need to look further than 10 bytes since the field cannot be bigger
const lineBreakIndex = chunk.subarray(0, 10).indexOf('\r');
const bytesToKeep = lineBreakIndex === -1 ? chunk.byteLength : lineBreakIndex;
if (this.chunkSizeBuffer.byteLength + bytesToKeep > 10) {
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 not only check the number of bytes in the buffer, but also the actual value, and ensure we don't exceed the max supported (5GB)? See constants.maximumAllowedPartSize for the constant you can use.

@fredmnl fredmnl force-pushed the bugfix/CLDSRV-620/strip-trailing-checksums branch from 307973e to d04e248 Compare March 17, 2025 10:14
@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

History mismatch

Merge commit #337ebf7afb214667e813a33db351a8e90a11c35a on the integration branch
w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums is merging a branch which is neither the current
branch bugfix/CLDSRV-620/strip-trailing-checksums nor the development branch
development/7.70.

It is likely due to a rebase of the branch bugfix/CLDSRV-620/strip-trailing-checksums and the
merge is not possible until all related w/* branches are deleted or updated.

Please use the reset command to have me reinitialize these branches.

The following options are set: create_integration_branches

Copy link
Contributor

@williamlardier williamlardier left a comment

Choose a reason for hiding this comment

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

Just a comment so we don't forget to bump cloudserver's version before merging, as we need it for the next release(s) 🙂

@fredmnl fredmnl force-pushed the bugfix/CLDSRV-620/strip-trailing-checksums branch from 26d52a8 to 4714a4a Compare March 17, 2025 14:16
@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

History mismatch

Merge commit #a9afd5fa7483e73aa38fa7903a772b7565b978e2 on the integration branch
w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums is merging a branch which is neither the current
branch bugfix/CLDSRV-620/strip-trailing-checksums nor the development branch
development/7.70.

It is likely due to a rebase of the branch bugfix/CLDSRV-620/strip-trailing-checksums and the
merge is not possible until all related w/* branches are deleted or updated.

Please use the reset command to have me reinitialize these branches.

The following options are set: create_integration_branches

@fredmnl
Copy link
Contributor Author

fredmnl commented Mar 17, 2025

/force_reset

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

Reset complete

I have successfully deleted this pull request's integration branches.

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

Conflict

A conflict has been raised during the creation of
integration branch w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums with contents from bugfix/CLDSRV-620/strip-trailing-checksums
and development/7.70.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums origin/development/7.70
 $ git merge origin/bugfix/CLDSRV-620/strip-trailing-checksums
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

Conflict

A conflict has been raised during the creation of
integration branch w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums with contents from w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums
and development/8.8.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums origin/development/8.8
 $ git merge origin/w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

Conflict

A conflict has been raised during the creation of
integration branch w/9.0/bugfix/CLDSRV-620/strip-trailing-checksums with contents from w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums
and development/9.0.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/9.0/bugfix/CLDSRV-620/strip-trailing-checksums origin/development/9.0
 $ git merge origin/w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/9.0/bugfix/CLDSRV-620/strip-trailing-checksums

The following options are set: create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

The following options are set: create_integration_branches

@fredmnl
Copy link
Contributor Author

fredmnl commented Mar 17, 2025

/approve

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

Build failed

The build for commit did not succeed in branch w/9.0/bugfix/CLDSRV-620/strip-trailing-checksums

The following options are set: approve, create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

Build failed

The build for commit did not succeed in branch w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums

The following options are set: approve, create_integration_branches

@fredmnl fredmnl force-pushed the bugfix/CLDSRV-620/strip-trailing-checksums branch from 4714a4a to 7ba8551 Compare March 17, 2025 17:27
@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

History mismatch

Merge commit #bd46a9a53d8241f0ff9380ea131b239d288edf77 on the integration branch
w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums is merging a branch which is neither the current
branch bugfix/CLDSRV-620/strip-trailing-checksums nor the development branch
development/7.70.

It is likely due to a rebase of the branch bugfix/CLDSRV-620/strip-trailing-checksums and the
merge is not possible until all related w/* branches are deleted or updated.

Please use the reset command to have me reinitialize these branches.

The following options are set: approve, create_integration_branches

@fredmnl
Copy link
Contributor Author

fredmnl commented Mar 17, 2025

/force_reset

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

Reset complete

I have successfully deleted this pull request's integration branches.

The following options are set: approve, create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

Conflict

A conflict has been raised during the creation of
integration branch w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums with contents from bugfix/CLDSRV-620/strip-trailing-checksums
and development/7.70.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums origin/development/7.70
 $ git merge origin/bugfix/CLDSRV-620/strip-trailing-checksums
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums

The following options are set: approve, create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

Conflict

A conflict has been raised during the creation of
integration branch w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums with contents from w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums
and development/8.8.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums origin/development/8.8
 $ git merge origin/w/7.70/bugfix/CLDSRV-620/strip-trailing-checksums
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums

The following options are set: approve, create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

Conflict

A conflict has been raised during the creation of
integration branch w/9.0/bugfix/CLDSRV-620/strip-trailing-checksums with contents from w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums
and development/9.0.

I have not created the integration branch.

Here are the steps to resolve this conflict:

 $ git fetch
 $ git checkout -B w/9.0/bugfix/CLDSRV-620/strip-trailing-checksums origin/development/9.0
 $ git merge origin/w/8.8/bugfix/CLDSRV-620/strip-trailing-checksums
 $ # <intense conflict resolution>
 $ git commit
 $ git push -u origin w/9.0/bugfix/CLDSRV-620/strip-trailing-checksums

The following options are set: approve, create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

Build failed

The build for commit did not succeed in branch w/9.0/bugfix/CLDSRV-620/strip-trailing-checksums

The following options are set: approve, create_integration_branches

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2025

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/7.10

  • ✔️ development/7.70

  • ✔️ development/8.8

  • ✔️ development/9.0

The following branches have NOT changed:

  • development/7.4

Please check the status of the associated issue CLDSRV-620.

Goodbye fredmnl.

The following options are set: approve, create_integration_branches

@bert-e bert-e merged commit 7ba8551 into development/7.10 Mar 17, 2025
10 checks passed
@bert-e bert-e deleted the bugfix/CLDSRV-620/strip-trailing-checksums branch March 17, 2025 20:22
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.

5 participants