-
Notifications
You must be signed in to change notification settings - Fork 827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
infra/gcp/main: give tf bucket owners buckets.list #2005
Conversation
So apparently the only off-the-shelf roles that grant `storage.buckets.list` are: - `roles/storage.admin` - `roles/owner` - `roles/editor` - `roles/viewer` We're trying to follow the principle of least-privilege for the `k8s-infra-tf-*` buckets. Unfortunately none of the basic roles like `roles/viewer` can be applied directly to a bucket. This leaves us with either: - `roles/viewer` on the project hosting the buckets - `roles/storage.admin` directly on the buckets The latter would grant the following addition permissions compared to the existing set of `roles/storage.legacyBucketOwner` + `roles/storage.objectAdmin`: - `storage.buckets.create` - doesn't matter for a single bucket - `storage.buckets.delete` - this might be concerning for some buckets - `storage.buckets.list` - this is what we want The reason delete might be concerning is if someone accidentally deleted a very public, very hardcoded bucket (e.g. the k8s.gcr.io GCS buckets) just long enough for another project to create a bucket with the now-available name, thus stealing ownership of a very critical asset. ref: https://cloud.google.com/storage/docs/naming-buckets#considerations So as much as I would like to default to `roles/storage.admin` on specific buckets instead of a combination of legacy roles on buckets and projects, I'm not yet prepared to make that call for all of our GCS buckets. Thus, we're left with assigning `roles/viewer` on the project hosting the bucket.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: spiffxp The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @ameukam |
Opened #2007 as followup to research if there's a better alternative |
/lgtm |
/hold cancel |
This addresses #1974 (comment)
So apparently the only off-the-shelf roles that grant
storage.buckets.list
are:roles/storage.admin
roles/owner
roles/editor
roles/viewer
We're trying to follow the principle of least-privilege for the
k8s-infra-tf-*
buckets. Unfortunately none of the basic roles likeroles/viewer
can be applied directly to a bucket.This leaves us with either:
roles/viewer
on the project hosting the bucketsroles/storage.admin
directly on the bucketsThe latter would grant the following addition permissions compared to the existing set of
roles/storage.legacyBucketOwner
+roles/storage.objectAdmin
:storage.buckets.create
- doesn't matter for a single bucketstorage.buckets.delete
- this might be concerning for some bucketsstorage.buckets.list
- this is what we wantThe reason delete might be concerning is if someone accidentally deleted a very public, very hardcoded bucket (e.g. the k8s.gcr.io GCS buckets) just long enough for another project to create a bucket with the now-available name, thus stealing ownership of a very critical asset. (ref: https://cloud.google.com/storage/docs/naming-buckets#considerations)
So as much as I would like to default to
roles/storage.admin
on specific buckets instead of a combination of legacy roles on buckets and projects, I'm not yet prepared to make that call for all of our GCS buckets.Thus, we're left with assigning
roles/viewer
on the project hosting the bucket.