Problem description
The value of the x-oss-meta-client-side-encryption-magic-number-hmac
header specified in the UploadPart request is not the expected value.
Causes
The value of the x-oss-meta-client-side-encryption-magic-number-hmac
header specified in the UploadPart request is not the same as the value of this header specified in the InitiateMultipartUpload request. The x-oss-meta-client-side-encryption-magic-number-hmac header is required if the x-oss-meta-client-side-encryption-wrap-alg
header is set to rsa
.
Examples
For example, you initiate an InitiateMultipartUpload request:
POST /multipart.data?uploads HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 22 Feb 2012 08:32:21 GMT
x-oss-storage-class: Archive
Authorization: OSS qn6q**************:77Dv****************
x-oss-meta-client-side-encryption-wrap-alg: rsa
x-oss-meta-client-side-encryption-magic-number-hmac: value1
Then, you initiate an UploadPart request:
PUT /multipart.data?partNumber=1&uploadId=0004B9895DBBB6EC9**** HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 6291456
Date: Wed, 22 Feb 2012 08:32:21 GMT
Authorization: OSS qn6q**************:77Dv****************
x-oss-meta-client-side-encryption-wrap-alg: rsa
x-oss-meta-client-side-encryption-magic-number-hmac: value2
[6291456 bytes data]
The error is returned for the UploadPart request because the x-oss-meta-client-side-encryption-magic-number-hmac
header is not set to the same value in the InitiateMultipartUpload request and UploadPart request.
Solutions
Set the x-oss-meta-client-side-encryption-magic-number-hmac
header to the same value in the InitiateMultipartUpload request and UploadPart request.