All Products
Search
Document Center

Object Storage Service:0005-00000401

Last Updated:Apr 28, 2024

Problem description

The x-oss-meta-client-side-encryption-key header is missing from your PutObject, InitiateMultipartUpload, or UploadPart request in client-encryption scenarios.

Causes

In client-encryption, the x-oss-meta-client-side-encryption-key header is required for the PutObject, InitiateMultipartUpload, and UploadPart requests.

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-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-magic-number-hmac: val4
x-oss-meta-client-side-encryption-data-size: val5
x-oss-meta-client-side-encryption-part-size: val6

The error is returned for the request because the x-oss-meta-client-side-encryption-key header is missing from the request body.

Solutions

Include the x-oss-meta-client-side-encryption-key header in the PutObject, InitiateMultipartUpload, and UploadPart requests in client-side encryption scenarios.

References