Open airbone42 opened 8 years ago
Take a look here:
http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html
According to these docs:
x-amz-server-side-encryption-customer-algorithm
:
Use a value of "AES256".
x-amz-server-side-encryption-customer-key
:
Specifies the customer-provided base64-encoded encryption key for Amazon S3 to use in encrypting data.
So take your encryption key and base64-encode it.
x-amz-server-side-encryption-customer-key-MD5
:
Specifies the base64-encoded 128-bit MD5 digest of the encryption key according to RFC 1321.
So do the same thing: base64-encode the MD5 digest.
Hi,
great script, thanks a lot.
Unfortunately, we want to use custom keys which we generate on-the-fly.
Did anyone ever try to implement that?
We already changed the copyObject part to following snippet: `
s3.copyObject({ Bucket: bucket, Key: key,
` Unfortunately, JS SDK documentation doesn't state clearly in which format customer-key and md5 should be transfered. So we didn't get it running as S3 just replies with a bad request.