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

Implicit and explicit Google Application Default Credentials cannot be used #1151

Closed
ryanhos opened this issue Dec 5, 2022 · 2 comments · Fixed by #1249
Closed

Implicit and explicit Google Application Default Credentials cannot be used #1151

ryanhos opened this issue Dec 5, 2022 · 2 comments · Fixed by #1249

Comments

@ryanhos
Copy link

ryanhos commented Dec 5, 2022

Google API clients have the ability to use credentials from a well-known path. This path is where the gcloud SDK writes them when you execute gcloud auth login --update-adc or gcloud auth application-default login. There is no need to set the GOOGLE_APPLICATION_CREDENTIALS envvar in this case (though you can to override the path). And from the code side, there is no client config needed for it to automatically use that credential. It Just Works(R).

PR #953 broke app default credentials while making the GCP KMS integration more CI-friendly. If one did NOT set GOOGLE_CREDENTIALS, sops would try to create the KMS client with a zero-byte JSON credentials slice, which caused a JSON parse error.

Only a small change is necessary to let #953 coexist with GOOGLE_APPLICATION_DEFAULT credentials. PR incoming.

@muhlba91
Copy link

muhlba91 commented May 3, 2023

I am running into the same issue (viaduct-ai/kustomize-sops#178) and would like to push this issue once more.
Is there any reason why your related PR does not get merged? Although there are work-arounds for this, I strongly believe that this bug should get fixed as per the expectations one has in how to setup the client environment variables.

@ryanhos
Copy link
Author

ryanhos commented Jun 2, 2023

I'm waiting for the review, just like you are. :)

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