-
Notifications
You must be signed in to change notification settings - Fork 367
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? #22
Comments
Hi @subra-vr, I just submitted #2324 which should give you what you need. Let me know if this solves your use case? |
From @conundrum888 on May 21, 2017 21:16 That should work, thanks. |
From @frankyn on July 20, 2017 18:28 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
}); |
From @stephenplusplus on July 20, 2017 21:43 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? |
From @frankyn on July 20, 2017 21:46 +1 I agree can we move forward with this feature request? Ruby has this helper method in its client library. (Documentation). |
From @stephenplusplus on July 20, 2017 21:47 Sounds good to me, and thanks for the reference. |
From @frankyn on August 3, 2017 16:22 @stephenplusplus is there a status on this request? |
From @stephenplusplus on August 3, 2017 16:45 @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. |
PR sent: #81 |
From @conundrum888 on May 21, 2017 14:26
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?
Copied from original issue: googleapis/google-cloud-node#2322
The text was updated successfully, but these errors were encountered: