-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Adding get_for_service_account_json function in credentials. #641
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
Conversation
gcloud/credentials.py
Outdated
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
This LGTM. That said - I think it'd be useful to add an example which would ideally go in a separate "auth" section in the docs. Do we have an open issue for that or should I create one? |
|
#633 is the issue, I actually have a branch I've been working on for awhile, I just keep getting sidetracked on it. |
|
Renamed to |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
LGTM after pep8 passes. |
Was private_key_path.
Adding get_for_service_account_json function in credentials.
* feat: added dialogflow_assist_answer feat: added session_ttl feat: added human_agent_side_config feat: added suggestion_input feat: added suggest_dialogflow_assists_response feat: added suggest_entity_extraction_response PiperOrigin-RevId: 542021587 Source-Link: googleapis/googleapis@f40416d Source-Link: googleapis/googleapis-gen@04ca491 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDRjYTQ5MWRlYzhmMzUxNzNlZTU5OWQ3ZWQwNzkzNmI0MDg2ZTk2ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: added dialogflow_assist_answer feat: added session_ttl feat: added human_agent_side_config feat: added suggestion_input feat: added suggest_dialogflow_assists_response feat: added suggest_entity_extraction_response PiperOrigin-RevId: 542024928 Source-Link: googleapis/googleapis@06f7999 Source-Link: googleapis/googleapis-gen@0f124f3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGYxMjRmM2MzN2I1YTYwNDk5MDZhOTUxNGNkOTk0ZGFmMDczZGMwMSJ9 * 🦉 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>
Source-Link: googleapis/synthtool@cb96037 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
The return type is an Awaitable that produces an AsyncIterator.
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 473833416 Source-Link: googleapis/googleapis@565a550 Source-Link: googleapis/googleapis-gen@1ee1a06 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWVlMWEwNmM2ZGUzY2E4Yjg0MzU3MmMxZmRlMDU0OGY4NDIzNjk4OSJ9 feat: add firestore aggregation query apis to the stable googleapis branch PiperOrigin-RevId: 473753776 Source-Link: googleapis/googleapis@a8c6c7c Source-Link: googleapis/googleapis-gen@6e3b0d6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmUzYjBkNmVhZDQyNjVjYTZmMGFkM2UxODI5ZjRlM2E1YmMxMDlhMiJ9
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ## [1.23.0](https://www.github.com/googleapis/google-auth-library-python/compare/v1.22.1...v1.23.0) (2020-10-29) ### Features * Add custom scopes for access tokens from the metadata service ([#633](https://www.github.com/googleapis/google-auth-library-python/issues/633)) ([0323cf3](https://www.github.com/googleapis/google-auth-library-python/commit/0323cf390b16e8483660ac88775e8ea4e7f7702d)) ### Bug Fixes * **deps:** Revert "fix: pin 'aoihttp < 3.7.0dev' ([#634](https://www.github.com/googleapis/google-auth-library-python/issues/634))" ([#632](https://www.github.com/googleapis/google-auth-library-python/issues/632)) ([#640](https://www.github.com/googleapis/google-auth-library-python/issues/640)) ([b790e65](https://www.github.com/googleapis/google-auth-library-python/commit/b790e6535cc37591b23866027a426cde312e07c1)) * pin 'aoihttp < 3.7.0dev' ([#634](https://www.github.com/googleapis/google-auth-library-python/issues/634)) ([05f9524](https://www.github.com/googleapis/google-auth-library-python/commit/05f95246fab928fe2f445781117eeac8088497fb)) * remove checks for ancient versions of Cryptography ([#596](https://www.github.com/googleapis/google-auth-library-python/issues/596)) ([6407258](https://www.github.com/googleapis/google-auth-library-python/commit/6407258956ec42e3b722418cb7f366e5ae9272ec)), closes [/github.com/googleapis/google-auth-library-python/issues/595#issuecomment-683903062](https://www.github.com/googleapis//github.com/googleapis/google-auth-library-python/issues/595/issues/issuecomment-683903062) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Fixes #638.
@jgeewax PTAL
I thought about wrapping JSON key and PKCS12 key into one method but the JSON key is actual a JSON payload with everything needed, e.g.
{ "private_key_id": "0996.....", "private_key": "-----BEGIN PRIVATE KEY-----\nMIICdgIBADA.....\n-----END PRIVATE KEY-----\n", "client_email": "[email protected]", "client_id": "32578400.........apps.googleusercontent.com", "type": "service_account" }whereas a P12 key is just the bytes in
private_key(and created for PKCS12 rather than PEM).I don't think it's worth trying to smash together the two API surfaces: