Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the minimum permissions/role for a service account required to read/write to Google Container Registry?

I am trying to create a service role for a drone instance which builds and pushed a docker image to Google Container Registry.

It works with the role project>owner (presumably project>editor would work too). I have not been able to find a way to restrict it only to have permission to push to GCR, or find out what the minimal permissions are.

Service account roles

like image 662
Stan Bondi Avatar asked Sep 28 '16 08:09

Stan Bondi


People also ask

What are the roles required to read access for container registry?

You must grant the service account with IAM permissions to access the storage bucket used by Container Registry. The service account must have the cloud-platform scope. This scope grants permissions to push and pull images, as well as run gcloud commands.

Which of the below permissions are necessary in order to use the Google Cloud console?

The following page discusses the Identity and Access Management (IAM) permissions required to perform actions within the Cloud Storage portion of the Google Cloud console. IAM permissions are bundled together to make roles, and you grant roles to users and groups.

Which basic permissions allows you to change access permissions on resources in GCP?

Google Cloud offers Identity and Access Management (IAM), which lets you give more granular access to specific Google Cloud resources and prevents unwanted access to other resources. IAM lets you adopt the security principle of least privilege, so you grant only the necessary access to your resources.


1 Answers

There is no permission to only allow it to push to GCR. The minimum permission to allow push is "Storage Object Creator". And this permission also allows the user to write to Google Cloud Storage, as suggested by the role's name.

Update: The correct minimum permission (IAM role) to allow push is "Storage Admin" based on current implementation.

like image 57
Wei Avatar answered Sep 21 '22 20:09

Wei