Files
rustfs/crates/sse
唐小鸭 02981d3838 fix(sse): accept ARN-prefixed plain key names on SSE-KMS writes (#9679)
An SSE-KMS write whose x-amz-server-side-encryption-aws-kms-key-id header
carries a plain key name behind an AWS-style ARN prefix
(arn:aws:kms:<name>) failed with 400 KMS.NotFoundException, because the
whole header value was looked up as the key name. Bucket replication from
a source that sends key names in that form therefore left every SSE-KMS
object FAILED.

The request header is now reduced to <name> when the remainder after the
prefix is a non-empty name without ':' or '/'. Complete key and alias ARNs
keep further ':'-separated fields and are passed on unchanged. The
reduction runs on the request's own value before it is merged with a
bucket default and before the KMS authorization check, so PutObject,
CopyObject and CreateMultipartUpload authorize, seal and record one key
id. A bucket default KMSMasterKeyID is still used as configured.
2026-11-29 09:49:05 +08:00
..