Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 7 additions & 7 deletions packages/google-auth/google/auth/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
macastelaz marked this conversation as resolved.
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).

Expand All @@ -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

Expand Down
Loading