Fix CRC32C Checksum Implementation and Enhance Authentication System #678
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses critical issues with CRC32C checksum calculation and significantly enhances the authentication system with improved IP handling and condition value processing.
Changes Made
🔧 CRC32C Checksum Fix
crates/rio/src/checksum.rsandcrates/rio/src/hash_reader.rscrc32fastdependency withcrc32ccrate for proper CRC32C (Castagnoli) algorithmCrc32CastagnoliHasherimplementation usingcrc32c::crc32c_append()functionCargo.tomlfiles across multiple crates🔐 Authentication System Enhancements
rustfs/src/auth.rswith comprehensive auth type detectioncrates/utils/src/http/ip.rs:🛠️ Storage and Access Improvements
rustfs/src/storage/options.rs:rustfs/src/storage/access.rsandrustfs/src/storage/ecfs.rs📦 Dependency Updates
crates/policy/Cargo.toml,crates/rio/Cargo.toml,crates/utils/Cargo.tomlTechnical Details
CRC32C Implementation
Authentication Types
Added comprehensive authentication type detection supporting:
IP Processing
New module handles complex proxy scenarios:
Files Changed
rustfs/src/auth.rs,crates/rio/src/checksum.rs,crates/utils/src/http/ip.rsrustfs/src/storage/options.rsTesting
Breaking Changes
None - this is a bug fix and enhancement that maintains backward compatibility.
Related Issues
Fixes CRC32C checksum calculation issues and enhances authentication robustness for production deployments.
#666