pub enum MultipartSseMode {
None,
SseS4,
SseC {
key: Zeroizing<[u8; 32]>,
key_md5: [u8; 16],
},
SseKms {
key_id: String,
},
}Expand description
SSE recipe captured at CreateMultipartUpload time and replayed for
every part body + the final stamp on the assembled object.
The variants mirror service::put_object’s SSE branch precedence:
SSE-C (per-request customer key) wins over SSE-KMS (named KMS key)
wins over SSE-S4 (server-managed keyring) wins over no encryption.
SSE-C / SSE-KMS materialise only when the client supplied the
matching headers; SSE-S4 materialises whenever the gateway is booted
with --sse-s4-key (or with_sse_keyring(...) in tests).
v0.8.2 #62 (H-6 audit fix): the SseC variant’s customer key is held
in Zeroizing<[u8; 32]> so the raw 32-byte AES key is overwritten
with 0u8 when the entry is dropped — either via remove(upload_id)
on Complete/Abort, or via sweep_stale(...) on an abandoned upload.
Process core dump / swap-out / KSM snapshot can no longer leak a
previously-held SSE-C key after the upload’s lifetime ends. The
key_md5 is deliberately a plain [u8; 16] — it’s a public
fingerprint (S3 puts it on the wire on every PUT/GET response) and
requires no zeroization. Custom PartialEq ignores the Zeroizing
wrapper so existing tests that match on the variant keep compiling.
Variants§
None
Plaintext multipart. Backend stores raw framed bytes.
SseS4
Server-managed keyring (active key on PUT, all keys probed on GET).
The keyring itself lives on S4Service; only the marker is held
here so complete_multipart_upload knows which path to take.
SseC
Per-request customer key. The 32-byte key + its 128-bit MD5 are
kept in memory only for the lifetime of the upload, then dropped
when the entry is remove(...)’d on Complete or Abort. v0.8.2
#62: key is Zeroizing<[u8; 32]> so its bytes are wiped on
drop (vs. a bare [u8; 32] which would linger on the heap /
stack until the next allocation reuse).
SseKms
Named KMS key (resolved against the gateway’s KMS backend on Complete to generate the per-object DEK).
Trait Implementations§
Source§impl Clone for MultipartSseMode
impl Clone for MultipartSseMode
Source§fn clone(&self) -> MultipartSseMode
fn clone(&self) -> MultipartSseMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MultipartSseMode
impl Debug for MultipartSseMode
Source§impl PartialEq for MultipartSseMode
impl PartialEq for MultipartSseMode
impl Eq for MultipartSseMode
Auto Trait Implementations§
impl Freeze for MultipartSseMode
impl RefUnwindSafe for MultipartSseMode
impl Send for MultipartSseMode
impl Sync for MultipartSseMode
impl Unpin for MultipartSseMode
impl UnsafeUnpin for MultipartSseMode
impl UnwindSafe for MultipartSseMode
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.