-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add table rdap_domain (#36) #46
Conversation
Co-authored-by: ParthaI <47887552+ParthaI@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ParthaI Please see comment, thanks!
whois/table_rdap_domain.go
Outdated
{Name: "domain_id", Type: proto.ColumnType_STRING, Transform: transform.FromField("Handle").NullIfZero(), Description: "Unique identifier for the domain."}, | ||
{Name: "object_class_name", Type: proto.ColumnType_STRING, Description: "String 'domain' representing the object type in RDAP."}, | ||
{Name: "ldh_name", Type: proto.ColumnType_STRING, Description: "Textual representation of DNS names.", Transform: transform.FromField("LDHName")}, | ||
{Name: "port43", Type: proto.ColumnType_STRING, Description: "Hostname of Registry WHOIS server."}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description seems a bit strange based on the column name, do you have an example of the data we get back from the SDK for this field/column?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbruno10, I queried this table to retrieve the 'port43' value by using multiple domain names. However, in all cases, we received null or empty data.
I found the description mentioned in the document, so I included it here.
> select domain, port43 from rdap_domain where domain = 'example.com'
+-------------+--------+
| domain | port43 |
+-------------+--------+
| example.com | |
+-------------+--------+
Time: 3.2s. Rows fetched: 1. Hydrate calls: 0.
> select domain, port43 from rdap_domain where domain = 'google.org'
+------------+--------+
| domain | port43 |
+------------+--------+
| google.org | |
+------------+--------+
Time: 4.5s. Rows fetched: 1. Hydrate calls: 0.
> select domain, port43 from rdap_domain where domain = 'microsoft.info'
+----------------+--------+
| domain | port43 |
+----------------+--------+
| microsoft.info | |
+----------------+--------+
Time: 2.2s. Rows fetched: 1. Hydrate calls: 0.
> select domain, port43 from rdap_domain where domain = 'whitehouse.gov'
+--------+--------+
| domain | port43 |
+--------+--------+
+--------+--------+
Time: 354ms.
> select domain, port43 from rdap_domain where domain = 'amazon.in'
+--------+--------+
| domain | port43 |
+--------+--------+
+--------+--------+
Time: 399ms.
> select domain, port43 from rdap_domain where domain = 'amazon.com'
+------------+--------+
| domain | port43 |
+------------+--------+
| amazon.com | |
+------------+--------+
Time: 1.2s. Rows fetched: 1. Hydrate calls: 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ParthaI Please see comments, thanks!
whois/table_rdap_domain.go
Outdated
// Top columns | ||
{Name: "domain", Type: proto.ColumnType_STRING, Transform: transform.FromQual("domain"), Description: "Domain name the RDAP information relates to."}, | ||
|
||
{Name: "domain_id", Type: proto.ColumnType_STRING, Transform: transform.FromField("Handle").NullIfZero(), Description: "Unique identifier for the domain."}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the column be called handle
, if the field name is Handle
? Is there a reason you chose domain_id
instead? Also, where does the description come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbruno10, I've renamed the column domain_id to handle to ensure consistency with the API response. For most column descriptions, I referred to this documentation. For those not covered in the documentation, I searched online and selected descriptions that best matched the data contained in each column.
https://datatracker.ietf.org/doc/html/rfc7483.html#section-5.1
https://datatracker.ietf.org/doc/html/rfc7483#section-5.3
docs/tables/rdap_domain.md
Outdated
@@ -0,0 +1,194 @@ | |||
# Table: rdap_domain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ParthaI Can you please update this table doc so it matches our latest doc format (if it doesn't already)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbruno10, I have updated the doc to match our latest doc format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ParthaI Please see review comments, thanks!
docs/tables/rdap_domain.md
Outdated
@@ -0,0 +1,374 @@ | |||
--- | |||
title: "Steampipe Table: rdap_domain - Query Whois Domains using SQL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: "Steampipe Table: rdap_domain - Query Whois Domains using SQL" | |
title: "Steampipe Table: rdap_domain - Query RDAP Domains using SQL" |
docs/tables/rdap_domain.md
Outdated
|
||
## Examples | ||
|
||
### Basic whois info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Basic whois info | |
### Basic RDAP info |
@@ -13,6 +13,7 @@ func Plugin(ctx context.Context) *plugin.Plugin { | |||
DefaultTransform: transform.FromGo().NullIfZero(), | |||
TableMap: map[string]*plugin.Table{ | |||
"whois_domain": tableWhoisDomain(ctx), | |||
"rdap_domain": tableRdapDomain(ctx), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move above so we keep alphabetical order
… tables in alphabetical order
Example query results
Results