Skip to content

Commit 6d4e987

Browse files
committed
fix: Rename the 'seed' argument for setting an initial regional access boundary for clarity
1 parent 49252da commit 6d4e987

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

packages/google-auth/google/auth/_regional_access_boundary_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def enable_blocking_lookup(self):
134134
self._use_blocking_regional_access_boundary_lookup = True
135135

136136
def set_initial_regional_access_boundary(self, encoded_locations=None, expiry=None):
137-
"""Manually sets the regional access boundary to the client provided seed.
137+
"""Manually sets the regional access boundary to the client provided initial values.
138138
139139
Args:
140140
encoded_locations (Optional[str]): The encoded locations string.

packages/google-auth/google/auth/credentials.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,11 @@ def _copy_regional_access_boundary_manager(self, target):
371371
new_manager._data = self._rab_manager._data
372372
target._rab_manager = new_manager
373373

374-
def _set_regional_access_boundary(self, seed):
375-
"""Applies the regional_access_boundary provided via the seed on these
376-
credentials. This is intended for internal use only as invalid
377-
seeds would produce unexpected results until automatic recovery is supported.
378-
Currently this is used by the gcloud CLI and therefore changes to the
374+
def _set_regional_access_boundary(self, initial_boundary):
375+
"""Applies the regional_access_boundary provided via the initial_boundary on these
376+
credentials. This is intended for internal use only as an invalid
377+
initial_boundary would produce unexpected results until automatic recovery
378+
is supported. Currently this is used by the gcloud CLI and therefore changes to the
379379
contract MUST be backwards compatible (e.g. the method signature must be
380380
unchanged and the credentials with the RAB set must be returned).
381381
@@ -384,8 +384,8 @@ def _set_regional_access_boundary(self, seed):
384384
google.auth.credentials.Credentials: The credentials instance.
385385
"""
386386
self._rab_manager.set_initial_regional_access_boundary(
387-
encoded_locations=seed.get("encodedLocations", None),
388-
expiry=seed.get("expiry", None),
387+
encoded_locations=initial_boundary.get("encodedLocations", None),
388+
expiry=initial_boundary.get("expiry", None),
389389
)
390390
return self
391391

0 commit comments

Comments
 (0)