-
Notifications
You must be signed in to change notification settings - Fork 382
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
auth.getIdTokenClient() does not honour gcloud auth application-default login #1543
Comments
Hey @mbyrne00, sounds like this is a duplicate of: #876. Currently, this doesn't support fetch ID token. I'll relabel as a FR for the time being. |
Hey @sofisl - thanks for the reply but not sure how the other issue you linked is a duplicate. The functionality for The issue you linked seems more about functional changes to allow one token to be exchanged for another, which isn't really what I need. But .... I may not appreciate the internals. I use the token id client to make the request, and thus add in the identity token for calling cloud functions. I'd be happy to plug in the identity token header manually if I had that, though, and if it supported |
I believe this is actually a duplicate of #1113, which was closed but has some active conversation recently. The workarounds posted in the issue don't seem to be working for me, but the reasoning behind why the |
Right - I get why there was the link to #876 now as the complexity is in how to get the identity token with what's available in The title and content of that issue isn't immediately obvious at first, which is why I didn't find it before raising this issue. At least now that they are linked someone else can find the way. Here's hoping there's a solution going forward. |
* fix: add hashes to requirements.txt and update Docker images so they require hashes. * fix: add hashes to docker/owlbot/java/src * Squashed commit of the following: commit ab7384ea1c30df8ec2e175566ef2508e6c3a2acb Author: Jeffrey Rennie <rennie@google.com> Date: Tue Aug 23 11:38:48 2022 -0700 fix: remove pip install statements (googleapis#1546) because the tools are already installed in the docker image as of googleapis/testing-infra-docker#227 commit 302667c9ab7210da42cc337e8f39fe1ea99049ef Author: WhiteSource Renovate <bot@renovateapp.com> Date: Tue Aug 23 19:50:28 2022 +0200 chore(deps): update dependency setuptools to v65.2.0 (googleapis#1541) Co-authored-by: Anthonios Partheniou <partheniou@google.com> commit 6e9054fd91d1b500cae58ff72ee9aeb626077756 Author: WhiteSource Renovate <bot@renovateapp.com> Date: Tue Aug 23 19:42:51 2022 +0200 chore(deps): update dependency nbconvert to v7 (googleapis#1543) Co-authored-by: Anthonios Partheniou <partheniou@google.com> commit d229a1258999f599a90a9b674a1c5541e00db588 Author: Alexander Fenster <fenster@google.com> Date: Mon Aug 22 15:04:53 2022 -0700 fix: update google-gax and remove obsolete deps (googleapis#1545) commit 13ce62621e70059b2f5e3a7bade735f91c53339c Author: Jeffrey Rennie <rennie@google.com> Date: Mon Aug 22 11:08:21 2022 -0700 chore: remove release config and script (googleapis#1540) We don't release to pypi anymore. * chore: rollback java changes to move forward with other languages until Java's docker image is fixed Source-Link: googleapis/synthtool@4826337 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:7fefeb9e517db2dd8c8202d9239ff6788d6852bc92dd3aac57a46059679ac9de Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Closing as a duplicate of #876, let's continue the conversation there! |
Summary
When I test/run code locally using
auth.getIdTokenClient("https://my-target-audience")
will always yield the error below, despite setting application default credentials usinggcloud auth application-default login
. Other google libs are working fine using this.Is this a client library issue or a product issue?
A client library issue.
Did someone already solve this?
No
Do you have a support contract?
No
Environment details
google-auth-library
version: 8.7.0Steps to reproduce
gcloud auth application-default login
async
functionIf you export a JSON key and provide it via the environment variable
GOOGLE_APPLICATION_CREDENTIALS
then it will work. The other google libs, however, negate the need for this by supporting theapplication-default
login and thus not needing privileged service account JSON keys stored locally.I've also noticed others with this issue, for example when I came across this post: https://stackoverflow.com/questions/72685175/application-default-credentials-http-trigger-gcp-function-from-local-nodejs-appl
The text was updated successfully, but these errors were encountered: