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

Add virtual hosted-style support for signurl gen. #6183

Merged
merged 9 commits into from
Oct 1, 2019

Commits on Sep 3, 2019

  1. Add virtual hosted-style support for signurl gen.

    Adds new methods to produce a SignUrlOption that results in generated
    signed URLs using virtual-hosted-style URLs (i.e.
    mybucket.storage.googleapis.com instead of
    storage.googleapis.com/mybucket).
    
    One option allows specifying the virtual hostname explicitly (for the
    case where someone might have a custom subdomain, with a bucket of the
    same name, CNAME'd to c.storage.googleapis.com), while the other will
    implicitly construct the hostname using the bucket from the passed-in
    BlobInfo.
    
    Addresses part of https://issuetracker.google.com/issues/130190655.
    houglum committed Sep 3, 2019
    Configuration menu
    Copy the full SHA
    e112b08 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2019

  1. Add withPathStyle() method for new SignUrlOption.

    This allows creating a signed URL in path-style (bucket in the path
    component of the URI instead of in the hostname, i.e. virtual
    hosted-style). Note that this was already the default behavior, but
    adding this method allows us to more easily switch the default behavior
    in the future; virtual hosted-style is considered best practice.
    houglum committed Sep 12, 2019
    Configuration menu
    Copy the full SHA
    c91d831 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2019

  1. Run code formatter.

    houglum committed Sep 16, 2019
    Configuration menu
    Copy the full SHA
    34bef2c View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2019

  1. Remove unnecessary override, rename methods.

    Per code review comments.
    houglum committed Sep 20, 2019
    Configuration menu
    Copy the full SHA
    1517686 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2019

  1. Correctly populate+sign host header for sigV4 URLs

    The Signature V2 doesn't require us to sign the "host" header, but the
    Signature V4 process requires it. We need to ensure we're populating and
    signing the same host header value as is used in the request URL.
    houglum committed Sep 24, 2019
    Configuration menu
    Copy the full SHA
    95787a2 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2019

  1. Configuration menu
    Copy the full SHA
    41252dd View commit details
    Browse the repository at this point in the history
  2. Update docs with examples.

    houglum committed Sep 26, 2019
    Configuration menu
    Copy the full SHA
    0f29d2f View commit details
    Browse the repository at this point in the history
  3. Add tests for withVirtualHostedStyle, fix bug.

    I discovered a bug with one of my previous commits, where I was
    incorrectly determining whether to use Signature Version 2. This commit
    makes two new (private) methods that determine the correct default
    option to use, taking default values into account.
    houglum committed Sep 26, 2019
    Configuration menu
    Copy the full SHA
    4cda395 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2019

  1. Add example URL to docstring.

    houglum committed Sep 30, 2019
    Configuration menu
    Copy the full SHA
    fc6e31e View commit details
    Browse the repository at this point in the history