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

Implements object integrity checksums #1023

Merged
merged 7 commits into from
Feb 20, 2025

Conversation

niksis02
Copy link
Contributor

@niksis02 niksis02 commented Jan 13, 2025

Fixes #928

Implements object integrity checksums in POSIX.

The following checksum algorithms are supported (similar to AWS):

  1. CRC32
  2. CRC32C
  3. SHA1
  4. SHA256
  5. CRC64NVME

The checksums are Base64-encoded.

  • Checksums are calculated during object uploads (PutObject, UploadPart).
  • A checksum reader is layered on top of the existing readers.
  • When an object is copied (CopyObject), the checksum is recalculated if a different checksum type is specified.

Constraints:

  • Multiple checksum types are not allowed for a single object.
  • It is not permitted to upload an object (PutObject) or its parts with differing checksum types.

Checksum data is stored as extended attributes (xattr) in JSON format, including the checksum algorithm and its corresponding values.

The new checksum-type support is added in the gateway as stated in aws docs

There are 2 checksum types:

  1. COMPOSITE
  2. FULL_OBJECT

FULL_OBJECT is calculated based on the object data from the first till the last byte.
COMPOSITE checksum is used in multipart uploads, which is calculated based on all the uploaded parts checksums.

All the new changes mentioned in the doc will become available with this PR in the posix and s3proxy backends

@niksis02
Copy link
Contributor Author

Azure tests failure is intentional. All the failures will be gone after the next commit, implementing checksums in the azure backend.

@niksis02 niksis02 force-pushed the feat/object-integrity-checksums branch from 5e708ad to eea45a3 Compare February 1, 2025 10:32
@niksis02 niksis02 force-pushed the feat/object-integrity-checksums branch 2 times, most recently from 29160ab to 32d1ee7 Compare February 14, 2025 11:40
…um-type support for the checksum implementation
@niksis02 niksis02 force-pushed the feat/object-integrity-checksums branch from 32d1ee7 to 132d0ae Compare February 17, 2025 12:30
niksis02 and others added 4 commits February 17, 2025 19:38
…dds a check to validate the parts order to be ascending.
…-validation

UploadPart partnumber range validation
fix: Adds PartNumber validation for CompleteMultipartUploads parts. A…
@niksis02 niksis02 force-pushed the feat/object-integrity-checksums branch from 60151a7 to 1735182 Compare February 19, 2025 19:59
@benmcclelland benmcclelland merged commit 323600a into main Feb 20, 2025
24 checks passed
@benmcclelland benmcclelland deleted the feat/object-integrity-checksums branch February 20, 2025 00:12
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.

[Bug] - GetObjectAttributes doesn't return checksum when Checksum is requested
3 participants