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>
* Enable support for CAA in ns1
NS1 rest already supports it, enable the capability and handle CAA.
* ns1: sort capabilities
more readable
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
A bug was introduced in a2042c2eda, which stoped ALIAS records
from setting their record type correctly (it was set to nil).
Specifically, case "ALIAS" doesn't fall through to any of the other cases
below, leading ALIAS records to set their type to nil.
To fix that, readd the code that got absorbed by the URLFWD in a2042c2eda.
TXT records are now handled different.
1. The raw input from dnsconfig.js is passed all the way to the provider. The provider can determine if it can or can't handle such records (auditrecords.go) and processes them internally as such.
2. The CanUseTXTMulti capability is no longer needed.
* DSPs now register a table of functions
* Use audits for txt record variations
* unit tests pass. integration fails.
* fix deepcopy problem
* rename to AuditRecordSupport
* Reduce use of TXTMulti
* Remove CanUseTXTMulti
* fix Test Skip
* fix DO
* fix vultr
* fix NDC
* msdns fixes
* Fix powerdns and cloudflare
* HEDNS: Fix usage of target field to resolve TXT handling (#1067)
* Fix HEXONET
Co-authored-by: Robert Blenkinsopp <robert@blenkinsopp.net>
Co-authored-by: Jakob Ackermann <das7pad@outlook.com>