Skip to content

Redundant trust boundary lookup for source credential during impersonation #1808

@nbayati

Description

@nbayati

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions