cloudlist icon indicating copy to clipboard operation
cloudlist copied to clipboard

[feature] Allow the GCP provider to use application default credentials (ADC)

Open mark-adams opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. In many cases when running cloudlist, I'm either already authenticated locally with GCP via gcloud or I'm running on a resource that has application default credentials configured (i.e. a GCE virtual machine with a service account that has the appropriate permissions attached).

If I run cloudlist with the following provider config:

- provider: gcp 
  id: gcp
  
  # No GCP service account key set
  # gcp_service_account_key: '{xxxxxxxxxxxxx}'

I receive the following output:


  _______             _____     __ 
 / ___/ /__  __ _____/ / (_)__ / /_
/ /__/ / _ \/ // / _  / / (_-</ __/
\___/_/\___/\_,_/\_,_/_/_/___/\__/ 

                projectdiscovery.io

[INF] Current cloudlist version 1.0.8 (latest)
[FTL] Could not create inventory: could not create provider gcp: [:RUNTIME] could not get API Key
exit status 1

Describe the solution you'd like Instead of requiring gcp_service_account_key to be set, cloudlist should fall back on application default credentials.

mark-adams avatar Jun 21 '24 19:06 mark-adams