chore(auth): Regional access boundaries port the feature latest RAB feature branch - #8769
Conversation
* RAB endpoints changed from staging to prod; Removed RAB env variable gate; updated tests. * removed sinon.createSandbox from nested beforeEach blocks in test.compute.ts, test.jwt.ts, and test.impersonated.ts.
There was a problem hiding this comment.
Code Review
This pull request introduces Regional Access Boundary (RAB) support to the Google Auth Library for Node.js, adding a RegionalAccessBoundaryManager to fetch, cache, and apply regional access boundary rules (such as the x-allowed-locations header) across various auth clients. Feedback on the changes includes correcting swapped comments for workload and workforce identity pools in baseexternalclient.ts, and replacing flaky polling loops with direct awaits on the internal refresh promise in the test suite.
nbayati
left a comment
There was a problem hiding this comment.
Thanks for opening this PR, everything looks great.
I did notice one pre-existing issue carried over from the old feature branch that we should probably address here. Across several test files, the tests are using a setTimeout polling loop to wait for the background RAB refresh to complete, rather than awaiting the promise directly. I see you already started cleaning this up in test.authclient.ts in your recent nit fixes commit by directly awaiting regionalAccessBoundaryRefreshPromise. It would be great to apply that same pattern to the remaining test files.
6643bec
into
googleapis:regional-access-boudaries-july2026
The Regional Access Boundaries PR to main. Contains all the changes merged to the feature branch "regional-access-boundaries" rebased on top of main.