feat(auth): Add support for Regional Access Boundaries#13499
Conversation
googleapis#12787) Migrates RAB changes from the older repo -> https://github.com/googleapis/google-auth-library-java/tree/feat-tb-sa
…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.
There was a problem hiding this comment.
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.
|
Error: Test failure looks to be irrelevant to the feature. We can merge without the Graalvm checks passing |
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.