mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-18 10:43:15 +00:00
fix(storage): harden local SSE-S3 fallback (#3564)
* fix: harden local SSE-S3 fallback * test: update managed SSE-S3 assumptions * chore: keep issue plan local only * test(ci): seed local SSE key for s3-tests
This commit is contained in:
@@ -2220,11 +2220,11 @@ mod tests {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_get_object_reader_uses_local_managed_fallback_without_env() {
|
||||
async fn test_get_object_reader_uses_local_managed_fallback_with_explicit_sse_s3_key() {
|
||||
async_with_vars(
|
||||
[
|
||||
("__RUSTFS_SSE_SIMPLE_CMK", None::<String>),
|
||||
("RUSTFS_SSE_S3_MASTER_KEY", None::<String>),
|
||||
("RUSTFS_SSE_S3_MASTER_KEY", Some(BASE64_STANDARD.encode([0u8; 32]))),
|
||||
],
|
||||
async {
|
||||
let plaintext = b"managed-local-fallback".to_vec();
|
||||
@@ -2288,7 +2288,7 @@ mod tests {
|
||||
&HeaderMap::new(),
|
||||
)
|
||||
.await
|
||||
.expect("managed encrypted reads should fall back to the local SSE-S3 key");
|
||||
.expect("managed encrypted reads should use the configured local SSE-S3 key");
|
||||
|
||||
let mut actual = Vec::new();
|
||||
reader.read_to_end(&mut actual).await.expect("read managed plaintext");
|
||||
|
||||
Reference in New Issue
Block a user