-
Notifications
You must be signed in to change notification settings - Fork 605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storage - file.js. Any way to set Source Encryption Key? #2322
Comments
Hi @subra-vr, I just submitted #2324 which should give you what you need. Let me know if this solves your use case? |
That should work, thanks. |
Hi, I'm just pinging the issue as I was trying to use the File.copy method to rotate customer-supplied encryption key using node. I tried the following, but I didn't have any luck. var file = bucket.file("file_name");
var options = {baseHeader: "x-goog-copy-source-encryption"};
file.setEncryptionKey(encryptionKey, options); // file was already set with encryption key
file.copy("file_name", function(err, copiedFile, apiResponse) { // used the same filename
copiedFile.setEncryptionKey(new_encryptionKey);
copiedFile.save(); // rotate encryption key
}); |
Maybe we should have a method: file.rotateEncryptionKey(newKey, function(err) {}); This would handle doing the rewrite, and managing the headers. What do you think? |
+1 I agree can we move forward with this feature request? Ruby has this helper method in its client library. (Documentation). |
Sounds good to me, and thanks for the reference. |
@stephenplusplus is there a status on this request? |
@lukesneeringer has GCS on a code freeze while we are doing some code/repo re-organization. He can address the timeline aspect of this request. |
This issue was moved to googleapis/nodejs-storage#22 |
Hi,
In File.js of the Storage package, the function setEncryptionKey() helps set the "x-goog-encryption-key" header. Is there a function to set the "x-goog-copy-source-encryption-key header"? Can a function be added for this please?
The text was updated successfully, but these errors were encountered: