Skip to content

fix(auth): inherit universe domain and fail fast in CAB builders - #15172

Merged
lqiu96 merged 7 commits into
googleapis:mainfrom
lqiu96:fix/auth-cab-universe-refresh
Dec 4, 2026
Merged

lqiu96 merged 7 commits into
googleapis:mainfrom
lqiu96:fix/auth-cab-universe-refresh

Conversation

@lqiu96

@lqiu96 lqiu96 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Updates Credential Access Boundary builders and Javadocs for non-default universe domains:

  • Inherits sourceCredential.getUniverseDomain() in ClientSideCredentialAccessBoundaryFactory.Builder.build() and DownscopedCredentials.Builder.build() when setUniverseDomain() is omitted, null, or blank, and validates equality when explicitly set.
  • Fails fast in both CAB builders when given a ServiceAccountCredentials in a non-default universe domain (since Credential Access Boundaries require an OAuth 2.0 access token rather than a self-signed JWT: https://docs.cloud.google.com/iam/docs/create-downscoped-short-lived-credentials#before-you-begin), fails fast on UserCredentials in ClientSideCredentialAccessBoundaryFactory (unsupported by client-side CAB in all universes) and in DownscopedCredentials for non-default universes (only supported in googleapis.com), and rejects null or blank source universe domains.
  • Annotates ClientSideCredentialAccessBoundaryFactory.Builder.universeDomain and setUniverseDomain as @Nullable, consolidates CAB and OAuth2CredentialsWithRefresh Javadocs, and adds CAB builder, inheritance, and fail-closed unit tests.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces changes to restrict and handle non-default universe domains across various credential types, specifically preventing the direct use of ServiceAccountCredentials and UserCredentials in non-default universes unless wrapped or configured with custom token URIs. The feedback focuses on improving the robustness of the universe domain checks across multiple files (such as UserCredentials, ServiceAccountCredentials, DownscopedCredentials, and ClientSideCredentialAccessBoundaryFactory) by handling potential null values, trimming whitespace, and performing case-insensitive comparisons instead of direct .equals() checks.

@lqiu96
lqiu96 marked this pull request as ready for review November 23, 2026 21:22
@lqiu96
lqiu96 requested review from a team as code owners November 23, 2026 21:22
@lqiu96
lqiu96 requested a review from nbayati November 23, 2026 21:22
&& isGoogleDefaultUniverseUri(tokenServerUri)) {
throw new IOException(
String.format(
"Cannot refresh UserCredentials against %s when universe domain is %s. Configure a"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fromJson() rejects any non-default universe_domain with "UserCredentials are not supported in universes other than googleapis.com", even when a custom token_uri is set. This refresh check disagrees: a programmatically built UserCredentials can still refresh in a non-default universe as long as tokenServerUri isn't a Google host, and the error message tells users to configure a non-default tokenServerUri.

Is allowing a custom tokenServerUri here intentional? If so, it'd help to clarify why it differs from fromJson() and reword the message so it doesn't read like a standard setup step. If not, should this reject non-default universes the same way fromJson() does?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to reject all non-default universe refreshes unconditionally, matching fromJson().

}

private static boolean isGoogleDefaultUniverseUri(@Nullable URI uri) {
if (uri == null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit bfb41be9 notes that null URIs are blocked for non-default universe refreshes, but this returns false when uri is null or host is null/empty. Those skip the check in doRefreshAccessToken() and fail later with a NullPointerException in GenericUrl instead of throwing the IOException. Nothing goes over the network either way, but it'd be good to return IOException as intended and add a test for a hostless URI.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, removed isGoogleDefaultUniverseUri() and added hostless URI test cases.

* token, allowing for automatic token refreshes by providing a {@link
* OAuth2CredentialsWithRefresh.OAuth2RefreshHandler}.
*
* <p>When operating in a non-default universe domain, wrap the downscoped token with {@link

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sits right below the note recommending OAuth2CredentialsWithRefresh for automatic token refreshes, but GoogleCredentials.create(String, AccessToken) returns a credential that can't refresh (refreshAccessToken() throws IllegalStateException once the token nears expiry). Could we call out that this wrapper doesn't auto-refresh, and note how callers in a non-default universe should handle expiry?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated Javadoc to note that GoogleCredentials.create(String, AccessToken) does not auto-refresh and how to handle expiry.

* token, allowing for automatic token refreshes by providing a {@link
* OAuth2CredentialsWithRefresh.OAuth2RefreshHandler}.
*
* <p>When operating in a non-default universe domain, wrap the downscoped token with {@link

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the Javadoc in ClientSideCredentialAccessBoundaryFactory: GoogleCredentials.create(String, AccessToken) doesn't auto-refresh, so it'd help to note that here too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@lqiu96
lqiu96 force-pushed the fix/auth-cab-universe-refresh branch 2 times, most recently from 3552edd to 2a590a2 Compare November 25, 2026 20:05
@lqiu96
lqiu96 changed the base branch from main to fix/auth-sa-user-universe-refresh November 25, 2026 20:07
@lqiu96
lqiu96 force-pushed the fix/auth-sa-user-universe-refresh branch from eaab13a to 62f691b Compare November 25, 2026 20:19
@lqiu96
lqiu96 force-pushed the fix/auth-cab-universe-refresh branch from 2a590a2 to 02e2985 Compare November 25, 2026 20:21
lqiu96 added a commit that referenced this pull request Nov 30, 2026
…edentials and UserCredentials (#15245)

Updates OAuth2 token refresh and JSON loading for non-default universe
domains:

- Rejects `ServiceAccountCredentials.refreshAccessToken()` when
`getUniverseDomain()` is not `googleapis.com`, since OAuth2 token
exchange is only supported in `googleapis.com`, and clarifies in Javadoc
that `refreshAccessToken()` only applies to the OAuth2 access token flow
(not self-signed JWT authentication).
- Rejects `authorized_user` JSON with a non-default `universe_domain` in
`UserCredentials.fromJson()`, and rejects `UserCredentials` refreshes
whenever `getUniverseDomain()` is not `googleapis.com`.
- Updates two pre-existing custom-universe CAB unit tests
(`ClientSideCredentialAccessBoundaryFactoryTest.fetchIntermediateCredentials_withCustomUniverseDomain`
and
`DownscopedCredentialsTest.refreshAccessToken_withCustomUniverseDomain`)
to use a custom-universe `GoogleCredentials` stub. Those two tests
previously constructed a non-default-universe
`ServiceAccountCredentials` and called `refreshAccessToken()` on it, so
updating them here keeps CI green. All CAB production changes and new
CAB tests live in the stacked follow-up PR #15172.
@lqiu96
lqiu96 deleted the branch googleapis:fix/auth-sa-user-universe-refresh November 30, 2026 17:07
@lqiu96 lqiu96 closed this Nov 30, 2026
…s in CAB builders and clarify Javadocs

- Fails fast in ClientSideCredentialAccessBoundaryFactory.Builder.build() and DownscopedCredentials.Builder.build() when given a ServiceAccountCredentials in a non-default universe domain, since Credential Access Boundaries require an OAuth 2.0 access token rather than a self-signed JWT.
- Aligns ClientSideCredentialAccessBoundaryFactory.Builder whitespace-only universeDomain normalization and @nullable annotation with DownscopedCredentials.Builder.
- Consolidates CAB and OAuth2CredentialsWithRefresh Javadocs for non-default universe usage and adds CAB builder and fail-closed unit tests.
@lqiu96 lqiu96 reopened this Nov 30, 2026
@lqiu96
lqiu96 changed the base branch from fix/auth-sa-user-universe-refresh to main November 30, 2026 17:17
@lqiu96
lqiu96 force-pushed the fix/auth-cab-universe-refresh branch from 02e2985 to 0b5fd21 Compare November 30, 2026 17:17
@lqiu96
lqiu96 requested review from a team as code owners November 30, 2026 17:17

@nbayati nbayati left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on the CAB factory changes and Javadocs. Deferring to @lsirac for confirmation on the expected non-default universe behavior.

@lqiu96
lqiu96 requested review from lsirac and removed request for a team December 1, 2026 17:43
@lqiu96
lqiu96 removed request for a team December 1, 2026 17:43
* OAuth2CredentialsWithRefresh} and an {@link OAuth2CredentialsWithRefresh.OAuth2RefreshHandler}
* that obtains a fresh token from {@link #generateToken(CredentialAccessBoundary)} (typically via a
* token broker, or directly in-process by wrapping checked exceptions in {@link IOException}). When
* operating in a non-default universe domain, configure {@link

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mentions setting the universe domain on OAuth2CredentialsWithRefresh and GoogleCredentials#create, but leaves out that callers also have to call Builder#setUniverseDomain on this factory. Unlike ImpersonatedCredentials, leaving it unset defaults to googleapis.com and fails build() with a mismatch error.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

* Generates a downscoped access token given the {@link CredentialAccessBoundary}.
*
* <p>If no intermediate access token is cached, or if its remaining lifetime is within {@code
* refreshMargin} or {@code minimumTokenLifetime}, this method refreshes the source credential and

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads like entering refreshMargin always blocks on STS and encrypts with the newly fetched session key. When remaining lifetime is between minimumTokenLifetime and refreshMargin, generateToken() starts an async background refresh and encrypts the returned token with the cached session key instead.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

*
* <p>In non-default universe domains, {@link ServiceAccountCredentials} cannot be used directly
* because Credential Access Boundaries require an OAuth 2.0 access token (see <a
* href="https://cloud.google.com/iam/docs/create-downscoped-short-lived-credentials#before-you-begin">Create

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: #15312 just moved these doc links to docs.cloud.google.com.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

* a downscoped short-lived credential</a>) and service account OAuth2 token refresh is only
* supported in {@link Credentials#GOOGLE_DEFAULT_UNIVERSE}. Wrap the service account in {@code
* ImpersonatedCredentials}, or use credentials such as {@code ComputeEngineCredentials} or
* {@code ExternalAccountCredentials}.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Direct workforce identity pools under ExternalAccountCredentials don't support Credential Access Boundaries unless service account impersonation is configured. Mentioning ExternalAccountCredentials without that caveat can mislead workforce pool callers.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

*/
@CanIgnoreReturnValue
public Builder setUniverseDomain(String universeDomain) {
public Builder setUniverseDomain(@Nullable String universeDomain) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this class is @NullMarked, adding @Nullable here writes a nullable parameter into the unannotated universeDomain field on Builder, which strict nullness checkers will flag.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

*
* <p>In non-default universe domains, {@link ServiceAccountCredentials} cannot be used directly
* because Credential Access Boundaries require an OAuth 2.0 access token (see <a
* href="https://cloud.google.com/iam/docs/create-downscoped-short-lived-credentials#before-you-begin">Create

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: #15312 just moved these doc links to docs.cloud.google.com.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

* a downscoped short-lived credential</a>) and service account OAuth2 token refresh is only
* supported in {@link Credentials#GOOGLE_DEFAULT_UNIVERSE}. Wrap the service account in {@link
* ImpersonatedCredentials}, or use credentials such as {@link ComputeEngineCredentials} or
* {@link ExternalAccountCredentials}.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Direct workforce identity pools under ExternalAccountCredentials don't support Credential Access Boundaries unless service account impersonation is configured. Mentioning ExternalAccountCredentials without that caveat can mislead workforce pool callers.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

* refreshing tokens for a custom universe domain should configure it explicitly via {@link
* Builder#setUniverseDomain(String)}. If lazy or delegated universe domain resolution is needed,
* subclass this class and override {@link #getUniverseDomain()}.
* Builder#setUniverseDomain(String)}.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was removing the sentence about subclassing and overriding getUniverseDomain() intentional? The getUniverseDomain() Javadoc below still says subclasses may override it for lazy or delegated resolution.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not intentional, restored.

intermediateCredentials.getIntermediateAccessToken().getTokenValue());
assertEquals(
String.format(TOKEN_EXCHANGE_URL_FORMAT, universeDomain),
mockStsTransportFactory.transport.getRequest().getUrl());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now MockStsTransport only checks that subject_token is non-null. Can we also assert that the STS request body passes "impersonated-access-token" from the impersonation call?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

assertEquals(stsTransportFactory.transport.getAccessToken(), accessToken.getTokenValue());
assertEquals(
String.format(TOKEN_EXCHANGE_URL_FORMAT, universeDomain),
stsTransportFactory.transport.getRequest().getUrl());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now MockStsTransport only checks that subject_token is non-null. Can we also assert that the STS request body passes "impersonated-access-token" from the impersonation call?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

- Inherit source credential universe domain when setUniverseDomain() is omitted, null, or blank in ClientSideCredentialAccessBoundaryFactory and DownscopedCredentials, validating explicit values against the source credential.
- Fail fast on non-default-universe UserCredentials in both CAB builders alongside ServiceAccountCredentials.
- Annotate ClientSideCredentialAccessBoundaryFactory.Builder.universeDomain as @nullable.
- Clarify ExternalAccountCredentials Workforce Identity Federation caveat, async vs. blocking refresh in generateToken(), build() @throws tags, and restore OAuth2CredentialsWithRefresh subclassing note.
- Update IAM doc links to docs.cloud.google.com and assert subject_token in impersonated CAB tests.
@lqiu96 lqiu96 changed the title fix(auth): fix CAB refresh with non GDU universe domain fix(auth): inherit universe domain and fail fast in CAB builders Dec 2, 2026
* because Credential Access Boundaries require an OAuth 2.0 access token (see <a
* href="https://docs.cloud.google.com/iam/docs/create-downscoped-short-lived-credentials#before-you-begin">Create
* a downscoped short-lived credential</a>) and service account OAuth2 token refresh is only
* supported in {@link Credentials#GOOGLE_DEFAULT_UNIVERSE}. {@link UserCredentials} are also

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads like UserCredentials work for client-side CAB in googleapis.com. Unlike server-side DownscopedCredentials, STS client-side CAB rejects user account tokens in every universe, including googleapis.com.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

+ " instead.",
resolvedUniverseDomain, Credentials.GOOGLE_DEFAULT_UNIVERSE));
}
if (sourceCredential instanceof UserCredentials) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message says UserCredentials fail because they are only supported in googleapis.com, which implies they work with this factory in the default universe. STS rejects user account tokens for client-side CAB in googleapis.com too. Should we reject UserCredentials outside the non-default universe guard (or at least reword the message)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to reject UserCredentials in all universes.

* only supported in {@link Credentials#GOOGLE_DEFAULT_UNIVERSE}. Wrap a service account in
* {@link com.google.auth.oauth2.ImpersonatedCredentials ImpersonatedCredentials}, or use
* credentials such as {@link com.google.auth.oauth2.ComputeEngineCredentials
* ComputeEngineCredentials} or {@link com.google.auth.oauth2.ExternalAccountCredentials

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: ExternalAccountAuthorizedUserCredentials (interactive Workforce Identity Federation) extend GoogleCredentials directly rather than ExternalAccountCredentials and do not support impersonation inside the config. Worth noting they also need to be wrapped in ImpersonatedCredentials for CAB.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

* supported in {@link Credentials#GOOGLE_DEFAULT_UNIVERSE}. {@link UserCredentials} are also
* only supported in {@link Credentials#GOOGLE_DEFAULT_UNIVERSE}. Wrap a service account in
* {@link ImpersonatedCredentials}, or use credentials such as {@link ComputeEngineCredentials}
* or {@link ExternalAccountCredentials} (for Workforce Identity Federation, service account

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: ExternalAccountAuthorizedUserCredentials (interactive Workforce Identity Federation) extend GoogleCredentials directly rather than ExternalAccountCredentials. Worth noting they also need to be wrapped in ImpersonatedCredentials for CAB.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

}

this.tokenExchangeEndpoint = String.format(TOKEN_EXCHANGE_URL_FORMAT, universeDomain);
this.tokenExchangeEndpoint = String.format(TOKEN_EXCHANGE_URL_FORMAT, resolvedUniverseDomain);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: now that omitting setUniverseDomain() inherits any non-blank sourceCredential.getUniverseDomain(), untrimmed or malformed values (like "googleapis.com@evil.com", "https://example.com", or trailing newlines) pass build() and alter the parsed URL or fail lazily during token exchange. Fine to handle in a shared follow-up across the library since ImpersonatedCredentials does the same.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, let's leave that for a shared follow-up if needed across the library.

"The source credential's universe domain must not be null or empty.");
}

String resolvedUniverseDomain;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: because equals() checks exact equality, both branches resolve to sourceUniverseDomain. This can collapse into a single mismatch check without resolvedUniverseDomain.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.


if (builder.universeDomain == null || builder.universeDomain.trim().isEmpty()) {
this.universeDomain = Credentials.GOOGLE_DEFAULT_UNIVERSE;
// Inherit the source credential's universe domain when not explicitly supplied.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: because equals() checks exact equality, both branches assign sourceUniverseDomain. This can collapse into a single mismatch check.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

}

if (!Credentials.GOOGLE_DEFAULT_UNIVERSE.equals(resolvedUniverseDomain)) {
// Credential Access Boundaries require a Google-issued OAuth 2.0 access token, not a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this comment about self-signed JWTs applies to ServiceAccountCredentials, not UserCredentials. Moving it directly above the ServiceAccountCredentials check keeps it accurate.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

try {
if (!this.universeDomain.equals(sourceCredential.getUniverseDomain())) {
if (!Credentials.GOOGLE_DEFAULT_UNIVERSE.equals(this.universeDomain)) {
// Credential Access Boundaries require a Google-issued OAuth 2.0 access token, not a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this comment about self-signed JWTs applies to ServiceAccountCredentials, not UserCredentials. Moving it directly above the ServiceAccountCredentials check keeps it accurate.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

return getServiceAccountSourceCredentials(transportFactory);
}

private static GoogleCredentials getServiceAccountSourceCredentials(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this helper overload only has one caller (right above). Can it be inlined back, or reused by getNonDefaultUniverseServiceAccount?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

…-refresh

# Conflicts:
#	google-auth-library-java/cab-token-generator/java/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactory.java
#	google-auth-library-java/oauth2_http/java/com/google/auth/oauth2/OAuth2CredentialsWithRefresh.java
@lqiu96
lqiu96 merged commit 4e71669 into googleapis:main Dec 4, 2026
290 of 292 checks passed
jinseopkim0 pushed a commit that referenced this pull request Dec 4, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>1.98.0</summary>

##
[1.98.0](v1.97.0...v1.98.0)
(2026-12-04)


### Features

* **auth:** support universeDomain in JwtCredentials
([#15176](#15176))
([ec8c96a](ec8c96a))
* **auth:** support universeDomain in OAuth2CredentialsWithRefresh
([#15180](#15180))
([7dbeb7f](7dbeb7f))
* **auth:** support universeDomain in OAuth2CredentialsWithRefresh
([#15180](#15180))
([0256e16](0256e16))
* **firestore:** Added support for window functions in Pipelines
([#14504](#14504))
([825867d](825867d))
* **gax:** enter inScope() during CompositeTracer completion callbacks
([#15034](#15034))
([624ef49](624ef49))
* **gax:** implement inScope() in OpenTelemetryTracingTracer
([#15033](#15033))
([5f93182](5f93182))
* **google/cloud/agentregistryendpoint/v1:** add agentregistryendpoint
([#15404](#15404))
([e92bda7](e92bda7))
* **google/cloud/universalledger/v1:** add universalledger
([#15401](#15401))
([250fa0d](250fa0d))
* **spanner:** add BatchWrite timeout configurator, client context
support, and retry prerequisites
([#15194](#15194))
([9f21dd0](9f21dd0))
* **spanner:** support per-client built-in Cloud Monitoring metrics
([#15261](#15261))
([e902bb0](e902bb0))
* update API sources and regenerate
([#15400](#15400))
([5712923](5712923))


### Bug Fixes

* **auth:** delegate getUniverseDomain in IdTokenCredentials
([#15173](#15173))
([c789825](c789825))
* **auth:** honor universe_domain and iamEndpointOverride in
ImpersonatedCredentials
([#15201](#15201))
([cadc868](cadc868))
* **auth:** inherit universe domain and fail fast in CAB builders
([#15172](#15172))
([4e71669](4e71669))
* **auth:** mask access_boundary_session_key in SLF4J logs
([#15221](#15221))
([d4f941d](d4f941d))
* **auth:** mask access_boundary_session_key in SLF4J logs
([#15221](#15221))
([01e8b1f](01e8b1f))
* **auth:** preserve serialization compatibility in JwtCredentials
([#15190](#15190))
([0f1c8ab](0f1c8ab))
* **auth:** propagate universeDomain to JwtCredentials from service
account credentials
([#15189](#15189))
([7dff1ea](7dff1ea))
* **auth:** reject non-default universe refreshes for
ServiceAccountCredentials and UserCredentials
([#15245](#15245))
([a46429d](a46429d))
* **auth:** require an explicit revoke URI in UserAuthorizer with a
custom token server
([#15160](#15160))
([52e0fc8](52e0fc8))
* **auth:** send IAM Credentials calls over mTLS for certificate-bound
agent identity tokens
([#15027](#15027))
([63e5fc1](63e5fc1))
* **bigquery-jdbc:** add 1 GiB log file rotation and truncation fallback
([#15165](#15165))
([a756d92](a756d92))
* **bigquery-jdbc:** add cross-process global log lock fallback and
interrupt recovery
([#15253](#15253))
([5ae9558](5ae9558))
* **bigquery-jdbc:** add single-pass URL parser, remove PARSE_CACHE, and
validate property keys
([#15289](#15289))
([ac21060](ac21060))
* **bigquery-jdbc:** bind table parameter in
DatabaseMetaData.getExportedKeys
([#15096](#15096))
([12edf41](12edf41))
* **bigquery-jdbc:** bound BigDecimal scale in epoch-decimal timestamp
parsing
([#15218](#15218))
([25eebb6](25eebb6))
* **bigquery-jdbc:** enforce JDBC connection pooling lifecycle, state
reset, and physical isolation
([#15202](#15202))
([cff532d](cff532d))
* **bigquery-jdbc:** extract SSL TrustStore helpers and validate
ProxyHost
([#15361](#15361))
([668fac9](668fac9))
* **bigquery-jdbc:** gate log writer lifecycle, mask URL secrets, and
short-circuit Gate 1
([#15255](#15255))
([312e4aa](312e4aa))
* **bigquery-jdbc:** harden log file creation with 0600/0700 permissions
and symlink checks
([#15112](#15112))
([c4fe829](c4fe829))
* **bigquery-jdbc:** honor GOOGLE_CLOUD_UNIVERSE_DOMAIN and preserve
credential universe_domain
([#15211](#15211))
([15310ae](15310ae))
* **bigquery-jdbc:** isolate per-connection log levels, directories, and
pre-connect routing
([#15168](#15168))
([35ae16b](35ae16b))
* **bigquery-jdbc:** record adoption features once per object
([#15044](#15044))
([9b7ef2b](9b7ef2b))
* **bigquery-jdbc:** replace String log parameter routing with typed
ConnectionLogContext
([#15254](#15254))
([718e941](718e941))
* **bigquery-jdbc:** skip Conscrypt socket setup when Conscrypt is
unavailable
([#15140](#15140))
([ef03da2](ef03da2)),
refs
[#15052](#15052)
* **bigquery-jdbc:** use iterative SQL LIKE matcher and escape-aware
wildcard checks in DatabaseMetaData
([#15104](#15104))
([a9482ac](a9482ac))
* **bigquery-jdbc:** use loopback binding, PKCE, and state verification
in user account OAuth flow
([#15241](#15241))
([d61b6d3](d61b6d3))
* **bigquery:** forward universe domain to BigQueryReadSettings in
ConnectionImpl
([#15200](#15200))
([5cd6025](5cd6025))
* **bigquerystorage:** support universe domain and stop pinning default
endpoint in StreamWriter
([#15209](#15209))
([8eb9529](8eb9529))
* **bigquery:** validate universe domain on resumable upload RPCs
([#15133](#15133))
([5e26ba8](5e26ba8))
* **bigtable:** delegate MaterializedView/LogicalView toString() to
proto and fix list*ViewsTest
([#15243](#15243))
([571a013](571a013))
* **bigtable:** derive default JWT audience from resolved universe
domain
([#15422](#15422))
([961764f](961764f))
* **bigtable:** fix admin client setup and stale instance deletion in
StaleResourceCleaner
([#15162](#15162))
([c39e7da](c39e7da))
* **bigtable:** ignore blank client-config-override and enforce IT
protocol
([#15206](#15206))
([2b00c9e](2b00c9e))
* **bigtable:** preserve user metrics and tracer factory on sessions
path when internal metrics are disabled
([#15296](#15296))
([b9d0c2b](b9d0c2b))
* **bigtable:** validate universe domain on client initialization
([#15399](#15399))
([97b8c78](97b8c78))
* **core:** resolve universe domain and track explicit host in
ServiceOptions
([#15307](#15307))
([aa32bfa](aa32bfa))
* **core:** skip universe domain validation for ApiKeyCredentials
([c33b2d1](c33b2d1))
* **core:** validate deserialized class types in
ServiceOptions.newInstance
([#15182](#15182))
([35a7890](35a7890))
* **datastore:** avoid DNS lookup for default host in isLocalHost
([#15413](#15413))
([b535074](b535074))
* **datastore:** propagate universe domain and resolve default endpoint
([#15137](#15137))
([a328895](a328895))
* **datastore:** propagate universeDomain to
DatastoreCloudMonitoringExporter
([#15159](#15159))
([5b56362](5b56362))
* **datastore:** reset auto-generated channelProvider on toBuilder
mutations
([#15415](#15415))
([8823d6b](8823d6b))
* **datastore:** reset transport-default host when switching transport
via toBuilder
([#15414](#15414))
([43544ea](43544ea))
* **deps:** update dependency
com.google.api-client:google-api-client-bom to v2.9.3
([#15429](#15429))
([65b8a11](65b8a11))
* **dns:** resolve universe domain host in DnsOptions and HttpDnsRpc
([#15359](#15359))
([207f3c6](207f3c6))
* **firestore:** propagate universe domain and resolve default endpoint
([#15174](#15174))
([e82b3dd](e82b3dd))
* **gax:** disallow S2A outside googleapis.com universe domain
([#15149](#15149))
([e63c85f](e63c85f))
* **gax:** report CLIENT_TIMEOUT and omit synthetic HTTP 504 on client
timeouts
([#15298](#15298))
([eebcf07](eebcf07))
* **gax:** skip universe domain validation for ApiKeyCredentials
([c33b2d1](c33b2d1))
* **logging:** propagate universe domain and resolve default endpoint
via GAX
([#15136](#15136))
([91e97ce](91e97ce))
* **resourcemanager:** resolve universe domain host in
ResourceManagerOptions and HttpResourceManagerRpc
([#15360](#15360))
([f7cdc23](f7cdc23))
* **spanner-jdbc:** abort DDL batch on buffering failure and wrap
runtime exceptions as SQLException
([#15384](#15384))
([6c422c1](6c422c1))
* **spanner:** add read timeout and disconnect to GCE metadata probe
([#15288](#15288))
([0095e08](0095e08))
* **spanner:** avoid writing bound parameter values to SpannerException
at FINEST logging
([#15275](#15275))
([ebdb08d](ebdb08d))
* **spanner:** clear CallCredentialsProvider under usePlainText and
emulator mode
([#15276](#15276))
([5db6049](5db6049))
* **spanner:** disable built-in Cloud Monitoring metrics for custom
non-default hosts without an explicit target
([#15252](#15252))
([2c52d5e](2c52d5e))
* **spanner:** disable default built-in metrics for non-standard
endpoints and custom channel providers
([#15272](#15272))
([3fd923e](3fd923e))
* **spanner:** dispatch PG SET SPANNER.EXCLUDE_TXN_FROM_CHANGE_STREAMS
correctly
([#15282](#15282))
([df54279](df54279))
* **spanner:** honor GOOGLE_CLOUD_UNIVERSE_DOMAIN when universe domain
is unset
([#15142](#15142))
([f067ab2](f067ab2))
* **spanner:** include channelProvider in SpannerPoolKey for pool
isolation
([#15281](#15281))
([c30ff49](c30ff49))
* **spanner:** preserve per-call CallCredentials on
DirectPath-to-CloudPath fallback
([#15283](#15283))
([67d14cf](67d14cf))
* **spanner:** recompute default host on toBuilder().setUniverseDomain()
([#15134](#15134))
([0c8bb83](0c8bb83))
* **spanner:** reject point-at-infinity and non-canonical EC points in
OPAQUE
([#15146](#15146))
([420f49e](420f49e))
* **spanner:** resolve default host from universeDomain in
ConnectionOptions.getChannelProvider()
([#15135](#15135))
([17fe76d](17fe76d))
* **spanner:** skip Cloud Monitoring built-in metrics for
unauthenticated clients
([#15259](#15259))
([1c0a358](1c0a358))
* **spanner:** unify streaming retry delay sanitization and backoff
([#15271](#15271))
([2c38865](2c38865))
* **spanner:** validate defaultSequenceKind and databaseName before DDL
formatting
([#15280](#15280))
([c86bb3f](c86bb3f))
* **storage:** omit credentials and quota project on signed URL uploads
([#15132](#15132))
([bb5d30c](bb5d30c))
* **storage:** resolve GrpcStorageOptions default host from the
configured universe domain
([#15238](#15238))
([4060273](4060273))
* **storage:** resolve HttpStorageOptions default host from the universe
domain on build()
([#15222](#15222))
([3eaa313](3eaa313))
* **storage:** resolve storage universe domain from
GOOGLE_CLOUD_UNIVERSE_DOMAIN for HTTP host and URL signingiverse domain
([#15235](#15235))
([9cfd31b](9cfd31b))
* **storage:** use client credentials and universe domain for metrics
([#15193](#15193))
([87e715e](87e715e))
* **translate:** resolve universe domain host in TranslateOptions and
HttpTranslateRpc
([#15358](#15358))
([903070f](903070f))


### Performance Improvements

* **spanner:** make async query execution event-driven
([#14933](#14933))
([1413eeb](1413eeb))


### Documentation

* add observability guide for OpenTelemetry tracing and logging
([#14462](#14462))
([d39722e](d39722e))
* **auth:** add DEVELOPMENT.md guide for test certificates
([#15306](#15306))
([fb6941c](fb6941c)),
refs
[#12581](#12581)
* **auth:** add missing class Javadocs, update fromStream type lists,
and fix typos
([#15314](#15314))
([bfeca65](bfeca65))
* **auth:** document default universe domain on access token
constructors
([#15217](#15217))
([f9c5fa2](f9c5fa2))
* **auth:** fix broken Javadoc snippets in IdToken, Jwt, and
Impersonated credentials
([#15425](#15425))
([97cc4e8](97cc4e8))
* **auth:** fix invalid Javadoc tags, raw backticks, broken links, and
dropped comments
([#15311](#15311))
([790e712](790e712))
* **auth:** fix README links, BOM license, and repo metadata URLs
([#15313](#15313))
([d387cc0](d387cc0))
* **auth:** remove internal shortlink and update dead or legacy URLs
([#15312](#15312))
([4ae2222](4ae2222))
* **bigquery:** document BigQuery interface scope, lifecycle, and thread
safety
([#15117](#15117))
([62fda1c](62fda1c))
* **bigquery:** document BigQueryOptions and BigQueryRetryConfig retry
and timeout settings
([#15128](#15128))
([9e8b3ae](9e8b3ae))
* **bigquery:** document structured error reasons and retryability on
BigQueryException
([#15125](#15125))
([c4d09b7](c4d09b7))
* **bigquery:** fix broken multiline and overload Javadoc links
([#15350](#15350))
([fa9f34d](fa9f34d))
* **bigquery:** fix inverted and factually outdated Javadocs
([#15118](#15118))
([7fca6aa](7fca6aa))
* **bigquery:** fix uncompilable Javadoc snippets and copy-paste labels
([#15122](#15122))
([4c8b704](4c8b704))
* **bigquery:** replace broken troubleshooting-errors links
([#15110](#15110))
([92962ed](92962ed))
* **bigquerystorage:** fix factual and inverted Javadoc claims
([#15153](#15153))
([68d3708](68d3708))
* **bigquerystorage:** fix uncompilable and no-op Javadoc snippets
([#15154](#15154))
([6593724](6593724))
* **bigquery:** update archived sample and troubleshooting links in
README
([#15124](#15124))
([b18cd9f](b18cd9f))
* **bigquery:** update malformed and legacy documentation URLs
([#15123](#15123))
([e628795](e628795))
* **bigquery:** update package-info.java with API guidance and valid
links
([#15116](#15116))
([962ccd0](962ccd0))
* **datastore:** fix broken GitHub links and update legacy documentation
URLs
([#15152](#15152))
([39ba0d4](39ba0d4))
* **datastore:** replace legacy App Engine query documentation URLs
([#15151](#15151))
([0b2cb50](0b2cb50))
* fix verified broken and wrong-target DevSite Javadoc links
([#15352](#15352))
([a902eaf](a902eaf))
* **gax:** clean up README, CONTRIBUTING, and DEVELOPMENT docs in
sdk-platform-java
([#15285](#15285))
([e3878bd](e3878bd))
* **gax:** fix broken URLs, invalid Javadoc tags, and raw Markdown
syntax
([#15286](#15286))
([b7f05e7](b7f05e7))
* **gax:** update obsolete Duration references in RetrySettings and
Watchdog
([#15295](#15295))
([6e348b5](6e348b5))
* **logging:** fix copy-pasted Javadocs in SinkInfo and
LogDestinationName
([#15157](#15157))
([cec9117](cec9117))
* **logging:** fix inaccurate return and async throws Javadocs in
Logging, Metric, and Sink
([#15155](#15155))
([32c5af7](32c5af7))
* **logging:** fix property key, copy-pasted Javadocs, and typos in
LoggingHandler and LoggingLevel
([#15156](#15156))
([36bb132](36bb132))
* refine observability guide per PR
[#14462](#14462)
review comments
([#15411](#15411))
([c2ee9f3](c2ee9f3))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants