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

[ WIP ] Linode provider #20

Merged
merged 5 commits into from
Jun 28, 2021
Merged

[ WIP ] Linode provider #20

merged 5 commits into from
Jun 28, 2021

Conversation

parrasajad
Copy link
Contributor

Init Linode provider #17

@ehsandeep ehsandeep linked an issue Jun 16, 2021 that may be closed by this pull request
@0xtavian
Copy link

@parrasajad @ehsandeep

I tested this and couldnt get it working. Mac Big Sur 11.4. I downloaded the git zip here https://github.com/projectdiscovery/cloudlist/tree/feature/17-linode-provider. Navigated to /Downloads/cloudlist-feature-17-linode-provider/cmd/cloudlist and ran go build with go version go version go1.15.8 darwin/amd64.
I have one linode in my account. Changing my API key makes the request fail, so it does seem to authenticate to the API, but doesnt pull any results. I have full privileges on my API key.

./cloudlist -config config.yaml -v

   ________                _____      __ 
  / ____/ /___  __  ______/ / (_)____/ /_
 / /   / / __ \/ / / / __  / / / ___/ __/
/ /___/ / /_/ / /_/ / /_/ / / (__  ) /_  
\____/_/\____/\__,_/\__,_/_/_/____/\__/  v0.0.2-dev								  

		projectdiscovery.io

Use with caution. You are responsible for your actions
Developers assume no liability and are not responsible for any misuse or damage.
[WRN] Could not initialize provider scw none: scaleway-sdk-go: invalid access key format 'SCWXXXXXXXXXXXXXX', expected SCWXXXXXXXXXXXXXXXXX format
[WRN] Could not initialize provider aws staging: could not get list of regions: AuthFailure: AWS was not able to validate the provided access credentials
	status code: 401, request id: 939931b4-e1cc-4cb9-9f08-c9b596dd7e32
[WRN] Could not initialize provider gcp logs: could not create dns service with api key: invalid character 'x' looking for beginning of object key string
[INF] Listing assets from do (xxxx) provider
[WRN] Could not get resources for provider do xxxx: GET https://api.digitalocean.com/v2/droplets?per_page=200: 401 Unable to authenticate you
[INF] Listing assets from linode (prod) provider
[WRN] No results found for linode (prod)

This is my config file.

# Configuration file for cloudlist enumeration agent
- # provider is the name of the provider (Digitalocean)
  provider: do
  # profile is the name of the provider profile
  profile: xxxx
  # digitalocean_token is the API key for digitalocean cloud platform
  digitalocean_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

- # provider is the name of the provider (Scaleway)
  provider: scw
  # scaleway_access_key is the access key for scaleway API
  scaleway_access_key: SCWXXXXXXXXXXXXXX
  # scaleway_access_token is the access token for scaleway API
  scaleway_access_token: xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx

- # provider is the name of the provider (Amazon Web Services)
  provider: aws
  # profile is the name of the provider profile
  profile: staging
  # aws_access_key is the access key for AWS account
  aws_access_key: AKIAXXXXXXXXXXXXXX
  # aws_secret_key is the secret key for AWS account
  aws_secret_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

- # provider is the name of the provider (Google Cloud Platform)
  provider: gcp
  # profile is the name of the provider profile
  profile: logs
  # gcp_service_account_key is the minified json of a google cloud service account with list permissions
  gcp_service_account_key: '{xxxxxxxxxxxxx}'

- # provider is the name of the provider (linode)
  provider: linode
  # profile is the name of the provider profile
  profile: prod
  linode_personal_access_token: [redacted]

using the linode-cli (i've redacted the IP)

linode-cli linodes list --text
id	label	region	type	image	status	ipv4
27905611	ubuntu-us-central-001	us-central	g6-standard-2	linode/ubuntu20.04	running	[redacted]

@parrasajad
Copy link
Contributor Author

@0xtavian Latest commits should fix the issue. Thanks!

@0xtavian
Copy link

@parrasajad I can confirm its now working for Mac. Good job!

@parrasajad
Copy link
Contributor Author

@0xtavian Thank you for confirming.

Copy link
Member

@Ice3man543 Ice3man543 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@Ice3man543 Ice3man543 merged commit 9f52302 into dev Jun 28, 2021
@Ice3man543 Ice3man543 deleted the feature/17-linode-provider branch June 28, 2021 19:43
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.

[feature] Add Linode provider
3 participants