GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — UnauthenticationException when customizing universe-domain when quota project id is set · Issue #3256 · googleapis/sdk-platform-java

This repository was archived by the owner on Oct 29, 2026. It is now read-only.
This repository was archived by the owner on Oct 29, 2026. It is now read-only.

UnauthenticationException when customizing universe-domain when quota project id is set #3256

Copy link
Copy link
Closed
#3261
#3257
Closed
UnauthenticationException when customizing universe-domain when quota project id is set#3256
#3261
#3257
Copy link
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@mpeddada1
mpeddada1
opened on Sep 30, 2024
Issue body actions

Reproduced locally with the following code snippet:

 BigQueryWriteClient bigQueryWriteClient =
        BigQueryWriteClient.create(BigQueryWriteSettings.newBuilder()
            .setQuotaProjectId(<project-id>)
            .setUniverseDomain("example.com")
            .build());
    TableName parent = TableName.of("<project>", "<dataset>", "<table>");
    TableSchema schema = TableSchema.newBuilder().build();
    WriteStream writeStream = WriteStream.newBuilder().setType(
        WriteStream.Type.COMMITTED).setTableSchema(schema).build();
    WriteStream response = bigQueryWriteClient.createWriteStream(parent, writeStream);

Which results in the following stacktrace despite the user configured universe domain matching the underlying credential's universe domain.

com.google.api.gax.rpc.UnauthenticatedException: java.lang.Throwable: The configured universe domain (example.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default.
	at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:116) ~[gax-2.51.0.jar:2.51.0]
	at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:41) ~[gax-2.51.0.jar:2.51.0]
	at com.google.api.gax.rpc.EndpointContext.validateUniverseDomain(EndpointContext.java:154) ~[gax-2.51.0.jar:2.51.0]
	at com.google.api.gax.grpc.GrpcCallContext.validateUniverseDomain(GrpcCallContext.java:691) ~[gax-grpc-2.51.0.jar:2.51.0]
	at com.google.api.gax.grpc.GrpcClientCalls.newCall(GrpcClientCalls.java:100) ~[gax-grpc-2.51.0.jar:2.51.0]
	at com.google.api.gax.grpc.GrpcDirectCallable.futureCall(GrpcDirectCallable.java:62) ~[gax-grpc-2.51.0.jar:2.51.0]
	at com.google.api.gax.grpc.GrpcUnaryRequestParamCallable.futureCall(GrpcUnaryRequestParamCallable.java:68) ~[gax-grpc-2.51.0.jar:2.51.0]
	at com.google.api.gax.grpc.GrpcExceptionCallable.futureCall(GrpcExceptionCallable.java:64) ~[gax-grpc-2.51.0.jar:2.51.0]
	at com.google.api.gax.rpc.AttemptCallable.call(AttemptCallable.java:86) ~[gax-2.51.0.jar:2.51.0]
	at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:78) ~[gax-2.51.0.jar:2.51.0]
	at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:41) ~[gax-2.51.0.jar:2.51.0]
	at com.google.api.gax.tracing.TracedUnaryCallable.futureCall(TracedUnaryCallable.java:75) ~[gax-2.51.0.jar:2.51.0]
	at com.google.api.gax.rpc.UnaryCallable$1.futureCall(UnaryCallable.java:126) ~[gax-2.51.0.jar:2.51.0]
	at com.google.api.gax.rpc.UnaryCallable.futureCall(UnaryCallable.java:87) ~[gax-2.51.0.jar:2.51.0]
	at com.google.api.gax.rpc.UnaryCallable.call(UnaryCallable.java:112) ~[gax-2.51.0.jar:2.51.0]
	at com.google.cloud.bigquery.storage.v1.BigQueryWriteClient.createWriteStream(BigQueryWriteClient.java:373) ~[google-cloud-bigquerystorage-3.8.0.jar:3.8.0]
	at com.google.cloud.bigquery.storage.v1.BigQueryWriteClient.createWriteStream(BigQueryWriteClient.java:308) ~[google-cloud-bigquerystorage-3.8.0.jar:3.8.0]

Adding a breakpoint in the EndpointContext#validateUniverseDomain() method shows that the getUniverseDomain() is called on QuotaProjectIdHidingCredentials which is a wrapper around the configured credentials implementation. At the moment, this class always returns googleapis.com instead of relying on universe domain configured in the wrapped Credentials class
Screenshot 2024-09-30 at 6 07 55 PM.

Proposed solution: Expose getUniverseDomain() of the wrapped credentials class in QuotaProjectIdHidingCredentials

Activity

  1. mpeddada1
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Sep 30, 2024
  2. mpeddada1
    closed this as completedin #3257on Oct 2, 2024
  3. mpeddada1
    added a commit that references this issue on Oct 2, 2024

    fix: address incorrect universe domain validation when quota project …

    This issue will close once commit 6e70c37 is merged into the 'main' branch.
    6e70c37
  4. zhumin8
    added a commit that references this issue on Oct 4, 2024

    chore(main): release 2.47.0 (#3261)

    9ad9591
  5. svc-squareup-copybara
    added a commit that references this issue on Nov 28, 2024

    This PR contains the following updates:

    21b4eb8
  6. chingor13
    added a commit that references this issue on Mar 24, 2026

    chore(main): release 2.47.0 (#3261)

    25e9c85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.