Skip to content

Commit

Permalink
chore: Pause automatic requests to MDS Universe Domain endpoint.
Browse files Browse the repository at this point in the history
This applies to GAPIC based libraries only. Discovery based libraries are handled in googleapis/google-api-dotnet-client#2871.

Towards b/371768149
  • Loading branch information
amanda-tarafa authored and jskeet committed Nov 5, 2024
1 parent 1cde0b5 commit 1bfb1af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Google.Api.Gax.Grpc/GoogleCredentialExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ public async Task<AccessTokenWithHeaders> GetAccessTokenWithHeadersForRequestAsy

private async Task UniverseDomainsMatchCheckUncached()
{
string credentialUniverseDomain = await (_underlying as GoogleCredential).GetUniverseDomainAsync(default).ConfigureAwait(false);
GoogleCredential googleCredential = _underlying as GoogleCredential;
// b/377378462 Temporarily avoid automatic requests to the MDS UniverseDomain endpoint.
if (googleCredential.UnderlyingCredential is ComputeCredential)
{
return;
}
string credentialUniverseDomain = await (googleCredential).GetUniverseDomainAsync(default).ConfigureAwait(false);
if (credentialUniverseDomain != _universeDomain)
{
throw new InvalidOperationException(
Expand Down

0 comments on commit 1bfb1af

Please sign in to comment.