GoogleCloudPlatform / gcpdiag

gcpdiag is a command-line diagnostics tool for GCP customers.
https://gcpdiag.dev/
Apache License 2.0
288 stars 67 forks source link

Even so, uniform bucket-level access is recommended. #47

Closed erina-nakajima closed 1 year ago

erina-nakajima commented 2 years ago

gcpdiag lint execution results are not as intended. It is recommended that uniform bucket-level access be used, even if the bucket configuration uses uniform bucket-level access.

Execution result of gcpdiag lint

🔎  gcs/BP/2022_001: Buckets are using uniform access
   - BUCKET_NAME                               [FAIL]
     it is recommend to use uniform access on your bucket

   Google recommends using uniform access for a Cloud Storage bucket IAM policy
   https://cloud.google.com/storage/docs/access-
   control#choose_between_uniform_and_fine-grained_access

   https://gcpdiag.dev/rules/gcs/BP/2022_001

Commands to check settings and output results

gsutil uniformbucketlevelaccess get gs://BUCKET_NAME

Uniform bucket-level access setting for gs://BUCKET_NAME:
  Enabled: True
  LockedTime: 2023-01-01 03:04:30.427000+00:00
kaushik853 commented 1 year ago

I think the solution is to just remove the empty dictionary from the is_unform_access function. If you guys agree, i can create a pull request.

schweikert commented 1 year ago

Fixed in #69