Skip to content

fix(auth): propagate universeDomain to JwtCredentials from service account credentials - #15189

Merged
lqiu96 merged 3 commits into
googleapis:mainfrom
lqiu96:fix/auth-sa-jwt-universe-domain-propagation
Nov 24, 2026
Merged

lqiu96 merged 3 commits into
googleapis:mainfrom
lqiu96:fix/auth-sa-jwt-universe-domain-propagation

Conversation

@lqiu96

@lqiu96 lqiu96 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #15176. JwtCredentials created by ServiceAccountCredentials and ServiceAccountJwtAccessCredentials now carry the source credential's universe domain. ServiceAccountJwtAccessCredentials also includes universeDomain in equals(), hashCode(), and toString(), and defaults it to googleapis.com when deserializing older objects.

@lqiu96
lqiu96 requested review from a team as code owners November 24, 2026 03:24

@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 ensures that the universeDomain is correctly propagated when creating JWT credentials in both ServiceAccountCredentials and ServiceAccountJwtAccessCredentials, and adds corresponding unit tests to verify this behavior. The feedback suggests a minor improvement in ServiceAccountCredentials to use java.io.UncheckedIOException instead of IllegalStateException when wrapping the checked IOException in getUniverseDomainOrThrow(), which is more idiomatic in Java.

@lqiu96
lqiu96 merged commit 7dff1ea into googleapis:main Nov 24, 2026
326 of 328 checks passed
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.

2 participants