From 6d4e987ca698d60792b80fc5a453e09ce3faa66e Mon Sep 17 00:00:00 2001 From: Matt Castelaz Date: Tue, 19 May 2026 19:14:16 +0000 Subject: [PATCH] fix: Rename the 'seed' argument for setting an initial regional access boundary for clarity --- .../google/auth/_regional_access_boundary_utils.py | 2 +- packages/google-auth/google/auth/credentials.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/google-auth/google/auth/_regional_access_boundary_utils.py b/packages/google-auth/google/auth/_regional_access_boundary_utils.py index 81011911df3d..5f451bf0e8f4 100644 --- a/packages/google-auth/google/auth/_regional_access_boundary_utils.py +++ b/packages/google-auth/google/auth/_regional_access_boundary_utils.py @@ -134,7 +134,7 @@ def enable_blocking_lookup(self): self._use_blocking_regional_access_boundary_lookup = True def set_initial_regional_access_boundary(self, encoded_locations=None, expiry=None): - """Manually sets the regional access boundary to the client provided seed. + """Manually sets the regional access boundary to the client provided initial values. Args: encoded_locations (Optional[str]): The encoded locations string. diff --git a/packages/google-auth/google/auth/credentials.py b/packages/google-auth/google/auth/credentials.py index 4a686cb01907..2242cd2869c0 100644 --- a/packages/google-auth/google/auth/credentials.py +++ b/packages/google-auth/google/auth/credentials.py @@ -371,11 +371,11 @@ def _copy_regional_access_boundary_manager(self, target): new_manager._data = self._rab_manager._data target._rab_manager = new_manager - def _set_regional_access_boundary(self, seed): - """Applies the regional_access_boundary provided via the seed on these - credentials. This is intended for internal use only as invalid - seeds would produce unexpected results until automatic recovery is supported. - Currently this is used by the gcloud CLI and therefore changes to the + def _set_regional_access_boundary(self, initial_boundary): + """Applies the regional_access_boundary provided via the initial_boundary on these + credentials. This is intended for internal use only as an invalid + initial_boundary would produce unexpected results until automatic recovery + is supported. Currently this is used by the gcloud CLI and therefore changes to the contract MUST be backwards compatible (e.g. the method signature must be unchanged and the credentials with the RAB set must be returned). @@ -384,8 +384,8 @@ def _set_regional_access_boundary(self, seed): google.auth.credentials.Credentials: The credentials instance. """ self._rab_manager.set_initial_regional_access_boundary( - encoded_locations=seed.get("encodedLocations", None), - expiry=seed.get("expiry", None), + encoded_locations=initial_boundary.get("encodedLocations", None), + expiry=initial_boundary.get("expiry", None), ) return self