-
Notifications
You must be signed in to change notification settings - Fork 346
Description
When a service account is used to impersonate another service account, the library currently performs a trust boundary lookup for the source credential. This is no longer necessary due to a recent design change and adds extra overhead to the authentication process.
Background:
The impersonated_credentials.Credentials object refreshes its source credential by calling self._source_credentials.refresh(request). This triggers the full refresh process on the source credential, including the trust boundary lookup. This behavior was originally intended, as the x-allowed-locations header (derived from the trust boundary) was required for requests to the IAM Credentials API. However, the design has since changed, and this header is no longer needed for IAM requests. As a result, the trust boundary lookup for the source credential is now redundant. This issue was not a bug in the original implementation but has become one due to the evolution of the design.