-
Notifications
You must be signed in to change notification settings - Fork 332
feat: Add trust boundary support for external accounts. #1809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Add trust boundary support for external accounts. #1809
Conversation
|
||
def test_build_trust_boundary_lookup_url(self): | ||
credentials = self.make_credentials() | ||
expected_url = "https://iamcredentials.googleapis.com/v1/locations/global/workforcePools/POOL_ID/allowedLocations" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add few more cases:
- rep instead of global
- different universe
assert credentials._build_trust_boundary_lookup_url() == expected_url | ||
|
||
def test_build_trust_boundary_lookup_url_invalid_audience(self): | ||
credentials = self.make_credentials(audience="invalid") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add cases with real looking url but not have expected pattern
@@ -278,7 +278,7 @@ def _refresh_token(self, request): | |||
self._source_credentials.token_state == credentials.TokenState.STALE | |||
or self._source_credentials.token_state == credentials.TokenState.INVALID | |||
): | |||
self._source_credentials.refresh(request) | |||
self._source_credentials._refresh_token(request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to get the turst boundary locations for source cred? It will be the outer (impersonated) cred that will be adding the headers for the API calls.
Implements the trust boundary feature for external accounts (workforce and workload pool identity, and also authorized user)
Note: The design has changed since the first PR that implemented trust boundary for service accounts, and we are no longer required to send the allowed locations header to IAM or STS requests, only to the google API calls. You can review the most up to date design here: go/trust-boundaries-auth-sdk-v2