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

Fix #57: Factor 'generate_signed_url' into a free function in 'gcloud.credentials' #356

Closed
wants to merge 1 commit into from
Closed

Fix #57: Factor 'generate_signed_url' into a free function in 'gcloud.credentials' #356

wants to merge 1 commit into from

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Nov 7, 2014

Leave a wrapper method in 'gcloud.storage.connection.Connection'.

Fixes #57.

…als'.

Leave a wrapper method in 'gcloud.storage.connection.Connection'.

Fixes #57.
@silvolu
Copy link
Contributor

silvolu commented Nov 7, 2014

Why move this to credentials? This is a Cloud Storage bound functionality.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 3a27356 on tseaver:57-factor_p12_signing_into_credentials into * on GoogleCloudPlatform:master*.

@tseaver
Copy link
Contributor Author

tseaver commented Nov 7, 2014

Hmm, I was under the impression from #57 that it had wider applicability (maybe in services we don't yet implement?)

@silvolu
Copy link
Contributor

silvolu commented Nov 7, 2014

Not that I'm aware of, asked jj on #57.

@tseaver
Copy link
Contributor Author

tseaver commented Nov 7, 2014

Looking at the free function, the API doesn't appear to be too storage specific: the required parameters are:

  • credentials ( generic oauth2client)
  • endpoint (nethost + unvarying path prefix)
  • resource (varying path suffix)
  • expiration (timeout)
    I could see applying those concepts to any hierarchical URL space (DNS, for instance).

@dhermes
Copy link
Contributor

dhermes commented Nov 7, 2014

It is bound to cloud storage.

@silvolu
Copy link
Contributor

silvolu commented Nov 7, 2014

Yeah, the function is just signing a url, but AFAIK is used only in Cloud Storage to give non-google accounts temporary access to objects, that's why I wondered about moving it.
I guess if we move it on the principle that is a generic function that can be used in other services, than we should move it to the oauth2client.

@tseaver
Copy link
Contributor Author

tseaver commented Nov 7, 2014

It does feel more tightly bound to the credentials than anything else: it was definitely bolted on to the storage's Connection object (added imports of all that crypto stuff, etc.)

@@ -24,7 +24,7 @@ ignore = datastore_v1_pb2.py
disable = I, protected-access, maybe-no-member, no-member,
redefined-builtin, star-args, missing-format-attribute,
similarities, arguments-differ,
too-many-public-methods, too-few-public-methods
too-many-public-methods, too-few-public-methods, too-many-locals

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Nov 7, 2014

If this actually needs to be moved, it should be in gcloud.storage.credentials not in gcloud.credentials.

However, I really see no point to moving it.

@tseaver
Copy link
Contributor Author

tseaver commented Nov 7, 2014

I still haven't heard anybody explain why it has anything specific to do with storage: it is about creating a signature for an API URL (endpoint + extra path). It doesn't interact with the back-end in any way at all.

I'm not actually arguing to land this PR: if #57 doesn't represent a valid concern, we can just close both it and this one.

@dhermes
Copy link
Contributor

dhermes commented Nov 7, 2014

I vote for closing it and this one.

@silvolu silvolu closed this Nov 10, 2014
@tseaver tseaver deleted the 57-factor_p12_signing_into_credentials branch November 10, 2014 23:20
@dhermes dhermes added api: storage Issues related to the Cloud Storage API. auth labels Dec 31, 2015
urshala pushed a commit to urshala/google-cloud-python that referenced this pull request Jan 17, 2020
atulep pushed a commit that referenced this pull request Apr 3, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this pull request Apr 6, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this pull request Apr 6, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this pull request Apr 18, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Jun 4, 2023
Source-Link: https://github.com/googleapis/synthtool/commit/d0f51a0c2a9a6bcca86911eabea9e484baadf64b
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:240b5bcc2bafd450912d2da2be15e62bc6de2cf839823ae4bf94d4f392b451dc
parthea added a commit that referenced this pull request Jun 4, 2023
* chore(bazel): update protobuf to v3.21.3

chore(bazel): update gax-java to 2.18.4

PiperOrigin-RevId: 463115700

Source-Link: googleapis/googleapis@52130a9

Source-Link: googleapis/googleapis-gen@6a4d9d9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmE0ZDlkOWJiM2FmYjIwYjBmNWZhNGY1ZDlmNjc0MGIxZDBlYjE5YSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Jun 4, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 472561635

Source-Link: googleapis/googleapis@332ecf5

Source-Link: googleapis/googleapis-gen@4313d68
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDMxM2Q2ODI4ODBmZDlkNzI0NzI5MTE2NGQ0ZTlkM2Q1YmQ5ZjE3NyJ9
parthea pushed a commit that referenced this pull request Jul 6, 2023
…[autoapprove] (#356)

Source-Link: googleapis/synthtool@1f37ce7
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8e84e0e0d71a0d681668461bba02c9e1394c785f31a10ae3470660235b673086
parthea pushed a commit that referenced this pull request Sep 20, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-cloud-bigquery](https://github.com/googleapis/python-bigquery) | `==3.3.3` -> `==3.3.5` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/3.3.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/3.3.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/3.3.5/compatibility-slim/3.3.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/3.3.5/confidence-slim/3.3.3)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/python-bigquery</summary>

### [`v3.3.5`](https://github.com/googleapis/python-bigquery/releases/tag/v3.3.5)

[Compare Source](https://github.com/googleapis/python-bigquery/compare/v3.3.3...v3.3.5)

##### Bug Fixes

-   **deps:** Allow protobuf 3.19.5 ([#&#8203;1379](https://github.com/googleapis/python-bigquery/issues/1379)) ([3e4a074](https://github.com/googleapis/python-bigquery/commit/3e4a074a981eb2920c5f9a711c253565d4844858))

</details>

---

### 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**: Whenever PR becomes conflicted, 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 [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-retail).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMzAuMCIsInVwZGF0ZWRJblZlciI6IjMyLjIzMC4wIn0=-->
parthea pushed a commit that referenced this pull request Sep 22, 2023
Source-Link: https://github.com/googleapis/synthtool/commit/30bd01b4ab78bf1b2a425816e15b3e7e090993dd
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:9bc5fa3b62b091f60614c08a7fb4fd1d3e1678e326f34dd66ce1eefb5dc3267b
parthea added a commit that referenced this pull request Sep 22, 2023
* docs: minor typo fix

PiperOrigin-RevId: 513869216

Source-Link: googleapis/googleapis@ec2020a

Source-Link: googleapis/googleapis-gen@df7a1af
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGY3YTFhZjk4NGYyNmNiM2JlYjIxMmI3ZGQ1Mjk3Yzk3MTc1YTIxMyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: minor typo fix

PiperOrigin-RevId: 513869294

Source-Link: googleapis/googleapis@0017949

Source-Link: googleapis/googleapis-gen@8edd875
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGVkZDg3NTk0OWFjMDQyYTY2OTkxZmQ5M2RhOTg0NDA1NzNjZWFhYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Sep 22, 2023
Source-Link: googleapis/synthtool@ca87909
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:6162c384d685c5fe22521d3f37f6fc732bf99a085f6d47b677dbcae97fc21392

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 22, 2023
)

Source-Link: https://github.com/googleapis/synthtool/commit/d6103f4a3540ba60f633a9e25c37ec5fe7e6286d
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:39f0f3f2be02ef036e297e376fe3b6256775576da8a6ccb1d5eeb80f4c8bf8fb
parthea pushed a commit that referenced this pull request Sep 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 22, 2023
Source-Link: googleapis/synthtool@69fabae
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:562802bfac02e012a6ac34eda282f81d06e77326b82a32d7bbb1369ff552b387

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 21, 2023
Source-Link: googleapis/synthtool@4760d8d
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f0e4b51deef56bed74d3e2359c583fc104a8d6367da3984fc5c66938db738828

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 21, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 21, 2023
* docs: Add documentation for enums

fix: Add context manager return types

chore: Update gapic-generator-python to v1.8.1
PiperOrigin-RevId: 503210727

Source-Link: googleapis/googleapis@a391fd1

Source-Link: googleapis/googleapis-gen@0080f83
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 21, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 459858846

Source-Link: googleapis/googleapis@21ef848

Source-Link: googleapis/googleapis-gen@26af3a3
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjZhZjNhMzg0YmU0MDc3YzVmMDEwMDUyMWEyNjNmZDliZDhmYzdlNyJ9

chore: use gapic-generator-python 1.1.1
PiperOrigin-RevId: 459095142

Source-Link: googleapis/googleapis@4f1be99

Source-Link: googleapis/googleapis-gen@ae686d9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWU2ODZkOWNkZTRmYzNlMzZkMGFjMDJlZmI4NjQzYjE1ODkwYzFlZCJ9


PiperOrigin-RevId: 456827138

Source-Link: googleapis/googleapis@23f1a15

Source-Link: googleapis/googleapis-gen@4075a85
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDA3NWE4NTE0ZjY3NjY5MWVjMTU2Njg4YTViYmYxODNhYTk4OTNjZSJ9

chore: use gapic-generator-python 1.0.0

PiperOrigin-RevId: 451250442

Source-Link: googleapis/googleapis@cca5e81

Source-Link: googleapis/googleapis-gen@0b219da
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGIyMTlkYTE2MWE4YmRjYzNjNmY3YjJlZmNkODIxMDUxODJhMzBjYSJ9

fix!: Product search related messages and enums changed in an incompatible way
fix!: NormalizedBoundingPoly message removed

PiperOrigin-RevId: 446837836

Source-Link: googleapis/googleapis@4c8ac5c

Source-Link: googleapis/googleapis-gen@8f7398f
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGY3Mzk4ZmJkNzlhNGZiNmE0YWIxZjZhMTQ1NDc4NTIxMjE5ODZmZCJ9



PiperOrigin-RevId: 446836546

Source-Link: googleapis/googleapis@ca17771

Source-Link: googleapis/googleapis-gen@2957b3d
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjk1N2IzZDc4ZmMyNDM1NGIzMDg5NjkwN2RlMTM1NDEzYjhlN2E0OSJ9
parthea pushed a commit that referenced this pull request Oct 21, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 21, 2023
Source-Link: https://github.com/googleapis/synthtool/commit/d0f51a0c2a9a6bcca86911eabea9e484baadf64b
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:240b5bcc2bafd450912d2da2be15e62bc6de2cf839823ae4bf94d4f392b451dc
parthea added a commit that referenced this pull request Oct 21, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Oct 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
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. auth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Break apart the crypto methods in storage.connection for signing strings with a p12 key
4 participants