Uh oh!
There was an error while loading. Please reload this page.
Override API key with service account credentials - #2151
Conversation
Addresses googleapis#1405. Currently does not address case of conflict between explicitly passed API key and default service account credentials. Currently no integration tests use API keys.
1a5b9bf to
639fefcCompare| this.apiKey = builder.apiKey; | ||
| } else if (System.getenv(ServiceOptions.CREDENTIAL_ENV_NAME) == null) { | ||
| this.apiKey = getDefaultApiKey(); | ||
| } else { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coveralls
commented
Jun 14, 2017
Changes Unknown when pulling 639fefc on tcoffee-google:api_key_conflict into ** on GoogleCloudPlatform:master**. |
coveralls
commented
Jun 14, 2017
Changes Unknown when pulling 639fefc on tcoffee-google:api_key_conflict into ** on GoogleCloudPlatform:master**. |
lesv
commented
Jun 14, 2017
I'd just grab one from cloud console on the project you do testing with. |
Used by Translation API. Needed for googleapis#2151.
Use following order of precedence for authentication, avoiding conflicts: 1. explicitly set credentials 2. explicitly set API key 3. Application Default Credentials (e.g., through GOOGLE_APPLICATION_CREDENTIALS) 4. default API key (through GOOGLE_API_KEY)
coveralls
commented
Jun 22, 2017
Changes Unknown when pulling 9f9063b on tcoffee-google:api_key_conflict into ** on GoogleCloudPlatform:master**. |
* Add GOOGLE_API_KEY environment variable for integration testing Used by Translation API. Needed for #2151. * Don't echo API key * Add Travis secure variable for API key Autoformatting due to Travis command line client.
coveralls
commented
Jun 22, 2017
Changes Unknown when pulling e9a28af on tcoffee-google:api_key_conflict into ** on GoogleCloudPlatform:master**. |
tcoffee-google
commented
Jun 22, 2017
| // Use following order of precedence for authentication, avoiding backend conflicts (#1405): | ||
| // 1. explicitly set credentials | ||
| // 2. explicitly set API key | ||
| // 3. Application Default Credentials (e.g., through GOOGLE_APPLICATION_CREDENTIALS) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
lesv
left a comment
There was a problem hiding this comment.
It's a bit different from what I would intuit, but it does match the conversation w/ Gus. So, I'm going to claim happiness. -- Thanks.
…17.0 (#2151) [](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.16.0` -> `26.17.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/java-cloud-bom</summary> ### [`v26.17.0`](https://togithub.com/googleapis/java-cloud-bom/blob/HEAD/CHANGELOG.md#​26170-httpsgithubcomgoogleapisjava-cloud-bomcomparev26160v26170-2023-06-13) [Compare Source](https://togithub.com/googleapis/java-cloud-bom/compare/v26.16.0...v26.17.0) ##### Dependencies - update dependency com.google.cloud:first-party-dependencies to v3.11.0 ([#​6028](https://togithub.com/googleapis/java-cloud-bom/issues/6028)) ([23aa58f](https://togithub.com/googleapis/java-cloud-bom/commit/23aa58f7721ac4181d13e33491c1ba134bf1841a)) - update dependency com.google.cloud:gapic-libraries-bom to v1.13.0 ([#​6040](https://togithub.com/googleapis/java-cloud-bom/issues/6040)) ([4a276a5](https://togithub.com/googleapis/java-cloud-bom/commit/4a276a507a91dbc4db9f9765ad3f7eafc6ea6a61)) - update dependency com.google.cloud:google-cloud-bigquery to v2.27.1 ([#​6044](https://togithub.com/googleapis/java-cloud-bom/issues/6044)) ([bef12ad](https://togithub.com/googleapis/java-cloud-bom/commit/bef12add57a7ad7a7f4ecd81436e031303e607df)) - update dependency com.google.cloud:google-cloud-bigquerystorage-bom to v2.38.0 ([#​6041](https://togithub.com/googleapis/java-cloud-bom/issues/6041)) ([ed484e6](https://togithub.com/googleapis/java-cloud-bom/commit/ed484e601feafb93ba4559fc63d10043a56836e8)) - update dependency com.google.cloud:google-cloud-bigtable-bom to v2.23.3 ([#​6033](https://togithub.com/googleapis/java-cloud-bom/issues/6033)) ([2b56736](https://togithub.com/googleapis/java-cloud-bom/commit/2b5673668683abcd9ef599cff793af6061d7693a)) - update dependency com.google.cloud:google-cloud-datastore-bom to v2.15.0 ([#​6042](https://togithub.com/googleapis/java-cloud-bom/issues/6042)) ([a988f92](https://togithub.com/googleapis/java-cloud-bom/commit/a988f92dce1502990e026ea294d473a367cfb6af)) - update dependency com.google.cloud:google-cloud-firestore-bom to v3.13.0 ([#​6024](https://togithub.com/googleapis/java-cloud-bom/issues/6024)) ([47f4f64](https://togithub.com/googleapis/java-cloud-bom/commit/47f4f640bd8c2a6d32f29f348b4824db36dd849d)) - update dependency com.google.cloud:google-cloud-logging-bom to v3.15.3 ([#​6036](https://togithub.com/googleapis/java-cloud-bom/issues/6036)) ([4a48f41](https://togithub.com/googleapis/java-cloud-bom/commit/4a48f41e558f395d095d0dfaeef8c5fe0c9079d2)) - update dependency com.google.cloud:google-cloud-logging-logback to v0.130.14-alpha ([#​6034](https://togithub.com/googleapis/java-cloud-bom/issues/6034)) ([1af8b72](https://togithub.com/googleapis/java-cloud-bom/commit/1af8b72a30dad680444bee9e1a6493b31a39ff0b)) - update dependency com.google.cloud:google-cloud-logging-logback to v0.130.15-alpha ([#​6035](https://togithub.com/googleapis/java-cloud-bom/issues/6035)) ([ca65ce5](https://togithub.com/googleapis/java-cloud-bom/commit/ca65ce561152f0c71247e7d4165d982590ccfff6)) - update dependency com.google.cloud:google-cloud-nio to v0.126.17 ([#​6037](https://togithub.com/googleapis/java-cloud-bom/issues/6037)) ([fa1ebf6](https://togithub.com/googleapis/java-cloud-bom/commit/fa1ebf66050edd8d657bd650e610478dcb9a1261)) - update dependency com.google.cloud:google-cloud-pubsub-bom to v1.123.14 ([#​6038](https://togithub.com/googleapis/java-cloud-bom/issues/6038)) ([1be40ff](https://togithub.com/googleapis/java-cloud-bom/commit/1be40ff79a699c8e3e267ab9474145c27c6d4cb1)) - update dependency com.google.cloud:google-cloud-pubsublite-bom to v1.12.8 ([#​6039](https://togithub.com/googleapis/java-cloud-bom/issues/6039)) ([33d292a](https://togithub.com/googleapis/java-cloud-bom/commit/33d292a8af9bcdd2bcddd593fe59f19771a3ea4d)) - update dependency com.google.cloud:google-cloud-spanner-bom to v6.43.0 ([#​6029](https://togithub.com/googleapis/java-cloud-bom/issues/6029)) ([7f8df1e](https://togithub.com/googleapis/java-cloud-bom/commit/7f8df1eacf15f7cfd42cf034dfcd0d30be0e41b6)) - update dependency com.google.cloud:google-cloud-spanner-jdbc to v2.11.0 ([#​6043](https://togithub.com/googleapis/java-cloud-bom/issues/6043)) ([0f152e7](https://togithub.com/googleapis/java-cloud-bom/commit/0f152e73e9cd2b46afca848067d374b56069ed02)) - update dependency com.google.cloud:google-cloud-storage-bom to v2.22.4 ([#​6031](https://togithub.com/googleapis/java-cloud-bom/issues/6031)) ([f85721f](https://togithub.com/googleapis/java-cloud-bom/commit/f85721fdbb6ec2b7083676d74fc3e9244ea72525)) - update dependency commons-io:commons-io to v2.12.0 ([#​5994](https://togithub.com/googleapis/java-cloud-bom/issues/5994)) ([14f8655](https://togithub.com/googleapis/java-cloud-bom/commit/14f8655132e91778f9675f524989519841dfeaeb)) - update dependency commons-io:commons-io to v2.13.0 ([#​6030](https://togithub.com/googleapis/java-cloud-bom/issues/6030)) ([5b7a0d3](https://togithub.com/googleapis/java-cloud-bom/commit/5b7a0d3b3a8b3db9f41befbd16b2de0831c3c48a)) </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, check this box --- 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-bigquerystorage). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTUuMiIsInVwZGF0ZWRJblZlciI6IjM1LjExNS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
…yle-plugin to v3.5.0 (#2151)
…yle-plugin to v3.5.0 (#2151)
Addresses #1405.
Currently does not address case of conflict between explicitly passed API key and default service
account credentials.
Currently no integration tests use API keys.