Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What scopes / roles are required for a service account to be able to submit container builder jobs?

When creating a new service account to handle Container Builder jobs, the jobs fail with the following error despite the service account having Cloud Container Builder , Logs Viewer and Private Logs viewer:

ERROR: (gcloud.container.builds.submit) HTTPError 403:
<?xml version='1.0' encoding='UTF-8'?>
<Error>
  <Code>AccessDenied</Code>
  <Message>Access denied.</Message>
  <Details>[email protected] does not have storage.objects.get access to object redacted.cloudbuild-logs.googleusercontent.com/log-20117c17-f2b4-4159-9883-104ddd7bb232.txt.
  </Details>
</Error>

I understand the error points to storage.objects.get permissions over a file on cloud storage, but this is not a bucket we can set acl for is it ?

like image 653
maciekrb Avatar asked Aug 10 '17 00:08

maciekrb


1 Answers

Here is the quote from David Bendory (Tech Lead for the Google Cloud Container Builder) from this thread:

GCS permissions predate IAM and thus work a little differently. To view the logs, the Service Account in question needs to be a Viewer on the project in addition to have the Builder Editor role.

like image 106
wheleph Avatar answered Nov 12 '22 04:11

wheleph