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? #2322

Closed
conundrum888 opened this issue May 21, 2017 · 9 comments
Closed

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

conundrum888 opened this issue May 21, 2017 · 9 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API. priority: p2 Moderately-important priority. Fix may not be included in next release.
Projects

Comments

@conundrum888
Copy link

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?

lukesneeringer added a commit to lukesneeringer/google-cloud-node that referenced this issue May 21, 2017
@lukesneeringer lukesneeringer self-assigned this May 21, 2017
@lukesneeringer
Copy link
Contributor

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?

@conundrum888
Copy link
Author

That should work, thanks.

@conundrum888 conundrum888 reopened this May 23, 2017
@stephenplusplus stephenplusplus added api: storage Issues related to the Cloud Storage API. type: enhancement labels May 23, 2017
@stephenplusplus stephenplusplus added this to Blocked in State Jun 12, 2017
@frankyn
Copy link
Member

frankyn commented Jul 20, 2017

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

@stephenplusplus
Copy link
Contributor

stephenplusplus commented Jul 20, 2017

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?

@frankyn
Copy link
Member

frankyn commented Jul 20, 2017

+1 I agree can we move forward with this feature request? Ruby has this helper method in its client library. (Documentation).

@stephenplusplus
Copy link
Contributor

Sounds good to me, and thanks for the reference.

@stephenplusplus stephenplusplus self-assigned this Jul 21, 2017
@frankyn
Copy link
Member

frankyn commented Aug 3, 2017

@stephenplusplus is there a status on this request?

@stephenplusplus
Copy link
Contributor

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

@eoogbe eoogbe added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Aug 7, 2017
@lukesneeringer
Copy link
Contributor

This issue was moved to googleapis/nodejs-storage#22

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 Cloud Storage API. priority: p2 Moderately-important priority. Fix may not be included in next release.
Projects
No open projects
State
Attention Required
Development

No branches or pull requests

6 participants