Skip to content

Conversation

@psx95
Copy link
Contributor

@psx95 psx95 commented Apr 21, 2025

Description:
Updates the internal implementation such that the required headers are retrieved from the Google Auth Library instead of manually constructing and passing them.

Also fixes flaky unit tests which were affected because of external environment variables.

Testing:

  • Update the unit tests.
  • Manually tested token refresh with long running sample application (~2 hr) for both user credentials & service account credentials.

Outstanding items:

  • Efficient mocking of environment variables in the unit & smoke tests.
  • Adding a smoke test for service account credentials.

@github-actions github-actions bot requested a review from jsuereth April 21, 2025 21:00
@psx95 psx95 changed the title Update header injections Gcp Auth Extension: update header injection implementation Apr 21, 2025
@psx95 psx95 changed the title Gcp Auth Extension: update header injection implementation GCP Auth: update header injection implementation Apr 21, 2025
@psx95 psx95 marked this pull request as ready for review April 22, 2025 03:34
@psx95 psx95 requested a review from a team April 22, 2025 03:34
Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Is there a test case verifying that no quota project is sent when using a service account from metadata server?

@psx95
Copy link
Contributor Author

psx95 commented Apr 22, 2025

LGTM. Is there a test case verifying that no quota project is sent when using a service account from metadata server?

The behavior being tested is - if quota project header is not present in the metadata server, then it is not expected to be in the export headers.

The auth extension is agnostic to the specific sub-type of GoogleCredentials.

@trask trask added this pull request to the merge queue Apr 23, 2025
Merged via the queue into open-telemetry:main with commit c253efa Apr 23, 2025
18 checks passed
@psx95 psx95 deleted the update-header-injections branch April 24, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants