Skip to content

feat(auth): Add support for Regional Access Boundaries#13499

Merged
vverman merged 5 commits into
googleapis:mainfrom
vverman:regional-access-boundaries-main-merge
Jun 22, 2026
Merged

feat(auth): Add support for Regional Access Boundaries#13499
vverman merged 5 commits into
googleapis:mainfrom
vverman:regional-access-boundaries-main-merge

Conversation

@vverman

@vverman vverman commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

The Regional Access Boundaries PR to main. Contains all the changes merged to the feature branch rebased on top of main.

P.S. Opening the PR directly to main as feature branch regional-access-boundaries has drifted from main and opening a rebased-PR to the feature branch shows 5k+ lines of code diff.

vverman added 4 commits June 16, 2026 16:19
…gleapis#12867)

1. The RAB refresh uses a direct executor with a fixed thread pool as
opposed to instantiating a new thread each time.

2. The RAB env gate -> GOOGLE_AUTH_TRUST_BOUNDARY_ENABLE_EXPERIMENT has
been removed. This means RAB refresh triggers by default.

3. Added other fixes/suggestions made in the previous Java
[PR](googleapis/google-auth-library-java#1880).
…oogleapis#13331)

In ComputeEngineCredentials when running on GKE platform, the
getAccount() call may return a value which isn't an email.

In this case the right behaviour is to skip RAB lookup which is what
this PR does.

Added 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 support for Regional Access Boundaries (RAB) across various Google credential types by implementing the RegionalAccessBoundaryProvider interface and managing the lifecycle of boundaries via a new RegionalAccessBoundaryManager. The feedback highlights a few critical improvement opportunities: adding null checks for getAudience() in both ExternalAccountAuthorizedUserCredentials and ExternalAccountCredentials to prevent potential NullPointerExceptions, and performing a defensive copy of the locations list in the RegionalAccessBoundary constructor to guarantee the class's immutability.

@vverman vverman marked this pull request as ready for review June 16, 2026 23:50
@vverman vverman requested review from a team as code owners June 16, 2026 23:50
@vverman vverman requested review from lqiu96 and nbayati June 17, 2026 00:45
@lqiu96 lqiu96 changed the title feat(auth): Regional access boundaries main feat(auth): Add support for Regional Access Boundaries Jun 17, 2026
@vverman vverman requested a review from lqiu96 June 21, 2026 04:18
@lqiu96 lqiu96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 22, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 22, 2026
@lqiu96 lqiu96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 22, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 22, 2026

@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.

Great job! 🎉

@lqiu96

lqiu96 commented Jun 22, 2026

Copy link
Copy Markdown
Member

Error:

16:34:18:899 [INFO] Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.080 s -- in com.google.cloud.compute.v1.RegionCompositeHealthChecksClientTest
16:34:18:934 [INFO] 
16:34:18:934 [INFO] Results:
16:34:18:934 [INFO] 
16:34:18:934 [ERROR] Errors: 
16:34:18:934 [ERROR]   ITPaginationTest.testPaginationAggregatedIterating » PermissionDenied Quota exceeded for quota metric 'Read requests' and limit 'Read requests per minute' of service 'compute.googleapis.com' for consumer 'project_number:28331648575'.

Test failure looks to be irrelevant to the feature. We can merge without the Graalvm checks passing

@vverman vverman merged commit b721e43 into googleapis:main Jun 22, 2026
308 of 316 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.

4 participants