Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat(transport): pass call credentials to grpc-go for DirectPath (#1297)
  • Loading branch information
mohanli-ml committed Dec 8, 2021
1 parent 3799960 commit c06faf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transport/grpc/dial.go
Expand Up @@ -142,7 +142,7 @@ func dial(ctx context.Context, insecure bool, o *internal.DialSettings) (*grpc.C
// Attempt Direct Path:
if o.EnableDirectPath && checkDirectPathEndPoint(endpoint) && isTokenSourceDirectPathCompatible(creds.TokenSource, o) && metadata.OnGCE() {
grpcOpts = []grpc.DialOption{
grpc.WithCredentialsBundle(grpcgoogle.NewComputeEngineCredentials())}
grpc.WithCredentialsBundle(grpcgoogle.NewDefaultCredentialsWithOptions(grpcgoogle.DefaultCredentialsOptions{oauth.TokenSource{creds.TokenSource}}))}
if timeoutDialerOption != nil {
grpcOpts = append(grpcOpts, timeoutDialerOption)
}
Expand Down

0 comments on commit c06faf5

Please sign in to comment.