Skip to content

Commit

Permalink
fix: use correct OAuth2 scope for impersonation (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
enocom authored Jan 23, 2023
1 parent e9d46d7 commit af91431
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"golang.org/x/oauth2"
"google.golang.org/api/impersonate"
"google.golang.org/api/option"
"google.golang.org/api/sqladmin/v1"
)

// InstanceConnConfig holds the configuration for an individual instance
Expand Down Expand Up @@ -206,7 +205,7 @@ func credentialsOpt(c Config, l alloydb.Logger) (alloydbconn.Option, error) {
impersonate.CredentialsConfig{
TargetPrincipal: target,
Delegates: delegates,
Scopes: []string{sqladmin.SqlserviceAdminScope},
Scopes: []string{"https://www.googleapis.com/auth/cloud-platform"},
},
iopts...,
)
Expand Down

0 comments on commit af91431

Please sign in to comment.