cloudflare / cloudflare-go

The official Go library for the Cloudflare API
https://developers.cloudflare.com/api
BSD 3-Clause "New" or "Revised" License
1.44k stars 566 forks source link

Create SSHFP records with flarectl? #1245

Closed adamshand closed 1 year ago

adamshand commented 1 year ago

Current cloudflare-go version

Using latest version from Homebrew

Description

I'm writing a tool to automatically update SSHFP records based on the information from ssh-keyscan. Either this isn't possible or I'm using the tool incorrectly:

❯ flarectl zone info xampl.nz
                 ID                |   ZONE   |     PLAN     | STATUS |          NAME SERVERS          | PAUSED | TYPE
-----------------------------------+----------+--------------+--------+--------------------------------+--------+-------
  81efb4cba765ac03ad2c62af836ff207 | xampl.nz | Free Website | active | xxx.ns.cloudflare.com,        | false  | full
                                   |          |              |        | yyy.ns.cloudflare.com         |        |

> flarectl dns create --zone xampl.nz --name mahoe -type SSHFP --content "4 1 8f5984bc3111ad935b5c5c717a38d96878ef4a3f"
Error creating DNS record:  DNS Validation Error (1004)

> flarectl dns create --zone xampl.nz --name blah -type SSHFP --content "{ 'algorithm': 4, 'type': 1, 'fingerprint': '8f5984bc3111ad935b5c5c717a38d96878ef4a3f'}"
Error creating DNS record:  DNS Validation Error (1004)

Use cases

Automation for adding server SSH keys as SSHFP records to Cloudflare.

Potential cloudflare-go usage

Not sure, sorry.

References

No response

jacobbednarz commented 1 year ago

we don't support it at the moment, sorry. flarectl is also in maintenance only mode at this point while we work out what the next generation of our SDKs look like. configuration like this should be automatically included in that so i'm closing this off since we won't be taking any action here.