On my windows laptop, in cmd, if I gcloud auth login and then gcloud auth print-access-token --log-http
then I can see the access token uri correctly set as:
C:\Users\enum>gcloud auth print-access-token --log-http
=======================
==== request start ====
uri: https://oauth2-<our-value>.googleapis.com/token
method: POST
But if I generate the Application Default Credentials by running: gcloud auth application-default login and then run gcloud auth application-default print-access-token --log-http I can see the uri is not correctly set:
C:\Users\enum>gcloud auth application-default print-access-token --log-http
=======================
==== request start ====
uri: https://oauth2.googleapis.com/token
method: POST
And then the result of the print-access-token command is:
ERROR: (gcloud.auth.application-default.print-access-token) There was a problem refreshing your current auth tokens: HTTPSConnectionPool(host='oauth2.googleapis.com', port=443): Max retries exceeded with url: /token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000020756EBE8E0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))
because that host uri is wrong and not what we are using for our Access Token URI. This mean that local debugging application on our development machines is not possible, as they use Application Default Credentials (ADC).
My question is where is the application-default uri set and how can it be correctly updated to what we want it to be?