Skip to content

Conversation

@stephenplusplus
Copy link
Contributor

@stephenplusplus stephenplusplus commented Jun 7, 2016

Fixes #1361

To Dos

  • Support a custom key (instead of generating one from a passphrase)
  • Support options.encryption in gcs-resumable-upload
  • Tests
    • System
    • Unit

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 7, 2016
@stephenplusplus stephenplusplus added api: storage Issues related to the Cloud Storage API. and removed cla: yes This human has signed the Contributor License Agreement. labels Jun 7, 2016
return {
key: key,
hash: crypto.createHash('sha256').update(key, 'base64').digest('base64')
};

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@jgeewax
Copy link
Contributor

jgeewax commented Jun 8, 2016

Just to confirm, the goal here is to be able to set a key when uploading a file. Eventually we might want a key-derivation library involved, but for now this is just about setting a key on a per-file basis.

@stephenplusplus
Copy link
Contributor Author

Let me know how far off #1364 (comment) is from what you're looking for.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 8, 2016
@stephenplusplus
Copy link
Contributor Author

If we only support uploading a file, the user would be blocked out from other operations, like downloading it. The way this PR works is:

  • the user provides a passphrase to file.encrypt()
  • every API request made with a file object (file.download, .copy, .createWriteStream, etc) will pass the generated key so that these operations don't fail

* });
* });
* });
*/

This comment was marked as spam.

This comment was marked as spam.

@stephenplusplus stephenplusplus force-pushed the spp--1361 branch 2 times, most recently from 4f84239 to 87d040b Compare June 10, 2016 12:48
@stephenplusplus
Copy link
Contributor Author

@callmehiphop PTAL!

@callmehiphop
Copy link
Contributor

callmehiphop commented Jun 10, 2016

@stephenplusplus I think npm might have messed up your most recent release of gcs-resumable-upload, both travis and my local are failing to install v0.7.x, however v0.6.x still seems to be installing fine in master.

@stephenplusplus
Copy link
Contributor Author

Fixed... v0.7.1.

@callmehiphop
Copy link
Contributor

This might be a slightly off-topic question, but the upstream documentation for sending encryption keys also mentions a separate set of headers for rewrite operations, which we don't appear to support - any reason why that is?

@stephenplusplus
Copy link
Contributor Author

rewrite is new! At least, since we had a Storage deep dive. Mind making an issue to remind us to add support?

@callmehiphop
Copy link
Contributor

Done! #1373

@coveralls
Copy link

coveralls commented Jun 10, 2016

Coverage Status

Changes Unknown when pulling 6e1df56 on stephenplusplus:spp--1361 into * on GoogleCloudPlatform:master*.

@callmehiphop callmehiphop merged commit d7e67f6 into googleapis:master Jun 10, 2016
sofisl pushed a commit that referenced this pull request Feb 3, 2026
* storage: allow custom file encryption

* npm publish woes.
sofisl pushed a commit that referenced this pull request Feb 3, 2026
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. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants