mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-21 18:36:35 +00:00
sse-c: use different object encryption key for each object
This commit is contained in:
+11
-3
@@ -17,7 +17,7 @@ use garage_api_common::encoding::*;
|
||||
use garage_api_common::helpers::*;
|
||||
|
||||
use crate::api_server::{ReqBody, ResBody};
|
||||
use crate::encryption::EncryptionParams;
|
||||
use crate::encryption::{EncryptionParams, OekDerivationInfo};
|
||||
use crate::error::*;
|
||||
use crate::multipart as s3_multipart;
|
||||
use crate::xml as s3_xml;
|
||||
@@ -285,8 +285,16 @@ pub async fn handle_list_parts(
|
||||
ObjectVersionState::Uploading { encryption, .. } => encryption,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
let encryption_res =
|
||||
EncryptionParams::check_decrypt(&ctx.garage, req.headers(), &object_encryption);
|
||||
let encryption_res = EncryptionParams::check_decrypt(
|
||||
&ctx.garage,
|
||||
req.headers(),
|
||||
&object_encryption,
|
||||
OekDerivationInfo {
|
||||
bucket_id: ctx.bucket_id,
|
||||
version_id: upload_id,
|
||||
object_key: &query.key,
|
||||
},
|
||||
);
|
||||
|
||||
let (info, next) = fetch_part_info(query, &mpu)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user