Commit 7e3c9fcc by Konstantin Chukhlomin Committed by bergquist

Reduced OAuth scope to read_write

parent fcdf2820
...@@ -683,6 +683,8 @@ basic auth password ...@@ -683,6 +683,8 @@ basic auth password
Path to JSON key file associated with a Google service account to authenticate and authorize. Path to JSON key file associated with a Google service account to authenticate and authorize.
Service Account keys can be created and downloaded from https://console.developers.google.com/permissions/serviceaccounts. Service Account keys can be created and downloaded from https://console.developers.google.com/permissions/serviceaccounts.
Service Account should have "Storage Object Writer" role.
### bucket name ### bucket name
Bucket Name on Google Cloud Storage. Bucket Name on Google Cloud Storage.
......
...@@ -39,7 +39,7 @@ func (u *GCSUploader) Upload(imageDiskPath string) (string, error) { ...@@ -39,7 +39,7 @@ func (u *GCSUploader) Upload(imageDiskPath string) (string, error) {
log.Debug("Creating JWT conf") log.Debug("Creating JWT conf")
conf, err := google.JWTConfigFromJSON(data, "https://www.googleapis.com/auth/devstorage.full_control") conf, err := google.JWTConfigFromJSON(data, "https://www.googleapis.com/auth/devstorage.read_write")
if err != nil { if err != nil {
return "", err return "", err
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment