From 9957e9e786012719ffe19690a90af09612a04035 Mon Sep 17 00:00:00 2001 From: Amanda Tarafa Mas Date: Mon, 4 Nov 2024 16:28:55 -0800 Subject: [PATCH] chore: Pause automatic requests to MDS Universe Domain endpoint. This applies to Discovery based libraries only. There will be an accompanying PR for GAPICs. Towards b/371768149 --- Src/Support/Google.Apis.Auth/OAuth2/GoogleCredential.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Src/Support/Google.Apis.Auth/OAuth2/GoogleCredential.cs b/Src/Support/Google.Apis.Auth/OAuth2/GoogleCredential.cs index b08e5775cae..d2b9d990df4 100644 --- a/Src/Support/Google.Apis.Auth/OAuth2/GoogleCredential.cs +++ b/Src/Support/Google.Apis.Auth/OAuth2/GoogleCredential.cs @@ -429,7 +429,9 @@ public static GoogleCredential FromServiceAccountCredential(ServiceAccountCreden // Proxy IHttpExecuteInterceptor's only method. async Task IHttpExecuteInterceptor.InterceptAsync(HttpRequestMessage request, CancellationToken cancellationToken) { - if (request?.TryGetOption(GoogleAuthConsts.UniverseDomainKey, out string targetUniverseDomain) == true) + if (request?.TryGetOption(GoogleAuthConsts.UniverseDomainKey, out string targetUniverseDomain) == true + // b/377378462 Temporarily avoid automatic requests to the MDS UniverseDomain endpoint. + && UnderlyingCredential is not ComputeCredential) { string credentialUniverseDomain = await credential.GetUniverseDomainAsync(cancellationToken).ConfigureAwait(false); if (targetUniverseDomain != credentialUniverseDomain)