Skip to content

fix(auth/credentials/downscope): update universe resolution - #20967

Merged
shollyman merged 2 commits into
googleapis:mainfrom
shollyman:downscope-resolution
Nov 22, 2026
Merged

shollyman merged 2 commits into
googleapis:mainfrom
shollyman:downscope-resolution

Conversation

@shollyman

Copy link
Copy Markdown
Contributor

This PR updates universe handling for downscoped credentials to be more robust. The universe settings associated with the underlying credentials are used for resolution, and the UniverseDomain option is refined to become an explicit validator to against the universe extracted from the underlying Credentials.

Related: b/588887120

This PR updates universe handling for downscoped credentials to be more
robust.  The universe settings associated with the underlying
credentials are used for resolution, and the UniverseDomain option is
refined to become an explicit validator to against the universe
extracted from the underlying Credentials.

Related: b/588887120
@shollyman
shollyman requested review from a team as code owners November 22, 2026 20:42

@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 refactors the downscoping credentials implementation to dynamically resolve and validate the universe domain from the source credentials during token exchange, rather than relying solely on static configuration. It updates the STS endpoint resolution logic and adds comprehensive test coverage for various universe domain scenarios and error states. The review feedback correctly points out that storing the Options pointer directly in downscopedTokenProvider allows post-construction modifications (such as mutating Rules) to affect behavior, and suggests shallow-copying the options and deep-copying the rules to ensure immutability. Additionally, the feedback recommends expanding the test suite to verify this isolation by mutating the rules slice in tests.

Comment thread auth/credentials/downscope/downscope.go Resolved
Comment thread auth/credentials/downscope/downscope.go Resolved
@shollyman
shollyman merged commit 16e0475 into googleapis:main Nov 22, 2026
17 checks passed
@release-please release-please Bot mentioned this pull request Nov 22, 2026
shollyman pushed a commit that referenced this pull request Nov 25, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>auth: 0.24.5</summary>

##
[0.24.5](auth/v0.24.4...auth/v0.24.5)
(2026-11-25)


### Bug Fixes

* **auth/credentials/downscope:** Update universe resolution
([#20967](#20967))
([16e0475](16e0475))
* **auth:** Add ES256 length validation
([#20949](#20949))
([35958cc](35958cc))
* **auth:** Improve directpath resolution
([#21004](#21004))
([ceeb6a1](ceeb6a1))
</details>

<details><summary>bigquery: 1.86.4</summary>

##
[1.86.4](bigquery/v1.86.3...bigquery/v1.86.4)
(2026-11-25)


### Bug Fixes

* **bigquery/storage/managedwriter:** Address panic on client close
([#20932](#20932))
([7a5e14f](7a5e14f))
</details>

<details><summary>profiler: 0.7.2</summary>

##
[0.7.2](profiler/v0.7.1...profiler/v0.7.2)
(2026-11-25)


### Bug Fixes

* **profiler:** Universe resolution improvements
([#20991](#20991))
([5cec789](5cec789))
</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.

2 participants