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

bugfix: allow authentication with automatic GCP discovery #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

superchairon
Copy link

@superchairon superchairon commented Aug 16, 2019

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
@mathieu-bour
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants