storage: Use standard URL to use path instead of subdomain for bucket#638
Conversation
…cket. Fixes the SSL certificate being invalid for buckets containing dots.
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
|
For reference: This bugs was introduced in 93d7a12 |
|
Cool, thanks. This should resolve #624 then as well, right? |
|
I signed it! |
|
CLAs look good, thanks! |
|
Do you want to fix the tests or have me worry about it? |
|
I think that should fix #624 and it looks IMHO better than the fix provided there (seems a bit hacky). Will fix the unit test in a moment. |
|
Done. Or do you prefer the commits squashed together? |
|
This is perfect, thanks very much! |
storage: Use standard URL to use path instead of subdomain for bucket
|
Thank you very much, never got anything merged upstream that fast. Saves me some headaches for the deployment today :) |
|
Great! Never fear submitting patches and ideas here, we'll always get back pretty quickly :) |
We should be running `compile-protos` as part of prepare, do so. Fixes #632
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ts-loader](https://togithub.com/TypeStrong/ts-loader) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/ts-loader/7.0.5/8.0.0) | --- ### Release Notes <details> <summary>TypeStrong/ts-loader</summary> ### [`v8.0.0`](https://togithub.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md#v800) [Compare Source](https://togithub.com/TypeStrong/ts-loader/compare/v7.0.5...v8.0.0) - [Support for symlinks in project references](https://togithub.com/TypeStrong/ts-loader/pull/1136) - thanks [@​sheetalkamat](https://togithub.com/sheetalkamat)! - `ts-loader` now supports TypeScript 3.6 and greater **BREAKING CHANGE** </details> --- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-dialogflow).
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^14.17.3` -> `^16.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/14.17.32/16.11.6) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-compute).
Source-Link: googleapis/synthtool@cd78529 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:ddb19a6df6c1fa081bc99fb29658f306dd64668bc26f75d1353b28296f3a78e6
* feat: v4 signed url WIP * make version an optinoal * lint * add required host header * fix canonical query params joining * add test for defaulting to v2 * fix v4 signing with test * fix tests * refactor post-signing url construction v2/v4 * add v4 tests: response-content-type and generate parameters * convert signature to HEX * add conformance test * npm run fix * remove reduntant toLowerCase * do not promisify getDate() * add system-test for v4 signing * run conformance test along with system test * fix tests * add content-md5 and content-type to signed headers if given * Object.entries in not ES5 * npm run fix * split out conformance test * test: invalid version param given * mock out Date when testing instead of override Date * use Array.map to build canonical query * refactor: use dateformat library instead of writing a function * refactor: remove unused * remove reference to deleted methods * refactor: use string interpolation and dot accessor * refactor: use method chaining * add a comment about singled valued header * refactor signedHeaders * Number(x) * refactor: use query-string module as url.parse is deprecated * npm run fix * use query-string to build canonicalQueryParams * refactor: verb => method * refactor: use sinon.FakeTimers instead of timekeeper * npm run fix * use async/await for new system-test * use async/await for new test (2) * convert getSignedUrl tests to async/await * refactor: correctly filter out undefined header values * npm run fix * make v4 multi-valued header delimiter consistent with v2, (single `,`, no space) * copy stack trace * fix: replace ALL sequential spaces * OutgoingHttpHeaders use generic type .map; rename flattenObject => objectEntries * refactor: use build-in querystring * break up v2/v4 signed url query interface * add comments about the construction of canonical headers * npm run fix * git merge failed to put code in right place * test: assert SigningError thrown * test(v4): resumable upload * prefer string.includes over indexOf * npm run fix * docs: add a note on POST and X-Goog-Resumable * SEVEN_DAYS = 604800 * emit warning when using default version * emitWarning if using default version for signing * restore stub * add new line * test: v4 signed URL: conformance test (#638) * Revert "split out conformance test" This reverts commit ce00255c738e97bf6e3e602f7cca23fae3793d05. * sync conformance-test cases; parse cases without modification * this.skip * refactor: lift interface * remove default v2 warning * docs(samples): Samples for v4 Signed URL (#654) * remove timeout on conformance-test * npm run fix
Fixes the SSL certificate being invalid for buckets containing dots.
E.g. if you want to access the bucket
mybucket.example.comwithout this patch this results in the URLhttps://mybucket.example.com.storage.googleapis.com/for which the SSL certificate is not valid (the certificate captures direct subdomains only). This patch uses the equally generic URLhttps://storage.googleapis.com/mybucket.example.com/.