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

Make 'encryption_key' an attribute of the Blob. #2507

Merged
merged 2 commits into from
Oct 6, 2016
Merged

Make 'encryption_key' an attribute of the Blob. #2507

merged 2 commits into from
Oct 6, 2016

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Oct 6, 2016

Avoids the need to plumb it through all the upload_* and download_* methods.

Convert _set_encryption_headers(key, headers) into a pure function, _get_encryption_headers(key), returning a new dict.

Preparing for use of encryption in to-be-added Blob.rewrite(source_blob) method. See: #1960.

@tseaver tseaver added the api: storage Issues related to the Cloud Storage API. label Oct 6, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 6, 2016
@tseaver
Copy link
Contributor Author

tseaver commented Oct 6, 2016

/cc @jonparrott, as this change might affect the snippets which demonstrate use of customer-supplied encryption keys.

Avoids the need to plumb it through all the 'upload' and 'download'
methods.

Convert '_set_encryption_headers(key, headers)' into a pure function,
'_get_encryption_headers(key)', returning a new dict.

Preparing for use of encryption in to-be-added 'Blob.rewrite(source_blob)'
method.  See: #1960.
Copy link
Contributor

@dhermes dhermes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dhermes
Copy link
Contributor

dhermes commented Oct 6, 2016

Still LGTM after last commit

@tseaver
Copy link
Contributor Author

tseaver commented Oct 6, 2016

@dhermes While writing system tests for Blob.rewrite, I realized I needed to surface the encryption_key parameter at the Bucket.blob level, too. Unless you object, I will merge when that last, tiny change passes Travis.

@tseaver tseaver merged commit cc4c929 into googleapis:master Oct 6, 2016
@tseaver tseaver deleted the 1960-storage-blob_encryption_key_attr branch October 6, 2016 21:12
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
…ryption_key_attr

Make 'encryption_key' an attribute of the Blob.
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.

4 participants