Skip to content

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

@mark-adams

Description

@mark-adams

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.

Metadata

Metadata

Assignees

Labels

Status: CompletedNothing further to be done with this issue. Awaiting to be closed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions