Skip to content

feat(auth): gate regional access boundary lookups with experimental env var - #19132

Open
nbayati wants to merge 2 commits into
mainfrom
regional_access_boundary_env_gate
Open

nbayati wants to merge 2 commits into
mainfrom
regional_access_boundary_env_gate

Conversation

@nbayati

@nbayati nbayati commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Adds the GOOGLE_CLOUD_EXPERIMENTAL_REGIONAL_ACCESS_BOUNDARY_LOOKUP environment variable to allow opting out of Regional Access Boundary lookup across sync and async credentials when set to a case-insensitive "false" or "0". When disabled, credentials skip Regional Access Boundary lookup requests, ignore pre-seeded boundaries, return None from boundary properties, and omit the x-allowed-locations header.

…nv var

Add GOOGLE_CLOUD_EXPERIMENTAL_REGIONAL_ACCESS_BOUNDARY_LOOKUP to allow
disabling Regional Access Boundary lookup across sync and async
credentials by setting a case-insensitive "false" or "0".
…en disabled

Ignore initial Regional Access Boundary values, return None from
boundary properties, and strip x-allowed-locations headers when
GOOGLE_CLOUD_EXPERIMENTAL_REGIONAL_ACCESS_BOUNDARY_LOOKUP disables
lookup.
@nbayati
nbayati requested review from a team as code owners November 19, 2026 06:22
@nbayati
nbayati requested review from daniel-sanche and macastelaz and removed request for a team November 19, 2026 06:22

@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 the experimental environment variable GOOGLE_CLOUD_EXPERIMENTAL_REGIONAL_ACCESS_BOUNDARY_LOOKUP to control whether Regional Access Boundary (RAB) lookup is enabled. It adds helper logic to parse this environment variable and updates credentials, external account, and regional access boundary utility modules to skip RAB lookups, header application, and initializations when disabled. Additionally, comprehensive unit tests have been added to verify this behavior across synchronous and asynchronous flows. I have no feedback to provide as there are no review comments.

This branch has not been deployed

No deployments
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.

1 participant