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

please add support for godaddy api /v2/customers/{customerId}/certificates #21

Closed
robdew opened this issue Jun 5, 2024 · 4 comments · May be fixed by #29
Closed

please add support for godaddy api /v2/customers/{customerId}/certificates #21

robdew opened this issue Jun 5, 2024 · 4 comments · May be fixed by #29
Assignees
Labels
enhancement New feature or request

Comments

@robdew
Copy link

robdew commented Jun 5, 2024

Is your feature request related to a problem? Please describe.
With the current tables you cannot list all certificates for a customer account. This might be because the plugin only supports v1 of the godaddy API? V2 of the API adds a new method to get all certificates for a given customerId

https://developer.godaddy.com/doc/endpoint/certificates#/

Describe the solution you'd like
I would like to use this plugin to get all the certificate details for all certificates, not just a particular certificateId

Describe alternatives you've considered
Hitting the API directly from Python instead of Steampipe.

Additional context
Add any other context or screenshots about the feature request here.
Screenshot 2024-06-05 at 4 03 12 PM

@robdew robdew added the enhancement New feature or request label Jun 5, 2024
@ParthaI ParthaI self-assigned this Jun 21, 2024
@ParthaI
Copy link
Contributor

ParthaI commented Aug 7, 2024

Hello @robdew,

Thank you for bringing this issue to our attention. I have updated the godaddy_certificate table to list out the certificates by customer ID and have pushed the changes to the issue-21 branch.

Unfortunately, I wasn't able to test it in our environment due to limited permissions.

If you could test it in the PR branch issue-21 and share your feedback, it would be greatly appreciated.

Steps to build the plugin from the branch issue-21:

Thanks!

@robdew
Copy link
Author

robdew commented Sep 4, 2024

I have been working on this but cannot make the latest release of the plugin work correctly either.

At this point the best I can offer is that this query:

select
  common_name,
  status,
  certificate_id,
  serial_number,
  created_at,
  valid_start,
  valid_end
from
  godaddy_certificate
where
  certificate_id = 'redacted';

Generates no results (that's not expected) with the latest release version of the plugin, but with the issue-2 release I get this additional error:

Error: godaddy: table 'godaddy_certificate' column 'contact' requires hydrate data from getCertificate but none is available.
 (SQLSTATE HV000)

@ParthaI
Copy link
Contributor

ParthaI commented Sep 16, 2024

Hello @robdew, apologies for the late response.

Were you able to query the table from the issue-21 branch by following the steps mentioned here?

In this PR, we added support for listing all certificates for a customer by specifying the customer_id in the WHERE clause (e.g., where customer_id = '295e3bc3-b3b9-4d95-aae5-ede41a994d13').

Regarding the error you mentioned, it does seem unusual. I’ve pushed another commit to the issue-21 branch that handles the not found error code. Could you please pull the latest changes and try running the following query again after rebuilding the code?

select
  common_name,
  status,
  certificate_id,
  serial_number,
  created_at,
  organization,
  root_type,
  valid_start,
  valid_end,
  revoked_at
from
  godaddy_certificate
where
  customer_id = '295e3bc3-b3b9-4d95-aae5-ede41a994d13'

@misraved
Copy link
Contributor

Hello @robdew,

We haven’t received a response in a while, so we’re going to close this issue for now. If this is still a concern or if you have additional details to share, please don’t hesitate to reopen the issue, and we’ll be happy to assist you further.

Thank you for your understanding, and we appreciate your contribution!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants