Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudsploit error when used with GCP user account and application_default_credentials.json #1844

Open
v3rl opened this issue Jan 9, 2024 · 0 comments

Comments

@v3rl
Copy link

v3rl commented Jan 9, 2024

Hi,
I ran Cloudsploit for a GCP project. The GCP project team provided me with GCP user account access rather than service account. I might not get a service account for the same.
As per my understanding Cloudsploit does not support running with GCP user account credentials. It can only be run using service account credential file.

Apart from checking the code , I verified by following below steps,

  1. Ran command "gcloud init" to use a new account
  2. Ran command "gcloud auth application-default login" to obtain application access credentials
    This creates application_default_credentials.json . I provided path of this file in the config_example.js file as below,
google: {
            // OPTION 1: If using a credential JSON file, enter the path below
            credential_file: '/home/username/.config/gcloud/application_default_credentials.json',
            // OPTION 2: If using hard-coded credentials, enter them below
            // project: process.env.GOOGLE_PROJECT_ID || 'my-project',
            // client_email: process.env.GOOGLE_CLIENT_EMAIL || '[email protected]',
            // private_key: process.env.GOOGLE_PRIVATE_KEY || '-----BEGIN PRIVATE KEY-----\nYOUR-PRIVATE-KEY-GOES-HERE\n-----END PRIVATE KEY-----\n'
        },

This did not work as expected and yielded below errors.

INFO: Skipping AWS pagination mode
INFO: Determining API calls to make...
INFO: Found 61 API calls to make for google plugins
INFO: Collecting metadata. This may take several minutes...
[ERROR] Unhandled error from Google API: Error: {}
[ERROR] Unhandled error from Google API: Error: {}
[ERROR] Unhandled error from Google API: Error: {}
[ERROR] Unhandled error from Google API: Error: {}
[ERROR] Unhandled error from Google API: Error: {}
[ERROR] Unhandled error from Google API: Error: {}

Is there any way I can run Cloudsploit with GCP user account?

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

No branches or pull requests

1 participant