Skip to content
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

feat(auth): pass logger from auth layer to metadata package #11288

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

codyoss
Copy link
Member

@codyoss codyoss commented Dec 13, 2024

No description provided.

@codyoss codyoss requested a review from a team as a code owner December 13, 2024 18:33
@codyoss codyoss added the automerge Merge the pull request once unit tests and other checks pass. label Dec 13, 2024
Copy link
Member

@quartzmo quartzmo left a comment

Choose a reason for hiding this comment

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

LGTM, but there are other metadata requests in auth that could potentially be logged. Do these need TODOs?

auth/internal/internal.go:
  204  	defer cancel()
  205: 	return metadata.GetWithContext(ctx, "universe/universe-domain")
  206  }

auth/internal/transport/s2a.go:
  87  var httpGetMetadataMTLSConfig = func() (string, error) {
  88: 	return metadata.GetWithContext(context.Background(), configEndpointSuffix)
  89  }

auth/credentials/detect.go:
  101  			ProjectIDProvider: auth.CredentialsPropertyFunc(func(ctx context.Context) (string, error) {
  102: 				return metadata.ProjectIDWithContext(ctx)
  103  			}),

auth/credentials/idtoken/compute.go:
  46  		ProjectIDProvider: auth.CredentialsPropertyFunc(func(ctx context.Context) (string, error) {
  47: 			return metadata.ProjectIDWithContext(ctx)
  48  		}),

@codyoss
Copy link
Member Author

codyoss commented Dec 13, 2024

@quartzmo thanks for the callout. This ended up needing quite a few more change to plumb to those lower layers, but I think it is good now :)

@codyoss codyoss requested a review from quartzmo December 13, 2024 19:51
@gcf-merge-on-green gcf-merge-on-green bot merged commit b552efd into googleapis:main Dec 13, 2024
10 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Dec 13, 2024
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.

2 participants