Skip to content

Migrate googleclientauth extension to use credentials.DetectDefault #1099

@dashpole

Description

@dashpole

The client libraries seem to have migrated to a new method of getting default credentials. In particular, google.FindDefaultCredentials doesn't seem to support TPC.

We should use DetectDefault as described here: https://github.com/googleapis/google-cloud-go/blob/c639b283e99584f03ff3c9c6e7d64782980dcce9/README.md#authentication. It seems like we would just pass in the scopes we need.

But the auth.Credentials (https://pkg.go.dev/cloud.google.com/go/auth@v0.18.1#Credentials) we get back seems much hard to convert into per-RPC credentials. There is an implementation in the google client libraries: https://github.com/googleapis/google-cloud-go/blob/2103cc601bbd55f243a8507fefdd5574476eabe5/auth/grpctransport/grpctransport.go#L368, but it isn't exported.

We should use a feature gate when we make this change.

Metadata

Metadata

Assignees

No one assigned

    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