Skip to content
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

Closed
lukesneeringer opened this issue Sep 21, 2017 · 9 comments
Closed

Storage - file.js. Any way to set Source Encryption Key? #22

lukesneeringer opened this issue Sep 21, 2017 · 9 comments
Assignees
Labels
api: storage Issues related to the googleapis/nodejs-storage API. 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@lukesneeringer
Copy link
Contributor

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

@lukesneeringer
Copy link
Contributor Author

Hi @subra-vr,
Thanks for reporting this.

I just submitted #2324 which should give you what you need. Let me know if this solves your use case?

@lukesneeringer
Copy link
Contributor Author

From @conundrum888 on May 21, 2017 21:16

That should work, thanks.

@lukesneeringer
Copy link
Contributor Author

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
});

@lukesneeringer
Copy link
Contributor Author

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?

@lukesneeringer
Copy link
Contributor Author

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).

@lukesneeringer
Copy link
Contributor Author

From @stephenplusplus on July 20, 2017 21:47

Sounds good to me, and thanks for the reference.

@lukesneeringer
Copy link
Contributor Author

From @frankyn on August 3, 2017 16:22

@stephenplusplus is there a status on this request?

@lukesneeringer
Copy link
Contributor Author

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.

@stephenplusplus
Copy link
Contributor

PR sent: #81

@lukesneeringer lukesneeringer added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Nov 10, 2017
@ghost ghost removed priority: p2 Moderately-important priority. Fix may not be included in next release. type: enhancement labels Nov 10, 2017
@google-cloud-label-sync google-cloud-label-sync bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Jan 31, 2020
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants