docs(gcp): document required IAM permissions in GCP codebundle READMEs - #724
Open
theyashl wants to merge 1 commit into
Open
docs(gcp): document required IAM permissions in GCP codebundle READMEs#724theyashl wants to merge 1 commit into
theyashl wants to merge 1 commit into
Conversation
Scanned all GCP codebundles (those invoking gcloud/gsutil/bq) and documented the granular IAM permissions each one actually needs, plus suggested least-privilege predefined roles, in a consistent "Requirements" section. Covers 11 codebundles: curl-gmp-kong-ingress-inspection, curl-gmp-nginx-ingress-inspection, gcloud-log-inspection, gcp-bigquery-dataset-health, gcp-bucket-health, gcp-cloud-function-health, gcp-cloud-loadbalancer-health, gcp-project-cost-health, gcp-vertex-modelgarden-health, gke-cluster-health, k8s-ingress-gce-healthcheck. - Derived permissions by analyzing every gcloud/gsutil/bq call and REST endpoint - Added granular permissions + suggested roles (both) per README - Fixed misleading "logging API" notes on the GMP bundles (they use Monitoring) - Replaced vague "Viewer / Security Reviewer" guidance and removed the stale "TODO: update required GCP SA permissions" placeholders Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Scanned every GCP codebundle (those that actually invoke
gcloud/gsutil/bq) and documented the granular IAM permissions each one needs to run, along with suggested least-privilege predefined roles, in a consistent## Requirementssection of each README.Why
Permission requirements were inconsistent or missing across GCP codebundles: some had accurate granular lists (e.g.
gcp-cloud-function-health), others said only "Viewer / Security Reviewer", carried staleTODO: update required GCP SA permissionsplaceholders, or (for the GMP bundles) referenced the wrong API entirely. Operators setting up service accounts had no reliable per-bundle least-privilege reference.How
Each codebundle's scripts (
*.robot,*.sh,*.py) were analyzed to extract everygcloud/gsutil/bqcommand and REST endpoint, then mapped to the minimal IAM permission(s) and a covering predefined role.Codebundles updated (11)
curl-gmp-kong-ingress-inspectionmonitoring.viewercurl-gmp-nginx-ingress-inspectionmonitoring.viewer(+ kubeconfig RBAC)gcloud-log-inspectionlogging.viewergcp-bigquery-dataset-healthbigquery.metadataViewer,iam.securityReviewer,logging.viewergcp-bucket-healthiam.securityReviewer,storage.objectViewer,monitoring.viewer,serviceusage.serviceUsageViewergcp-cloud-function-healthcloudfunctions.viewer,run.viewer,cloudbuild.builds.viewer,logging.viewergcp-cloud-loadbalancer-healthcompute.viewer,monitoring.viewergcp-project-cost-healthbigquery.jobUser+bigquery.dataViewer,recommender.viewer,billing.viewer,compute.viewer,serviceusage.serviceUsageViewer,viewergcp-vertex-modelgarden-healthmonitoring.viewer,logging.privateLogViewer,serviceusage.serviceUsageConsumer,aiplatform.viewer(discovery)gke-cluster-healthcontainer.viewer,compute.viewer,recommender.viewer,iam.securityReviewer,browserk8s-ingress-gce-healthcheckcompute.viewer,logging.viewer(+ kubeconfig RBAC)Notable corrections
curl-gmp-*): the old note claimed the SA needs "GCP logging API" access — they actually query Cloud Monitoring (monitoring.timeSeries.list). Fixed.gcp-bucket-health: replaced vague "Viewer / Security Reviewer" and removed the staleTODO: Update required GCP SA permissions.gcp-bigquery-dataset-health: droppedbigquery.dataViewer— the bundle runs no queries (metadata-onlybq ls/bq show), sobigquery.metadataViewersuffices.gke-cluster-health: clarified that the write permissions insa_check.share permissions it audits on node-pool SAs, not permissions the runner SA needs.Notes:
access:read-onlythroughout — no write/mutate permissions are documented. Scope was limited to GCP per request; AWS/Azure/k8s codebundles are untouched.🤖 Generated with Claude Code