Skip to content

Commit 3ce87dd

Browse files
authored
credentials/google: Add cloud-platform scope for ADC (#7887)
1 parent 3c0586a commit 3ce87dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

credentials/google/google.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import (
3030
"google.golang.org/grpc/internal"
3131
)
3232

33+
const defaultCloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
34+
3335
var logger = grpclog.Component("credentials")
3436

3537
// DefaultCredentialsOptions constructs options to build DefaultCredentials.
@@ -120,7 +122,7 @@ var (
120122
return alts.NewClientCreds(alts.DefaultClientOptions())
121123
}
122124
newADC = func(ctx context.Context) (credentials.PerRPCCredentials, error) {
123-
return oauth.NewApplicationDefault(ctx)
125+
return oauth.NewApplicationDefault(ctx, defaultCloudPlatformScope)
124126
}
125127
)
126128

0 commit comments

Comments
 (0)