Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

bugfix: allow authentication with automatic GCP discovery#71

Open
superchairon wants to merge 1 commit into
Superbalist:masterfrom
superchairon:auto-auth-fix
Open

bugfix: allow authentication with automatic GCP discovery#71
superchairon wants to merge 1 commit into
Superbalist:masterfrom
superchairon:auto-auth-fix

Conversation

@superchairon

@superchairon superchairon commented Aug 16, 2019

Copy link
Copy Markdown

Google ProjectID and Credentials (keyfile) are not necessary when the application is running inside GCP (as noted in https://github.com/googleapis/google-cloud-php/blob/master/AUTHENTICATION.md)
Currently the package forces the user to provide a project ID and credentials when if it is not necessary, forcing the user to extra IAM management such as creating a service account.

For example, when running in GKE, the storage client can be created without arguments, allowing the storage library to discover the project ID and credentials from the context.

return new StorageClient()

@superchairon superchairon force-pushed the auto-auth-fix branch 2 times, most recently from 42ca658 to d4d8b47 Compare September 3, 2019 19:32
@matbour

matbour commented Sep 8, 2019

Copy link
Copy Markdown

I can confirm that this version works perfectly on Google Cloud Run with dedicated service account 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants