Skip to content

Try to simplify storage permissions #2007

Open
@spiffxp

Description

Followup based on #2005

For whatever reason, I am still confused by exactly which permissions are available to whom on which GCS buckets. I've started consulting a spreadsheet I put together to help figure out what makes sense from a policy perspective. I've been trying keep GCS IAM best practices in mind, as well as the guidance that basic roles aren't a great idea for production environments.

Three things currently bug me:

  1. whether uniform bucket-level access is enabled at bucket-creation time determines whether convenience roles like roles/viewer are granted storage.objects.get (ref: https://cloud.google.com/storage/docs/access-control/iam-roles#basic-roles-modifiable)
  2. there's no predefined role that grants storage.buckets.list on a per-bucket basis except roles/storage.admin
  3. some projects have buckets that are more sensitive than others (e.g. terraform resources for disparate privilege levels, logs containing PII), and it's unclear how to ensure basic roles are denied permissions to these buckets, while retaining admin/read privileges for other buckets

What I think we can do to address:

  1. Set constraints/storage.uniformBucketLevelAccess at the org level (ref: https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints). This wouldn't suddenly wipe out existing per-object ACLs. The only per-object ACLs I am currently aware of are related to billing data in kubernetes-public, and I'm optimistic they can be removed in favor of the bucket's IAM policy.
  2. research if this is feasible or worthwhile by creating a custom storage.bucketLister role and trying to apply it on a per-bucket basis (we do this today with secretmanager.secretLister)
  3. based on 1 and 2, determine if it makes sense to prune convenience bindings like projectOwner:roles/legacyBucketOwner, and replace with direct roles/storage.admin or a custom storage admin role that remove storage.buckets.delete

References:

Metadata

Assignees

No one assigned

    Labels

    area/accessDefine who has access to what via IAM bindings, role bindings, policy, etc.area/auditAudit of project resources, audit followup issues, code in audit/area/infraInfrastructure management, infrastructure design, code in infra/lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/awaiting-more-evidenceLowest priority. Possibly useful, but not yet enough support to actually get it done.sig/k8s-infraCategorizes an issue or PR as relevant to SIG K8s Infra.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions