From a4ef4792bc9b4058f1f5aba8fe89225ceed64a84 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Thu, 6 Sep 2018 10:30:55 +0200 Subject: [PATCH] Stackdriver: Add scope for google resource manager --- pkg/api/pluginproxy/ds_proxy.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/api/pluginproxy/ds_proxy.go b/pkg/api/pluginproxy/ds_proxy.go index ea3d103764e..aa115b266d2 100644 --- a/pkg/api/pluginproxy/ds_proxy.go +++ b/pkg/api/pluginproxy/ds_proxy.go @@ -425,7 +425,7 @@ func (proxy *DataSourceProxy) getJwtAccessToken(data templateData) (string, erro } conf.PrivateKey = []byte(interpolatedVal) } - conf.Scopes = []string{"https://www.googleapis.com/auth/monitoring.read"} + conf.Scopes = []string{"https://www.googleapis.com/auth/monitoring.read", "https://www.googleapis.com/auth/cloudplatformprojects.readonly"} conf.TokenURL = "https://oauth2.googleapis.com/token" ctx := context.Background() @@ -434,6 +434,7 @@ func (proxy *DataSourceProxy) getJwtAccessToken(data templateData) (string, erro if err != nil { return "", err } + logger.Info("interpolatedVal", "token.AccessToken", token.AccessToken) return token.AccessToken, nil }