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>
* Add GetZoneRecords to DNSProvider interface
* dnscontrol now uses ufave/cli/v2
* NEW: get-zones.md
* HasRecordTypeName should be a method on models.Records not models.DomainConfig
* Implement BIND's GetZoneRecords
* new WriteZoneFile implemented
* go mod vendor
* Update docs to use get-zone instead of convertzone
* Add CanGetZone capability and update all providers.
* Get all zones for a provider at once (#626)
* implement GetZoneRecords for cloudflare
* munge cloudflare ttls
* Implement GetZoneRecords for cloudflare (#625)
Co-authored-by: Craig Peterson <192540+captncraig@users.noreply.github.com>
* Replaced errors.Wrap with fmt.Errorf (#589)
* Find: errors\.Wrap\(([^,]+),\s+(["`][^"`]*)(["`])\)
Replace: fmt.Errorf($2: %w$3, $1)
* Replaced errors.Wrapf with fmt.Errorf (#589)
* Find: errors\.Wrapf\(([^,]+),\s+(["`][^"`]*)(["`])\)
Replace: fmt.Errorf($2: %w$3, $1)
* Find: errors\.Wrapf\(([^,]+),\s+(["`][^"`]*)(["`])(,[^)]+)\)
* Replace: fmt.Errorf($2: %w$3$4, $1)
* Replaced errors.Errorf with fmt.Errorf (#589)
* Find: errors\.Errorf
Replace: fmt.Errorf
* Cleaned up remaining imports
* Cleanup
* Regenerate provider support matrix
This was broken by #533 ... and it's now the third time this has been missed.
* Switched to v2 go.mod
Also set GO111MODULE=on in build stuff to always use Go modules
even when in GOPATH.
* Ensure go.mod, go.sum, and vendor are up to date
* Attempt to fix Azure pipelines
* Add set -e to properly fail on exit (it didn't seem to be
propagating properly before).
* Set workingDirectory for GoFmt and GoGen (this might be why it
fails unlike compile and unitests).
* Another attempt to fix Azure Pipelines
* Use the Go env template for all go-related jobs.
* Completely fixed Azure Pipelines
* Added a display name to GoFmt for consistency.
* Fixed diffs for GoFmt and GoGen.
* Show git status for checks.
* Drop GOPATH for tests
TODO: Do the same for integration tests.
* Drop GOPATH for integration tests
* Show more diffs
* Regenerate provider support matrix
This wasn't done in #590...
* Replace RecordConfig.Name and .NameFQDN with getters and setters.
* Replace RecordConfig.Target with getters and setters.
* Eliminate the CombinedTarget concept.
* Add RecordConfig.PopulateFromString to reduce code in all providers.
* encode and decode name.com txt records (#315)
* Replace fmt.Errorf with errors.Errorf
* add ns1 libs to vendor
* Create shim and wire into tests
* ns1 provider more working.
* vendor correct files
* comment diff functions
* ns1 docs
* making mx work with ns1
* ?
* refactor tests to make capability blocks easier. fix up ns1