Skip to content

Commit c281fee

Browse files
committed
Revert changes to external account class file.
1 parent cd213c0 commit c281fee

File tree

1 file changed

+14
-21
lines changed

1 file changed

+14
-21
lines changed

google/auth/external_account.py

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,18 @@
5959
@dataclass
6060
class SupplierContext:
6161
"""A context class that contains information about the requested third party credential that is passed
62-
to AWS security credential and subject token suppliers.
62+
to AWS security credential and subject token suppliers.
6363
64-
Attributes:
65-
subject_token_type (str): The requested subject token type based on the Oauth2.0 token exchange spec.
66-
Expected values include::
64+
Attributes:
65+
subject_token_type (str): The requested subject token type based on the Oauth2.0 token exchange spec.
66+
Expected values include::
6767
68-
“urn:ietf:params:oauth:token-type:jwt”
69-
“urn:ietf:params:oauth:token-type:id-token”
70-
“urn:ietf:params:oauth:token-type:saml2”
71-
“urn:ietf:params:aws:token-type:aws4_request”
68+
“urn:ietf:params:oauth:token-type:jwt”
69+
“urn:ietf:params:oauth:token-type:id-token”
70+
“urn:ietf:params:oauth:token-type:saml2”
71+
“urn:ietf:params:aws:token-type:aws4_request”
7272
73-
audience (str): The requested audience for the subject token.
73+
audience (str): The requested audience for the subject token.
7474
"""
7575

7676
subject_token_type: str
@@ -81,7 +81,6 @@ class Credentials(
8181
credentials.Scoped,
8282
credentials.CredentialsWithQuotaProject,
8383
credentials.CredentialsWithTokenUri,
84-
credentials.CredentialsWithTrustBoundary,
8584
metaclass=abc.ABCMeta,
8685
):
8786
"""Base class for all external account credentials.
@@ -134,14 +133,14 @@ def __init__(
134133
authorization grant.
135134
default_scopes (Optional[Sequence[str]]): Default scopes passed by a
136135
Google client library. Use 'scopes' for user-defined scopes.
137-
workforce_pool_user_project (Optonal[str]): The optional workforce pool user
136+
workforce_pool_user_project (Optona[str]): The optional workforce pool user
138137
project number when the credential corresponds to a workforce pool and not
139138
a workload identity pool. The underlying principal must still have
140139
serviceusage.services.use IAM permission to use the project for
141140
billing/quota.
142141
universe_domain (str): The universe domain. The default universe
143142
domain is googleapis.com.
144-
trust_boundary (str): String representation of trust boundary metadata.
143+
trust_boundary (str): String representation of trust boundary meta.
145144
Raises:
146145
google.auth.exceptions.RefreshError: If the generateAccessToken
147146
endpoint returned an error.
@@ -168,9 +167,9 @@ def __init__(
168167
self._default_scopes = default_scopes
169168
self._workforce_pool_user_project = workforce_pool_user_project
170169
self._trust_boundary = {
171-
"locations": credentials.NO_OP_TRUST_BOUNDARY_LOCATIONS,
172-
"encodedLocations": credentials.NO_OP_TRUST_BOUNDARY_ENCODED_LOCATIONS,
173-
} # Sets a no-op trust boundary value.
170+
"locations": [],
171+
"encoded_locations": "0x0",
172+
} # expose a placeholder trust boundary value.
174173

175174
if self._client_id:
176175
self._client_auth = utils.ClientAuthentication(
@@ -457,12 +456,6 @@ def refresh(self, request):
457456

458457
self.expiry = now + lifetime
459458

460-
def _build_trust_boundary_lookup_url(self):
461-
"""Builds and returns the URL for the trust boundary lookup API.
462-
Will be implemented in a follow up PR.
463-
"""
464-
return
465-
466459
def _make_copy(self):
467460
kwargs = self._constructor_args()
468461
new_cred = self.__class__(**kwargs)

0 commit comments

Comments
 (0)