GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(storage): Add cname support for V4 signature by HemangChothani · Pull Request #72 · googleapis/python-storage

This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Conversation

@HemangChothani

@HemangChothani HemangChothani commented Feb 26, 2020

Copy link
Copy Markdown
Contributor

Fixes #11

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
HemangChothani added 2 commits February 25, 2020 11:19
@HemangChothani
feat(storage): add cname support for v4 signature
f06d48f
@HemangChothani
docs(storage): comment changes
ad1afc9
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 26, 2020
@HemangChothani
HemangChothani requested review from crwilcox and frankyn February 26, 2020 11:26
@HemangChothani
Merge remote-tracking branch 'upstream/master' into storage-issue-11
89b4061
frankyn
frankyn suggested changes Feb 26, 2020
View reviewed changes
Comment thread google/cloud/storage/blob.py Outdated
service_account_email=None,
access_token=None,
virtual_hosted_style=False,
use_cname=None,

@frankyn frankyn Feb 26, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Please use parameter name: bucket_bound_host_name. I prefer that this parameter be passed in a string and is an alias for api_access_endpoint=. I'd prefer not required two parameters to set bucket_bound_host_name as enabled.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@frankyn frankyn mentioned this pull request Feb 26, 2020
feat: add CNAME-based hostname support for V4 signed URLs #73
Closed
HemangChothani and others added 4 commits February 27, 2020 12:34
@HemangChothani
feat(storage): address comment
273f770
@HemangChothani
Merge remote-tracking branch 'upstream/master' into storage-issue-11
1c88840
@HemangChothani
feat(storage): doc fix
4057ae7
@frankyn
Merge branch 'master' into storage-issue-11
7cf7762
frankyn
frankyn suggested changes Mar 5, 2020
View reviewed changes

@frankyn frankyn left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for your patience @HemangChothani, I have a few nits.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/storage/blob.py Outdated
See: https://cloud.google.com/storage/docs/request-endpoints#cname

:type host_name_scheme: str
:param host_name_scheme:

@frankyn frankyn Mar 5, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

prefer scheme here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/storage/bucket.py Outdated
amount of time, you can use this method to generate a URL that
is only valid within a certain time period.

If ``cname`` is set as an argument of :attr:`api_access_endpoint`, ``https`` works only if using a ``CDN``.

@frankyn frankyn Mar 5, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

cname no longer used in method signature should be updated.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/storage/bucket.py Outdated
if ":" in bucket_bound_host_name:
api_access_endpoint = bucket_bound_host_name
else:
api_access_endpoint = "{scheme}://{cname}".format(

@frankyn frankyn Mar 5, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

use bucket_bound_hostname to not go back and forth between cname

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/storage/bucket.py
is only valid within a certain time period.

If ``cname`` is set as an argument of :attr:`api_access_endpoint`, ``https`` works only if using a ``CDN``.

@frankyn frankyn Mar 5, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Add an inline example of using bucket_bound_hostname and scheme

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/storage/bucket.py Outdated
credentials=None,
version=None,
virtual_hosted_style=False,
bucket_bound_host_name=None,

@frankyn frankyn Mar 5, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

use: bucket_bound_hostname

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
frankyn and others added 3 commits March 5, 2020 20:04
@frankyn
Merge branch 'master' into storage-issue-11
f09a1a8
@HemangChothani
feat(storage): nit addressed
3b96e62
@HemangChothani
Merge remote-tracking branch 'upstream/master' into storage-issue-11
a39064f
frankyn
frankyn reviewed Mar 6, 2020
View reviewed changes

@frankyn frankyn left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is missing conformance tests for this support.

Did you want to do that in a follow-up PR or add it to this one?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@HemangChothani
feat(storage): add conformance tests
3f01a04
frankyn
frankyn suggested changes Mar 10, 2020
View reviewed changes

@frankyn frankyn left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

One last nit, thanks @HemangChothani

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/unit/test__signing.py Outdated
def test_conformance_bucket(test_data):
resource = "/{}".format(test_data["bucket"])
_run_conformance_test(resource, test_data)
if "urlStyle" in test_data and test_data["urlStyle"] == "BUCKET_BOUND_DOMAIN":

@frankyn frankyn Mar 10, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Please update to latest release of conformance tests this value was updated to BUCKET_BOUND_HOSTNAME. Last nit.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
frankyn added 2 commits March 9, 2020 23:12
@frankyn
Merge branch 'master' into storage-issue-11
f927dc3
@frankyn
Merge branch 'master' into storage-issue-11
beeae99
@frankyn

frankyn commented Mar 10, 2020

Copy link
Copy Markdown
Contributor

Friendly ping, @HemangChothani

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@HemangChothani
feat(storage): nit
6af0085
frankyn
frankyn approved these changes Mar 11, 2020
View reviewed changes

@frankyn frankyn left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@frankyn
frankyn merged commit cc853af into googleapis:master Mar 11, 2020
@HemangChothani

HemangChothani commented Mar 11, 2020

Copy link
Copy Markdown
Contributor Author

@frankyn Do we need to add conformance tests for virtual_hosted_style?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@frankyn

frankyn commented Mar 11, 2020

Copy link
Copy Markdown
Contributor

Good, catch, that was not implemented in #58 could you pick that up?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@HemangChothani

HemangChothani commented Mar 11, 2020

Copy link
Copy Markdown
Contributor Author

@frankyn Yes sure, thanks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@frankyn

frankyn commented Mar 11, 2020

Copy link
Copy Markdown
Contributor

@tseaver was working on this in #57

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
@HemangChothani @frankyn @cojenco
feat(storage): Add cname support for V4 signature (googleapis#72)
549880b
* feat(storage): add cname support for v4 signature

* docs(storage): comment changes

* feat(storage): address comment

* feat(storage): doc fix

* feat(storage): nit addressed

* feat(storage): add conformance tests

* feat(storage): nit

Co-authored-by: Frank Natividad <[email protected]>
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
@HemangChothani @frankyn @cojenco
feat(storage): Add cname support for V4 signature (googleapis#72)
ccfb9ec
* feat(storage): add cname support for v4 signature

* docs(storage): comment changes

* feat(storage): address comment

* feat(storage): doc fix

* feat(storage): nit addressed

* feat(storage): add conformance tests

* feat(storage): nit

Co-authored-by: Frank Natividad <[email protected]>
@release-please release-please Bot mentioned this pull request Jan 12, 2022
chore(main): release 3.0.0 #688
Closed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@crwilcox crwilcox Awaiting requested review from crwilcox
1 more reviewer
@frankyn frankyn frankyn approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Storage] V4 Signature Signed URLs With Bucket-Bound Hostnames

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@HemangChothani @frankyn @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.