Skip to content

fix(lwpreflight): correct GCP and AWS required-permission lists - #1852

Open
lokesh-vadlamudi wants to merge 3 commits into
mainfrom
lvadlamudi/cad-2292-gcp-project-projects-list
Open

fix(lwpreflight): correct GCP and AWS required-permission lists#1852
lokesh-vadlamudi wants to merge 3 commits into
mainfrom
lvadlamudi/cad-2292-gcp-project-projects-list

Conversation

@lokesh-vadlamudi

@lokesh-vadlamudi lokesh-vadlamudi commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Three permission-list corrections, each one line of data. All share a shape: the required-permission list did not match what the operation actually needs, so onboarding or teardown failed with no way for the customer to satisfy it.

resourcemanager.projects.list removed from project-level GCP Config

Google marks this permission "Not applicable for project-level custom roles", so it cannot be granted there at all. CheckPermissions selects RequiredPermissions whenever orgID is empty, so every project-scope Config onboarding demanded it and died at Discovery with "Required permission missing", unsatisfiably.

It was a copy from the org list. Preflight never calls projects.list, the project-level terraform-gcp-config custom role does not use it, and it was the only project-level list carrying it. RequiredPermissionsForOrg keeps it, so org validation is unchanged.

CAD-2292

storage.objects.list added to GCP Agentless

Terraform force-destroys the Agentless scanning bucket, which enumerates the objects before deleting them. The lists granted storage.objects.delete without storage.objects.list, so destroy died partway with "Permission 'storage.objects.list' denied".

The partial destroy is what orphans resources: the Lacework integration is itself a Terraform-managed resource depending on the GCP ones, so it is torn down first and the account disappears from Cloud Accounts while the GCP resources survive.

The AWS Agentless lists already pair s3:ListBucket with s3:DeleteObject for this same path.

CAD-2294
CAD-2295

eks:ListClusters added to AWS EKS Audit Log

FetchEKSClusters calls eks:ListClusters once per region to enumerate the clusters to onboard. Neither EksAuditLog list required it, so preflight passed and Discovery then failed with a 403. The task is added only under params.EksAuditLog, so the permission belongs on these two lists alone.

CAD-2296

@lokesh-vadlamudi
lokesh-vadlamudi force-pushed the lvadlamudi/cad-2292-gcp-project-projects-list branch from 79915ec to 85d40db Compare August 12, 2026 22:37
@lokesh-vadlamudi lokesh-vadlamudi changed the title fix(lwpreflight): drop org-only projects.list from GCP project permissions fix(lwpreflight): drop projects.list from GCP project perms Aug 12, 2026
GCP marks resourcemanager.projects.list as "Not applicable for
project-level custom roles", so a customer onboarding a project-level GCP
Configuration integration cannot grant it. Discovery required it anyway
and failed with "Required permission missing", leaving no way forward.

The permission was only ever needed at org scope, where it is already
listed in RequiredPermissionsForOrg. Preflight itself never calls
projects.list, and the project-level terraform-gcp-config custom role
does not use it either.

CAD-2292
@lokesh-vadlamudi
lokesh-vadlamudi force-pushed the lvadlamudi/cad-2292-gcp-project-projects-list branch from 85d40db to e77a6af Compare August 13, 2026 00:20
Terraform force-destroys the Agentless scanning bucket, which enumerates
the objects before deleting them. The Agentless permission lists granted
storage.objects.delete but not storage.objects.list, so the destroy died
partway through with "Permission 'storage.objects.list' denied".

That partial destroy is what orphans resources: the Lacework integration
is itself a Terraform-managed resource that depends on the GCP ones, so
it is destroyed first and the account disappears from Cloud Accounts
while the GCP resources it was meant to clean up survive.

The AWS Agentless lists already pair s3:ListBucket with s3:DeleteObject
for this same force-destroy path. GCP was missing the equivalent.

CAD-2294
CAD-2295
FetchEKSClusters calls eks:ListClusters once per region to enumerate the
clusters to onboard, but neither EksAuditLog permission list required it,
so preflight passed and Discovery then failed with a 403.

CAD-2296
@lokesh-vadlamudi lokesh-vadlamudi changed the title fix(lwpreflight): drop projects.list from GCP project perms fix(lwpreflight): correct GCP and AWS required-permission lists Aug 13, 2026
@lokesh-vadlamudi lokesh-vadlamudi self-assigned this Aug 13, 2026
@lokesh-vadlamudi
lokesh-vadlamudi marked this pull request as ready for review August 13, 2026 00:51
@lokesh-vadlamudi
lokesh-vadlamudi requested a review from a team as a code owner August 13, 2026 00:51
@lokesh-vadlamudi
lokesh-vadlamudi enabled auto-merge (squash) August 13, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant