From 618654db7c319788d66f1945ae876524d384f856 Mon Sep 17 00:00:00 2001 From: Joe Elliott Date: Wed, 24 Feb 2021 16:31:49 -0500 Subject: [PATCH] Fix GCS Auth Issues (#554) * list instead of attrs Signed-off-by: Joe Elliott * Added scope read/write Signed-off-by: Joe Elliott * Revert "list instead of attrs" This reverts commit 73a260c138ce722aaddf2e12eb234bdf2b93030c. * changelog Signed-off-by: Joe Elliott --- CHANGELOG.md | 1 + tempodb/backend/gcs/gcs.go | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78adc1a295d..bd2a23e6079 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## master / unreleased * [ENHANCEMENT] Add a Shutdown handler to flush data to backend, at "/shutdown". [#526](https://github.com/grafana/tempo/pull/526) +* [BUGFIX] Fixes permissions errors on startup in GCS. [#554](https://github.com/grafana/tempo/pull/554) ## v0.6.0 diff --git a/tempodb/backend/gcs/gcs.go b/tempodb/backend/gcs/gcs.go index 32871d53426..d990a0a08ae 100644 --- a/tempodb/backend/gcs/gcs.go +++ b/tempodb/backend/gcs/gcs.go @@ -34,8 +34,9 @@ func New(cfg *Config) (backend.Reader, backend.Writer, backend.Compactor, error) ctx := context.Background() customTransport := http.DefaultTransport.(*http.Transport).Clone() - - transportOptions := []option.ClientOption{} + transportOptions := []option.ClientOption{ + option.WithScopes(storage.ScopeReadWrite), + } if cfg.Insecure { transportOptions = append(transportOptions, option.WithoutAuthentication()) customTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}