mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
fix: CompleteMultipartUpload encryption (#626)
This commit is contained in:
19
Cargo.lock
generated
19
Cargo.lock
generated
@@ -4422,9 +4422,9 @@ checksum = "ae960838283323069879657ca3de837e9f7bbb4c7bf6ea7f1b290d5e9476d2e0"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.7.5"
|
||||
version = "2.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
|
||||
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
|
||||
|
||||
[[package]]
|
||||
name = "memmap2"
|
||||
@@ -4667,15 +4667,6 @@ dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nugine-rust-utils"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "04dcd9cfa92246a9c7ca0671e00733c4e9d77ee1fa0ae08c9a181b7c8802aea2"
|
||||
dependencies = [
|
||||
"simdutf8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num"
|
||||
version = "0.4.3"
|
||||
@@ -7056,9 +7047,9 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
||||
|
||||
[[package]]
|
||||
name = "s3s"
|
||||
version = "0.12.0-rc.1"
|
||||
version = "0.12.0-rc.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0c7ae94d88d3d0d4ab0cb3f8e106199832b2943609680b5d75b0d7f686f6be3"
|
||||
checksum = "6fbf35b8b229398629d8df8a0cb908a70a24da69f65911fe0461fba3f4e9dda5"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"async-trait",
|
||||
@@ -7066,6 +7057,7 @@ dependencies = [
|
||||
"base64-simd",
|
||||
"bytes",
|
||||
"bytestring",
|
||||
"cfg-if",
|
||||
"chrono",
|
||||
"const-str",
|
||||
"crc32c",
|
||||
@@ -7084,7 +7076,6 @@ dependencies = [
|
||||
"memchr",
|
||||
"mime",
|
||||
"nom 7.1.3",
|
||||
"nugine-rust-utils",
|
||||
"numeric_cast",
|
||||
"pin-project-lite",
|
||||
"quick-xml 0.37.5",
|
||||
|
||||
@@ -210,7 +210,7 @@ rustfs-rsc = "2025.506.1"
|
||||
rustls = { version = "0.23.32", features = ["ring", "logging", "std", "tls12"], default-features = false }
|
||||
rustls-pki-types = "1.12.0"
|
||||
rustls-pemfile = "2.2.0"
|
||||
s3s = { version = "0.12.0-rc.1", features = ["minio"] }
|
||||
s3s = { version = "0.12.0-rc.2", features = ["minio"] }
|
||||
schemars = "1.0.4"
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
serde_json = { version = "1.0.145", features = ["raw_value"] }
|
||||
|
||||
@@ -388,23 +388,11 @@ async fn test_bucket_default_encryption_multipart_upload() -> Result<(), Box<dyn
|
||||
complete_multipart_response.ssekms_key_id()
|
||||
);
|
||||
|
||||
// Verify: complete_multipart_upload response should contain encryption information
|
||||
// KNOWN BUG: s3s library bug where CompleteMultipartUploadOutput encryption fields serialize as None
|
||||
// even when properly set. Our server implementation is correct (see server logs above).
|
||||
// TODO: Remove this workaround when s3s library is fixed
|
||||
warn!("KNOWN BUG: s3s library - complete_multipart_upload response encryption fields return None even when set");
|
||||
|
||||
if complete_multipart_response.server_side_encryption().is_some() {
|
||||
// If s3s library is fixed, verify the encryption info
|
||||
assert_eq!(
|
||||
complete_multipart_response.server_side_encryption(),
|
||||
Some(&ServerSideEncryption::AwsKms),
|
||||
"complete_multipart_upload response should contain SSE-KMS encryption information"
|
||||
);
|
||||
} else {
|
||||
// Expected behavior due to s3s library bug - log and continue
|
||||
warn!("Skipping assertion due to known s3s library bug - server logs confirm correct encryption handling");
|
||||
}
|
||||
assert_eq!(
|
||||
complete_multipart_response.server_side_encryption(),
|
||||
Some(&ServerSideEncryption::AwsKms),
|
||||
"complete_multipart_upload response should contain SSE-KMS encryption information"
|
||||
);
|
||||
|
||||
// Step 4: Download file and verify encryption status
|
||||
info!("Downloading file and verifying encryption status");
|
||||
|
||||
Reference in New Issue
Block a user