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

Adding a createFromFile method to AuthCredentials #179

Closed
mziccard opened this issue Sep 24, 2015 · 4 comments
Closed

Adding a createFromFile method to AuthCredentials #179

mziccard opened this issue Sep 24, 2015 · 4 comments
Assignees
Labels
api: core type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@mziccard
Copy link
Contributor

We now have a createFor(String account, PrivateKey privateKey) to create AuthCredentials, what about adding a createFor(File) for creating AuthCredentials from a service account JSON file?

Notably GoogleCredential already has fromStream that reads credentials from a stream of the JSON file. If you prefer, we can go for createFor(Stream) rather than createFor(File).

@mziccard mziccard added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: core labels Sep 24, 2015
@aozarov
Copy link
Contributor

aozarov commented Sep 24, 2015

I would definitely prefer createFor(stream) rather than createFor(File) as the latter is not supported in some systems (such as AE).

Do you think this issue is a dup of #3?

In any case, I think if we add it it should only support a json content (so maybe method name should state it).

The reasons I don't think we should support p12 in this method are:

  • User can change their password (so we need to ask for that).
  • I am not sure we can extract the service_acount from it.
  • Seems to be deprecated.

@mziccard
Copy link
Contributor Author

Ooops sorry I missed #3. Yes this is a duplicate :(

I prefer createFor(stream) as well as it supports more uses. And I also agree that we can live without P12:

  • AFAIK it does not contain service_account information
  • It is supported just for backward compatibility with code that already used P12

GoogleCredential.createFor also supports only JSON format and states it in the javadoc. If you want to be more precise we can name it createForJson() but it kind of breaks the naming convention.

@aozarov
Copy link
Contributor

aozarov commented Sep 24, 2015

We already have createForComputeEngine and createForAppngine.

I am fine with createFor(Stream jsonStream) or createForJson(Stream) and a good javadoc
that is pointing to the public docs (such as this one).

@mziccard
Copy link
Contributor Author

Closed with #180.

github-actions bot pushed a commit that referenced this issue Jun 21, 2022
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 454027580

Source-Link: googleapis/googleapis@1b22277

Source-Link: https://github.com/googleapis/googleapis-gen/commit/e04cea20d0d12eb5c3bdb360a9e72b654edcb638
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTA0Y2VhMjBkMGQxMmViNWMzYmRiMzYwYTllNzJiNjU0ZWRjYjYzOCJ9
github-actions bot pushed a commit that referenced this issue Jun 23, 2022
🤖 I have created a release *beep* *boop*
---


## [1.2.1](googleapis/java-data-fusion@v1.2.0...v1.2.1) (2022-06-23)


### Dependencies

* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#177](googleapis/java-data-fusion#177)) ([96b8ce9](googleapis/java-data-fusion@96b8ce9))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
github-actions bot pushed a commit to suztomo/google-cloud-java that referenced this issue Jun 29, 2022
…uration to v1.0.18 (googleapis#179)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| com.google.cloud.samples:shared-configuration | patch | `1.0.17` -> `1.0.18` |

---

### Renovate configuration

:date: **Schedule**: At any time (no schedule defined).

:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

:recycle: **Rebasing**: Whenever PR becomes conflicted, 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/java-resourcemanager).
github-actions bot pushed a commit that referenced this issue Jul 1, 2022
* changes without context

        autosynth cannot find the source of changes triggered by earlier changes in this
        repository, or by version upgrades to tools such as linters.

* build: migrate to flakybot

Source-Author: Justin Beckwith <[email protected]>
Source-Date: Thu Jan 28 22:22:38 2021 -0800
Source-Repo: googleapis/synthtool
Source-Sha: d1bb9173100f62c0cfc8f3138b62241e7f47ca6a
Source-Link: googleapis/synthtool@d1bb917

* build(java): generate docfx yml on release

* feat: generate docfx yml on release

* fix: updates name variable

* fix: remove non needed resource

* fix: update date

Source-Author: Emily Ball <[email protected]>
Source-Date: Mon Feb 1 15:24:59 2021 -0800
Source-Repo: googleapis/synthtool
Source-Sha: 5de29e9434b63ea6d7e46dc348521c62969af1a1
Source-Link: googleapis/synthtool@5de29e9

* build(java): run linkage monitor as GitHub action

Source-Author: Tomo Suzuki <[email protected]>
Source-Date: Tue Feb 2 16:20:26 2021 -0500
Source-Repo: googleapis/synthtool
Source-Sha: e935c9ecb47da0f2e054f5f1845f7cf7c95fa625
Source-Link: googleapis/synthtool@e935c9e
github-actions bot pushed a commit that referenced this issue Jul 1, 2022
Making CLIRR not required. The version bumps are now controlled by the Release Please and OwlBot. The CL authors create appropriate change description to control major version bumps.
github-actions bot pushed a commit that referenced this issue Jul 14, 2022
…onfig to v1.5.1 (#179)

* build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.1

* 🦉 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>
github-actions bot pushed a commit that referenced this issue Aug 16, 2022
…transfer to v1.2.1 (#179)

[![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-storage-transfer](https://togithub.com/googleapis/java-storage-transfer) | `1.2.0` -> `1.2.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage-transfer/1.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage-transfer/1.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage-transfer/1.2.1/compatibility-slim/1.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage-transfer/1.2.1/confidence-slim/1.2.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-storage-transfer).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNTQuNCIsInVwZGF0ZWRJblZlciI6IjMyLjE1NC40In0=-->
github-actions bot pushed a commit that referenced this issue Sep 30, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [certifi](https://togithub.com/certifi/python-certifi) | `==2022.9.14` -> `==2022.9.24` | [![age](https://badges.renovateapi.com/packages/pypi/certifi/2022.9.24/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/certifi/2022.9.24/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/certifi/2022.9.24/compatibility-slim/2022.9.14)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/certifi/2022.9.24/confidence-slim/2022.9.14)](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 this update 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-iam-admin).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMDguMiIsInVwZGF0ZWRJblZlciI6IjMyLjIwOC4yIn0=-->
github-actions bot pushed a commit that referenced this issue Oct 4, 2022
🤖 I have created a release *beep* *boop*
---


## [1.1.7](https://togithub.com/googleapis/java-deploy/compare/v1.1.6...v1.1.7) (2022-10-03)


### Dependencies

* Update dependency certifi to v2022.9.24 ([#167](https://togithub.com/googleapis/java-deploy/issues/167)) ([829bf37](https://togithub.com/googleapis/java-deploy/commit/829bf37cb0aa03b8533cd67815a34f61c17d3526))
* Update dependency charset-normalizer to v2.1.1 ([#172](https://togithub.com/googleapis/java-deploy/issues/172)) ([4384f86](https://togithub.com/googleapis/java-deploy/commit/4384f86bab95d6ca92665f38cbe1f0eba07246e6))
* Update dependency click to v8.1.3 ([#173](https://togithub.com/googleapis/java-deploy/issues/173)) ([6330f0f](https://togithub.com/googleapis/java-deploy/commit/6330f0f79535e798287797a4ba3fdcf67ff08fcb))
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#188](https://togithub.com/googleapis/java-deploy/issues/188)) ([04183a8](https://togithub.com/googleapis/java-deploy/commit/04183a80c3c0c5ca711831683cf90f835af833ae))
* Update dependency gcp-releasetool to v1.8.8 ([#168](https://togithub.com/googleapis/java-deploy/issues/168)) ([3b8fa48](https://togithub.com/googleapis/java-deploy/commit/3b8fa480774fce03c6d692ba7acb5d9884dfd163))
* Update dependency google-api-core to v2.10.1 ([#174](https://togithub.com/googleapis/java-deploy/issues/174)) ([9631b06](https://togithub.com/googleapis/java-deploy/commit/9631b06317b18ec92030f534f065a722e2f4bc3b))
* Update dependency google-auth to v2.11.1 ([#169](https://togithub.com/googleapis/java-deploy/issues/169)) ([d059772](https://togithub.com/googleapis/java-deploy/commit/d0597727fb4df93e34558dc9d3d889a0bf6cdfd6))
* Update dependency google-cloud-core to v2.3.2 ([#170](https://togithub.com/googleapis/java-deploy/issues/170)) ([c9ce18c](https://togithub.com/googleapis/java-deploy/commit/c9ce18cd60c968d4fd5d78fb6e798fda22ca891e))
* Update dependency google-cloud-storage to v2.5.0 ([#175](https://togithub.com/googleapis/java-deploy/issues/175)) ([7258e5c](https://togithub.com/googleapis/java-deploy/commit/7258e5ceaeb60f67a17d597fe0fa24bea28a56f7))
* Update dependency google-crc32c to v1.5.0 ([#176](https://togithub.com/googleapis/java-deploy/issues/176)) ([41f6b20](https://togithub.com/googleapis/java-deploy/commit/41f6b20a67820a90f24af40f724710c1f30c9621))
* Update dependency googleapis-common-protos to v1.56.4 ([#171](https://togithub.com/googleapis/java-deploy/issues/171)) ([15f6e3b](https://togithub.com/googleapis/java-deploy/commit/15f6e3bec2261ead4cd0486d33d549d18b5d8c4b))
* Update dependency importlib-metadata to v4.12.0 ([#177](https://togithub.com/googleapis/java-deploy/issues/177)) ([2d69170](https://togithub.com/googleapis/java-deploy/commit/2d691702d957c2aa5ed7f18b941970a410f1feec))
* Update dependency markupsafe to v2.1.1 ([#178](https://togithub.com/googleapis/java-deploy/issues/178)) ([48e29ef](https://togithub.com/googleapis/java-deploy/commit/48e29efbf0fd29b66d5b282dca7245832d7e847b))
* Update dependency protobuf to v3.20.2 ([#179](https://togithub.com/googleapis/java-deploy/issues/179)) ([10265fc](https://togithub.com/googleapis/java-deploy/commit/10265fca9c2291f90a07ed0c296b56632c685fa5))
* Update dependency pyjwt to v2.5.0 ([#180](https://togithub.com/googleapis/java-deploy/issues/180)) ([2dab9fa](https://togithub.com/googleapis/java-deploy/commit/2dab9fa5ca31952563312a59e0cddea26a9ef7b0))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
github-actions bot pushed a commit that referenced this issue Oct 5, 2022
🤖 I have created a release *beep* *boop*
---


## [1.3.0](https://togithub.com/googleapis/java-iam-admin/compare/v1.2.5...v1.3.0) (2022-10-03)


### Features

* Replace java_outer_classname option with use_java_stubby_library, add DisableServiceAccountKey and EnableServiceAccountKey, and update comments ([#170](https://togithub.com/googleapis/java-iam-admin/issues/170)) ([386ba5b](https://togithub.com/googleapis/java-iam-admin/commit/386ba5bd33426db7c55c3f98e8d66c783ec74960))


### Dependencies

* Update dependency cachetools to v5 ([#177](https://togithub.com/googleapis/java-iam-admin/issues/177)) ([1d5a92c](https://togithub.com/googleapis/java-iam-admin/commit/1d5a92c16f7db96b0acfe3269722c8cce0fa152d))
* Update dependency certifi to v2022.9.24 ([#179](https://togithub.com/googleapis/java-iam-admin/issues/179)) ([684c965](https://togithub.com/googleapis/java-iam-admin/commit/684c9651aadde9ba3acb7d74e5419db8b51f02b8))
* Update dependency charset-normalizer to v2.1.1 ([#183](https://togithub.com/googleapis/java-iam-admin/issues/183)) ([5956e73](https://togithub.com/googleapis/java-iam-admin/commit/5956e735c2ecc299874461b2ddb43e9528367abc))
* Update dependency click to v8.1.3 ([#184](https://togithub.com/googleapis/java-iam-admin/issues/184)) ([40cc131](https://togithub.com/googleapis/java-iam-admin/commit/40cc131e938274c97a17ca4dbb8adcbe27f453e1))
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#199](https://togithub.com/googleapis/java-iam-admin/issues/199)) ([4aa7e10](https://togithub.com/googleapis/java-iam-admin/commit/4aa7e108032e665dcfea448fc6003a646db11729))
* Update dependency gcp-releasetool to v1.8.8 ([#180](https://togithub.com/googleapis/java-iam-admin/issues/180)) ([f56d6f6](https://togithub.com/googleapis/java-iam-admin/commit/f56d6f6d76119195f0bc0676b5695549bedf7e50))
* Update dependency google-api-core to v2.10.1 ([#185](https://togithub.com/googleapis/java-iam-admin/issues/185)) ([578739a](https://togithub.com/googleapis/java-iam-admin/commit/578739afb6f847d386d4d68405ca4c515b77071d))
* Update dependency google-auth to v2.12.0 ([#192](https://togithub.com/googleapis/java-iam-admin/issues/192)) ([1c420d3](https://togithub.com/googleapis/java-iam-admin/commit/1c420d3d1c279a463f4022e70e246e3e32faa75c))
* Update dependency google-cloud-core to v2.3.2 ([#181](https://togithub.com/googleapis/java-iam-admin/issues/181)) ([9d7b22b](https://togithub.com/googleapis/java-iam-admin/commit/9d7b22b4df2087462fcb3aa4ec6fb6714d53fc05))
* Update dependency google-cloud-storage to v2.5.0 ([#193](https://togithub.com/googleapis/java-iam-admin/issues/193)) ([dc53938](https://togithub.com/googleapis/java-iam-admin/commit/dc53938acc6b7f10aa18bb167f58a391d8ca2648))
* Update dependency google-crc32c to v1.5.0 ([#194](https://togithub.com/googleapis/java-iam-admin/issues/194)) ([7ee8030](https://togithub.com/googleapis/java-iam-admin/commit/7ee8030e1b58d22a31169b6bda5104d3a3357845))
* Update dependency googleapis-common-protos to v1.56.4 ([#182](https://togithub.com/googleapis/java-iam-admin/issues/182)) ([807bad5](https://togithub.com/googleapis/java-iam-admin/commit/807bad5c28f7db0c01352d4fa14a59d9ba902be1))
* Update dependency importlib-metadata to v4.12.0 ([#195](https://togithub.com/googleapis/java-iam-admin/issues/195)) ([7484838](https://togithub.com/googleapis/java-iam-admin/commit/74848383e6963616b66307cbd88dbea184a53f7d))
* Update dependency jeepney to v0.8.0 ([#196](https://togithub.com/googleapis/java-iam-admin/issues/196)) ([3107d4e](https://togithub.com/googleapis/java-iam-admin/commit/3107d4e5f8de9af01054468313c7b4895afaf50d))
* Update dependency jinja2 to v3.1.2 ([#186](https://togithub.com/googleapis/java-iam-admin/issues/186)) ([f4df361](https://togithub.com/googleapis/java-iam-admin/commit/f4df361293289b537411b0ab08029ba4a30987cc))
* Update dependency keyring to v23.9.3 ([#187](https://togithub.com/googleapis/java-iam-admin/issues/187)) ([40b4f56](https://togithub.com/googleapis/java-iam-admin/commit/40b4f56b07e7559658f844ffc8377e784795b47e))
* Update dependency markupsafe to v2.1.1 ([#188](https://togithub.com/googleapis/java-iam-admin/issues/188)) ([9c9ae27](https://togithub.com/googleapis/java-iam-admin/commit/9c9ae27377c89b99a6bea53911627c41b08a743a))
* Update dependency protobuf to v3.20.2 ([#189](https://togithub.com/googleapis/java-iam-admin/issues/189)) ([f0eef4e](https://togithub.com/googleapis/java-iam-admin/commit/f0eef4ef48092d5a9ec3fff73f052395a43deb77))
* Update dependency protobuf to v4 ([#178](https://togithub.com/googleapis/java-iam-admin/issues/178)) ([6eb4f64](https://togithub.com/googleapis/java-iam-admin/commit/6eb4f6416a3a8a562e1edb38355ea0cd5759d696))
* Update dependency pyjwt to v2.5.0 ([#190](https://togithub.com/googleapis/java-iam-admin/issues/190)) ([67b346f](https://togithub.com/googleapis/java-iam-admin/commit/67b346ffd690b3a9e57168c6fa3918e5bdf3922e))
* Update dependency requests to v2.28.1 ([#191](https://togithub.com/googleapis/java-iam-admin/issues/191)) ([8302051](https://togithub.com/googleapis/java-iam-admin/commit/8302051194f258db4e3c422212e02bb536072e0b))
* Update dependency typing-extensions to v4.3.0 ([#175](https://togithub.com/googleapis/java-iam-admin/issues/175)) ([0382f2c](https://togithub.com/googleapis/java-iam-admin/commit/0382f2ccb08606b620b2f02451efecc94bec0030))
* Update dependency zipp to v3.8.1 ([#176](https://togithub.com/googleapis/java-iam-admin/issues/176)) ([e576413](https://togithub.com/googleapis/java-iam-admin/commit/e576413a97523349f01584b3d546baf64bf20456))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: core type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants