NS1 api returns a different message these days, which breaks error handling.
Until a fix is merged upstream, work around the issue by attempting to match the
stray error ourselves.
relates to #1667.
* ns1: enable autoDNSSEC capability
NS1's API has support for enabling or disabling DNSSEC on zones under
DNSSEC-enabled accounts.
This commit enables support for detecting a zone's DNSSEC state and,
given the autoDNSSEC setting, pushing the right domain corrections
to our corrections stack.
Fixes #1444
* ns1: better comments
* ns1: Handle a forgotten error
* ns1: style: spacing between functions
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
These entries are autoconfigured by NS1 when a zone is enabled for DNSSEC and can't be
modified via the API, producing a 405 API error on modification attempts.
While unmodifiable, these records are returned by the API, so we have to ignore them.
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
* ns1: add support for TLSA and NAPTR
Enable support for TLSA and NAPTR commands in NS1.
* ns1: use strconv.Itoa instead of sprintf
... with an intermediate casting from uint16 to int, which,
given it's an one-way conversion, it's safe enough.
* NS1: fix a couple linting issues
* ns1: fix multivalue CAA handling
Introducing better multivalue support for the CAA entry broke CAA support
for ns1, failing the relevant test.
Improve the code touching CAA in either side, so that it can handle
multivalue, quoted, CAA entries.
* ns1: use native CAA record parser for CAA
instead of using PopulateFromString.
* ns1: remove panics
Remove panics and bubble-up errors.
* ns1: in case of errors, return nil data
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>