Repository navigation
fix(auth/credentials/downscope): update universe resolution - #20967
Conversation
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
There was a problem hiding this comment.
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.
🤖 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>
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