mirror of
https://github.com/rustfs/rustfs.git
synced 2026-12-01 05:34:41 +00:00
02981d3838
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.