问题描述
客户端加密场景下PutObject 、InitiateMultipartUpload、UploadPart缺少请求头x-oss-meta-client-side-encryption-magic-number-hmac
。
问题原因
客户端加密场景下,在进行PutObject 、InitiateMultipartUpload、UploadPart时,若请求头x-oss-meta-client-side-encryption-wrap-alg
对应的值为“rsa”,则需要携带请求头x-oss-meta-client-side-encryption-magic-number-hmac
。
问题示例
例如您发起了一个InitiateMultipartUpload请求:
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-key: val0
x-oss-meta-client-side-encryption-start: val1
x-oss-meta-client-side-encryption-cek-alg: val2
x-oss-meta-client-side-encryption-wrap-alg: rsa
x-oss-meta-client-side-encryption-data-size: val5
x-oss-meta-client-side-encryption-part-size: val6
由于请求头x-oss-meta-client-side-encryption-wrap-alg
对应值为“rsa”,同时缺少请求头x-oss-meta-client-side-encryption-magic-number-hmac
,请求返回失败。
解决方案
客户端加密场景下,进行PutObject 、InitiateMultipartUpload、UploadPart时,若请求头x-oss-meta-client-side-encryption-wrap-alg
对应的值为“rsa”,则需要携带请求头x-oss-meta-client-side-encryption-magic-number-hmac
。
相关文档
文档内容是否对您有帮助?