-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Separate use-cases for generating signed object references #106
Comments
I would prefer not to introduce a new method invocation style (so API is simple to learn/use). Current styles are:
Canonicalized_Extension_Headers option was not added as I found it confusing and I saw that also other clients such as gsutil were selective in what options they expose. However, it should be simple to add as another I am not sure where it is specified that md5 and contentType are not allowed for GET, HEAD,.. In general, after I got that as a feedback from the Datastore review, in the API am a trying to force |
Content-MD5 and Content-Type both refer to the entity contained in the message. For GET, HEAD and DELETE there is no entity allowed in the request so these would not apply. They make sense if the user wants to constrain a PUT request so that the client can only upload data of a certain type or specific data. Use-case would be:
That's assuming the client isn't doing a resumable upload. |
@Capstan can you confirm? |
@jboynes is correct. For those HTTP verbs, there'd be no body for which those headers apply. You could specify them, but they'd be at best a no-op (Content-Type: whatever, Content-MD5: 1B2M2Y8AsgTpgAmY7PhCfg==) or worse an error for a MD5 mismatch presuming we check, which I'm not sure we do. |
Ok, good to know. I don't think this is clear in this documentation and therefore assumed it would be used to verify header matching regardless of the request type. I assumed it could be used, for example, to provide a signed URL to get a content of specific/version-of blob only if it was not modified (by using the MD5 header). |
Happy to take docs suggestions. Both of them are marked optional in the table in the docs you pointed to, and talk about the request not the response. Canonical Extension Headers refer to those extension headers that you may want to allow the user to specify. e.g.,
POST policies even allow more specific conditions. |
@mziccard My preference is to keep the library method dispatching style consistent, and minimize on client side validation. I agree, that we could be more "user-friendly" using the suggestion above for |
I would keep this as simple as possible. I agree that we should not change the library style. I don't think that having a method chain like:
helps a lot. AWS APIs use a |
Yes, I doubt that adding another Looks like we both think we can leave it as is, so I am closing it for now. |
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 456641589 Source-Link: googleapis/googleapis@8a251f5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4ca52a529cf01308d9714950edffbea3560cfbdb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGNhNTJhNTI5Y2YwMTMwOGQ5NzE0OTUwZWRmZmJlYTM1NjBjZmJkYiJ9
This PR was generated using Autosynth. 🌈 <details><summary>Log from Synthtool</summary> ``` 2020-03-17 11:48:00,106 synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .github/PULL_REQUEST_TEMPLATE.md .github/release-please.yml .github/trusted-contribution.yml .kokoro/build.bat .kokoro/build.sh .kokoro/coerce_logs.sh .kokoro/common.cfg .kokoro/continuous/common.cfg .kokoro/continuous/dependencies.cfg .kokoro/continuous/integration.cfg .kokoro/continuous/java11.cfg .kokoro/continuous/java7.cfg .kokoro/continuous/java8-osx.cfg .kokoro/continuous/java8-win.cfg .kokoro/continuous/java8.cfg .kokoro/continuous/lint.cfg .kokoro/continuous/propose_release.cfg .kokoro/continuous/samples.cfg .kokoro/dependencies.sh .kokoro/linkage-monitor.sh .kokoro/nightly/common.cfg .kokoro/nightly/dependencies.cfg .kokoro/nightly/integration.cfg .kokoro/nightly/java11.cfg .kokoro/nightly/java7.cfg .kokoro/nightly/java8-osx.cfg .kokoro/nightly/java8-win.cfg .kokoro/nightly/java8.cfg .kokoro/nightly/lint.cfg .kokoro/nightly/samples.cfg .kokoro/presubmit/clirr.cfg .kokoro/presubmit/common.cfg .kokoro/presubmit/dependencies.cfg .kokoro/presubmit/integration.cfg .kokoro/presubmit/java11.cfg .kokoro/presubmit/java7.cfg .kokoro/presubmit/java8-osx.cfg .kokoro/presubmit/java8-win.cfg .kokoro/presubmit/java8.cfg .kokoro/presubmit/linkage-monitor.cfg .kokoro/presubmit/lint.cfg .kokoro/presubmit/samples.cfg .kokoro/release/bump_snapshot.cfg .kokoro/release/common.cfg .kokoro/release/common.sh .kokoro/release/drop.cfg .kokoro/release/drop.sh .kokoro/release/promote.cfg .kokoro/release/promote.sh .kokoro/release/publish_javadoc.cfg .kokoro/release/publish_javadoc.sh .kokoro/release/snapshot.cfg .kokoro/release/snapshot.sh .kokoro/release/stage.cfg .kokoro/release/stage.sh .kokoro/trampoline.sh CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md codecov.yaml java.header license-checks.xml renovate.json samples/install-without-bom/pom.xml samples/pom.xml samples/snapshot/pom.xml samples/snippets/pom.xml 2020-03-17 11:48:00,397 synthtool > merge: CODE_OF_CONDUCT.md 2020-03-17 11:48:00,398 synthtool > merge: java.header 2020-03-17 11:48:00,398 synthtool > merge: license-checks.xml 2020-03-17 11:48:00,398 synthtool > merge: LICENSE 2020-03-17 11:48:00,399 synthtool > merge: README.md 2020-03-17 11:48:00,399 synthtool > merge: CONTRIBUTING.md 2020-03-17 11:48:00,399 synthtool > merge: renovate.json 2020-03-17 11:48:00,400 synthtool > merge: codecov.yaml 2020-03-17 11:48:00,401 synthtool > merge: .kokoro/build.sh 2020-03-17 11:48:00,401 synthtool > merge: .kokoro/coerce_logs.sh 2020-03-17 11:48:00,401 synthtool > merge: .kokoro/dependencies.sh 2020-03-17 11:48:00,402 synthtool > merge: .kokoro/linkage-monitor.sh 2020-03-17 11:48:00,402 synthtool > merge: .kokoro/trampoline.sh 2020-03-17 11:48:00,402 synthtool > merge: .kokoro/common.cfg 2020-03-17 11:48:00,402 synthtool > merge: .kokoro/build.bat 2020-03-17 11:48:00,403 synthtool > merge: .kokoro/release/promote.sh 2020-03-17 11:48:00,403 synthtool > merge: .kokoro/release/snapshot.sh 2020-03-17 11:48:00,403 synthtool > merge: .kokoro/release/stage.sh 2020-03-17 11:48:00,404 synthtool > merge: .kokoro/release/bump_snapshot.cfg 2020-03-17 11:48:00,404 synthtool > merge: .kokoro/release/drop.cfg 2020-03-17 11:48:00,404 synthtool > merge: .kokoro/release/snapshot.cfg 2020-03-17 11:48:00,404 synthtool > merge: .kokoro/release/promote.cfg 2020-03-17 11:48:00,405 synthtool > merge: .kokoro/release/publish_javadoc.sh 2020-03-17 11:48:00,405 synthtool > merge: .kokoro/release/common.cfg 2020-03-17 11:48:00,405 synthtool > merge: .kokoro/release/drop.sh 2020-03-17 11:48:00,405 synthtool > merge: .kokoro/release/publish_javadoc.cfg 2020-03-17 11:48:00,406 synthtool > merge: .kokoro/release/stage.cfg 2020-03-17 11:48:00,406 synthtool > merge: .kokoro/release/common.sh 2020-03-17 11:48:00,406 synthtool > merge: .kokoro/nightly/lint.cfg 2020-03-17 11:48:00,406 synthtool > merge: .kokoro/nightly/java11.cfg 2020-03-17 11:48:00,407 synthtool > merge: .kokoro/nightly/samples.cfg 2020-03-17 11:48:00,407 synthtool > merge: .kokoro/nightly/java8.cfg 2020-03-17 11:48:00,407 synthtool > merge: .kokoro/nightly/java7.cfg 2020-03-17 11:48:00,407 synthtool > merge: .kokoro/nightly/common.cfg 2020-03-17 11:48:00,408 synthtool > merge: .kokoro/nightly/dependencies.cfg 2020-03-17 11:48:00,408 synthtool > merge: .kokoro/nightly/java8-osx.cfg 2020-03-17 11:48:00,408 synthtool > merge: .kokoro/nightly/java8-win.cfg 2020-03-17 11:48:00,409 synthtool > merge: .kokoro/nightly/integration.cfg 2020-03-17 11:48:00,409 synthtool > merge: .kokoro/presubmit/lint.cfg 2020-03-17 11:48:00,409 synthtool > merge: .kokoro/presubmit/clirr.cfg 2020-03-17 11:48:00,409 synthtool > merge: .kokoro/presubmit/java11.cfg 2020-03-17 11:48:00,410 synthtool > merge: .kokoro/presubmit/samples.cfg 2020-03-17 11:48:00,410 synthtool > merge: .kokoro/presubmit/linkage-monitor.cfg 2020-03-17 11:48:00,410 synthtool > merge: .kokoro/presubmit/java8.cfg 2020-03-17 11:48:00,410 synthtool > merge: .kokoro/presubmit/java7.cfg 2020-03-17 11:48:00,411 synthtool > merge: .kokoro/presubmit/common.cfg 2020-03-17 11:48:00,411 synthtool > merge: .kokoro/presubmit/dependencies.cfg 2020-03-17 11:48:00,411 synthtool > merge: .kokoro/presubmit/java8-osx.cfg 2020-03-17 11:48:00,411 synthtool > merge: .kokoro/presubmit/java8-win.cfg 2020-03-17 11:48:00,412 synthtool > merge: .kokoro/presubmit/integration.cfg 2020-03-17 11:48:00,412 synthtool > merge: .kokoro/continuous/lint.cfg 2020-03-17 11:48:00,412 synthtool > merge: .kokoro/continuous/java11.cfg 2020-03-17 11:48:00,412 synthtool > merge: .kokoro/continuous/samples.cfg 2020-03-17 11:48:00,413 synthtool > merge: .kokoro/continuous/java8.cfg 2020-03-17 11:48:00,413 synthtool > merge: .kokoro/continuous/java7.cfg 2020-03-17 11:48:00,413 synthtool > merge: .kokoro/continuous/propose_release.cfg 2020-03-17 11:48:00,413 synthtool > merge: .kokoro/continuous/common.cfg 2020-03-17 11:48:00,414 synthtool > merge: .kokoro/continuous/dependencies.cfg 2020-03-17 11:48:00,414 synthtool > merge: .kokoro/continuous/java8-osx.cfg 2020-03-17 11:48:00,414 synthtool > merge: .kokoro/continuous/java8-win.cfg 2020-03-17 11:48:00,415 synthtool > merge: .kokoro/continuous/integration.cfg 2020-03-17 11:48:00,415 synthtool > merge: .github/trusted-contribution.yml 2020-03-17 11:48:00,415 synthtool > merge: .github/release-please.yml 2020-03-17 11:48:00,415 synthtool > merge: .github/PULL_REQUEST_TEMPLATE.md 2020-03-17 11:48:00,416 synthtool > merge: .github/ISSUE_TEMPLATE/feature_request.md 2020-03-17 11:48:00,416 synthtool > merge: .github/ISSUE_TEMPLATE/bug_report.md 2020-03-17 11:48:00,416 synthtool > merge: .github/ISSUE_TEMPLATE/support_request.md 2020-03-17 11:48:00,417 synthtool > Wrote metadata to synth.metadata. ``` </details>
…ion to v1.1.1 (googleapis#106) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-vmmigration](https://togithub.com/googleapis/java-vmmigration) | `1.1.0` -> `1.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-vmmigration/1.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-vmmigration/1.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-vmmigration/1.1.1/compatibility-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-vmmigration/1.1.1/confidence-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-vmmigration).
This PR was generated using Autosynth. 🌈 <details><summary>Log from Synthtool</summary> ``` 2020-10-22 20:44:31,245 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-workflows/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working directory clean 2020-10-22 20:44:32,157 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ``` </details> Full log will be available here: https://source.cloud.google.com/results/invocations/5b24a547-4f41-454f-a556-0361f1ccb070/targets - [ ] To automatically regenerate this PR, check this box.
🤖 I have created a release *beep* *boop* --- ## [1.2.0](googleapis/java-ids@v1.1.1...v1.2.0) (2022-07-01) ### Features * Enable REST transport for most of Java and Go clients ([googleapis#106](googleapis/java-ids#106)) ([5bd7ad6](googleapis/java-ids@5bd7ad6)) ### Bug Fixes * update gapic-generator-java with mock service generation fixes ([googleapis#112](googleapis/java-ids#112)) ([7b38e44](googleapis/java-ids@7b38e44)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [0.3.2](googleapis/java-eventarc-publishing@v0.3.1...v0.3.2) (2022-08-09) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#103](googleapis/java-eventarc-publishing#103)) ([d33c24a](googleapis/java-eventarc-publishing@d33c24a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…ator_java versions (#106) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 472750037 Source-Link: googleapis/googleapis@88f2ea3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/230a5588306aae18fe8f2a57f14d4039ad72c901 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMwYTU1ODgzMDZhYWUxOGZlOGYyYTU3ZjE0ZDQwMzlhZDcyYzkwMSJ9
🤖 I have created a release *beep* *boop* --- ## [0.3.7](https://togithub.com/googleapis/java-bare-metal-solution/compare/v0.3.6...v0.3.7) (2022-10-03) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#105](https://togithub.com/googleapis/java-bare-metal-solution/issues/105)) ([ef7af9f](https://togithub.com/googleapis/java-bare-metal-solution/commit/ef7af9fda1c9eea362cf5da5d11e77e026b0574d)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [1.1.3](https://togithub.com/googleapis/java-dataplex/compare/v1.1.2...v1.1.3) (2022-10-03) ### Dependencies * Update dependency certifi to v2022.9.24 ([#105](https://togithub.com/googleapis/java-dataplex/issues/105)) ([9ec5871](https://togithub.com/googleapis/java-dataplex/commit/9ec587107037a27ebf3f641ee6fc591d8cd6a8cd)) * Update dependency charset-normalizer to v2.1.1 ([#110](https://togithub.com/googleapis/java-dataplex/issues/110)) ([aebc143](https://togithub.com/googleapis/java-dataplex/commit/aebc1435ba5b0ec9e1b38afeca7f4b3abef3682d)) * Update dependency click to v8.1.3 ([#111](https://togithub.com/googleapis/java-dataplex/issues/111)) ([a649c72](https://togithub.com/googleapis/java-dataplex/commit/a649c72a80c3043ec4b58791b8172ffc5e65f670)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#129](https://togithub.com/googleapis/java-dataplex/issues/129)) ([01e197b](https://togithub.com/googleapis/java-dataplex/commit/01e197b7ebb984eabd4cc77abde29fa70089c28c)) * Update dependency gcp-releasetool to v1.8.8 ([#106](https://togithub.com/googleapis/java-dataplex/issues/106)) ([6c7529d](https://togithub.com/googleapis/java-dataplex/commit/6c7529d2ed8c5e1e57e5686b28f8cf52ecf443b2)) * Update dependency google-api-core to v2.10.1 ([#112](https://togithub.com/googleapis/java-dataplex/issues/112)) ([83adb9a](https://togithub.com/googleapis/java-dataplex/commit/83adb9a379bd46f95277370713aa08eb3b6551d9)) * Update dependency google-auth to v2.11.1 ([#107](https://togithub.com/googleapis/java-dataplex/issues/107)) ([7857c3b](https://togithub.com/googleapis/java-dataplex/commit/7857c3be9080b0f6498f2f61b5d5eafb79fae06d)) * Update dependency google-cloud-core to v2.3.2 ([#108](https://togithub.com/googleapis/java-dataplex/issues/108)) ([2ba0594](https://togithub.com/googleapis/java-dataplex/commit/2ba059481a696983ac4b08bb9b8b31335c8f6ba9)) * Update dependency google-cloud-storage to v2.5.0 ([#113](https://togithub.com/googleapis/java-dataplex/issues/113)) ([ea11bee](https://togithub.com/googleapis/java-dataplex/commit/ea11bee7e65cd393c08b9addcb25965440fb0434)) * Update dependency google-crc32c to v1.5.0 ([#114](https://togithub.com/googleapis/java-dataplex/issues/114)) ([dd9dacb](https://togithub.com/googleapis/java-dataplex/commit/dd9dacb0ea4e70db8e0f5162fe900b9656a457df)) * Update dependency googleapis-common-protos to v1.56.4 ([#109](https://togithub.com/googleapis/java-dataplex/issues/109)) ([fed3704](https://togithub.com/googleapis/java-dataplex/commit/fed3704df12e7ec68d5e16b894f442c61a29cba6)) * Update dependency importlib-metadata to v4.12.0 ([#124](https://togithub.com/googleapis/java-dataplex/issues/124)) ([fde2280](https://togithub.com/googleapis/java-dataplex/commit/fde2280152f4376d04424536d79a9dc87ffbe176)) * Update dependency jeepney to v0.8.0 ([#125](https://togithub.com/googleapis/java-dataplex/issues/125)) ([b38a113](https://togithub.com/googleapis/java-dataplex/commit/b38a113ea529577778042bd40e1236a6e6fbbeae)) * Update dependency jinja2 to v3.1.2 ([#126](https://togithub.com/googleapis/java-dataplex/issues/126)) ([a9a5b03](https://togithub.com/googleapis/java-dataplex/commit/a9a5b036002c04c4d76f43332ecaa2b3c5d6aaec)) * Update dependency keyring to v23.9.3 ([#127](https://togithub.com/googleapis/java-dataplex/issues/127)) ([0772b45](https://togithub.com/googleapis/java-dataplex/commit/0772b4549c4e285dcea9f7551f9eeb684e2073a4)) * Update dependency markupsafe to v2.1.1 ([#115](https://togithub.com/googleapis/java-dataplex/issues/115)) ([71ecee0](https://togithub.com/googleapis/java-dataplex/commit/71ecee06bd02ad777d5f24b8f5f8f8bce7b40242)) * Update dependency protobuf to v3.20.2 ([#116](https://togithub.com/googleapis/java-dataplex/issues/116)) ([d7049a4](https://togithub.com/googleapis/java-dataplex/commit/d7049a49e141ab098f3e0b1a80b807d74a15fc96)) * Update dependency requests to v2.28.1 ([#118](https://togithub.com/googleapis/java-dataplex/issues/118)) ([3fd6dc4](https://togithub.com/googleapis/java-dataplex/commit/3fd6dc4ee3f2368149425ef43158fbd4d6796ed7)) * Update dependency zipp to v3.8.1 ([#120](https://togithub.com/googleapis/java-dataplex/issues/120)) ([2215798](https://togithub.com/googleapis/java-dataplex/commit/221579818ffe58bbcf037a61413e64164ac5fc37)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
There's currently one method for generating signed references:
There are a number of
SignUrlOption
types but its not clear from the interface which ones can be used in combination. For example:I also don't see how extension headers or the base URL would be specified.
Instead, can we use a method chain for this:
The text was updated successfully, but these errors were encountered: