Commit graph

68 commits

Author SHA1 Message Date
Tom Limoncelli cbccbbeb8d
REFACTOR: Opinion: TXT records are one long string (#2631)
Co-authored-by: Costas Drogos <costas.drogos@gmail.com>
Co-authored-by: imlonghao <git@imlonghao.com>
Co-authored-by: Jeffrey Cafferata <jeffrey@jcid.nl>
Co-authored-by: Vincent Hagen <blackshadev@users.noreply.github.com>
2023-12-04 17:45:25 -05:00
Tom Limoncelli 159fdf07ad
REFACTOR: providers should not directly access .TxtStrings (#2629) 2023-11-18 15:06:20 -05:00
Tom Limoncelli c91fe6c1c8
CHORE: Remove diff1 from codebase (#2575) 2023-10-22 13:56:13 -04:00
Tom Limoncelli c01fb2d40b
Update Deps, fix staticcheck and golint warnings (#2558) 2023-09-15 15:30:55 -04:00
Tom Limoncelli ec0585cb29
CHORE: Fix CF and NS1 due to api changes (#2520) 2023-08-18 08:25:36 -04:00
Alexander Kabenin f13ae54858
Implementing API retries when receiving 429 (TooManyRequests) HTTP Error (#2506)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-08-17 11:37:36 -04:00
Costas Drogos 3c33ee2212
NS1: update ns1-go to 2.7.8 (#2516)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-08-17 11:19:16 -04:00
nemunaire 5ae231030e
Update version in go.mod (#2382) 2023-05-20 13:21:45 -04:00
Tom Limoncelli fede846b12
NS1: revert #2295 (nameserver "trailing dot" issue) (#2327) 2023-05-06 11:46:07 -04:00
Tom Limoncelli 489be2e3dc
ROUTE53: fix R53_ZONE() handling for domains (#2306)
Co-authored-by: Tom Limoncelli <tal@whatexit.org>
2023-05-02 13:04:59 -04:00
Tom Limoncelli 18b8ce791a
NS1: Improve nameserver handling (#2295)
Co-authored-by: Tom Limoncelli <tal@whatexit.org>
2023-05-01 18:44:25 -04:00
Florent Thoumie a0d491e6ce
NS1: Fix NS1_URLFWD records push (#2298) 2023-04-26 08:20:14 -05:00
Florent Thoumie bede608637
Fix NS1_URLFWD custom record type handling (#2289) 2023-04-17 18:21:26 -04:00
Tom Limoncelli 60470a3886
BUG: Some DNS zones are downloaded twice (#2120)
Signed-off-by: Amelia Aronsohn <squirrel@wearing.black>
Co-authored-by: Tom Limoncelli <tal@whatexit.org>
Co-authored-by: Grégoire Henry <hnrgrgr@users.noreply.github.com>
Co-authored-by: Amelia Aronsohn <squirrel@wearing.black>
Co-authored-by: Kai Schwarz <kschwarz@hexonet.net>
Co-authored-by: Asif Nawaz <asif.nawaz@centralnic.com>
Co-authored-by: imlonghao <git@imlonghao.com>
Co-authored-by: Will Power <1619102+willpower232@users.noreply.github.com>
2023-04-14 15:22:23 -04:00
Costas Drogos f25d5fa46a
NS1: Handle assigned nameservers better (#2260) 2023-04-04 07:50:05 -04:00
Norman b01453eb16
NSONE: strip dots from nameservers (#2217)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-03-23 04:54:18 -07:00
Tom Limoncelli 367c83a3f5
LOC: Refine which providers support it (#2185) 2023-03-16 19:59:44 -04:00
Paul Dee 3b6591fd95
NEW FEATURE: Support DNS LOC record type (#2174) 2023-03-16 14:04:20 -04:00
Yannik Sembritzki 5e06c249d6
Rename DomainCreator to the more accurate ZoneCreator (#2038)
Co-authored-by: Yannik Sembritzki <yannik@sembritzki.org>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-02-07 07:22:49 -05:00
Tom Limoncelli de202531cb
NEW FEATURE: NO_PURGE reports what is not purged (diff2 only) (#2031) 2023-02-01 07:27:00 -05:00
Costas Drogos 7ed849d10d
NS1: Improve NS1_URLFWD handling (#2015) 2023-01-29 22:01:41 -05:00
Costas Drogos 7654107614
NS1: Add support for diff2 (#1858)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-12-19 14:57:48 -05:00
Costas Drogos 7ad98a67f9
NS2: Update ns1 to 2.7.2 (#1857) 2022-12-18 06:09:53 -08:00
Tom Limoncelli b0f2945510
REFACTOR: Add diff2 enable flag to all DNS providers (#1851)
This should enable the diff2 code to be inserted with good "git blame" results for new code.  I'm adding this early to catch any problems early.
2022-12-11 15:02:58 -05:00
Tom Limoncelli 1010138fb6 gofmt -s -w 2022-08-14 20:49:57 -04:00
Tom Limoncelli ccb582b278
CHORE: Linting (#1704)
* Remove deprecated io/ioutil
* fixup!
* staticcheck and linting
* revert models/provider.go
* Fix imports to new style
* linting
2022-08-14 20:46:56 -04:00
Tom Limoncelli 31723ad146
PERFORMANCE: Refactor auditrecords.go to loop only once #1570 (#1658)
* stash

* Use rejectif idea

* rename

* wip!

* Convert old systems to new

* fixup!

* fix typo
2022-08-11 17:24:47 -04:00
Costas Drogos dbfd2b7cb4
ns1: workaround an issue with ns1 API (#1671)
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.
2022-08-09 16:29:54 -04:00
Jan-Philipp Benecke ba2c7f9c0e
MAINT: Enforcing formatted code (#1544)
* Enforcing formatted code

Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>

* Show lines

Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>

* Run check after deps are installed

Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>
2022-06-18 08:56:04 -04:00
Costas Drogos 2b40f6fa70
ns1: enable autoDNSSEC capability (#1450)
* 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>
2022-03-11 10:12:45 -05:00
Costas Drogos e300a8e9ca
NS1: Enable DS & DSForChildren support (#1446)
Enable support for DS and DSForChildren sets of records in NS1.

Fixes #1445
2022-03-07 11:31:55 -05:00
Costas Drogos b8a70d7556
ns1: ignore DNSKEY & RRSIG entries (#1443)
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>
2022-03-07 10:43:48 -05:00
Tom Limoncelli 444b893e1b
MAINT: Sort various lists (#1433)
* maint: sort lists in build/generate/featureMatrix.go

* maint: sort lists in docs/byo-secrets.md

* maint: sort lists in models/record.go

* maint: sort lists in pkg/normalize/validate.go

* maint: sort lists in providers/activedir/activedirProvider.go

* maint: sort lists in providers/akamaiedgedns/akamaiEdgeDnsProvider.go

* maint: sort lists in providers/axfrddns/axfrddnsProvider.go

* maint: sort lists in providers/azuredns/azureDnsProvider.go

* maint: sort lists in providers/cloudflare/cloudflareProvider.go

* maint: sort lists in providers/cloudns/cloudnsProvider.go

* maint: sort lists in providers/desec/desecProvider.go

* maint: sort lists in providers/digitalocean/digitaloceanProvider.go

* maint: sort lists in providers/dnsimple/dnsimpleProvider.go

* maint: sort lists in providers/dnsmadeeasy/dnsMadeEasyProvider.go

* maint: sort lists in providers/exoscale/exoscaleProvider.go

* maint: sort lists in providers/gandiv5/gandi_v5Provider.go

* maint: sort lists in providers/hedns/hednsProvider.go

* maint: sort lists in providers/hetzner/hetznerProvider.go

* maint: sort lists in providers/hexonet/hexonetProvider.go

* maint: sort lists in providers/inwx/inwxProvider.go

* maint: sort lists in providers/linode/linodeProvider.go

* maint: sort lists in providers/namecheap/namecheapProvider.go

* maint: sort lists in providers/namedotcom/namedotcomProvider.go

* maint: sort lists in providers/netcup/netcupProvider.go

* maint: sort lists in providers/ns1/ns1Provider.go

* maint: sort lists in providers/octodns/octodnsProvider.go

* maint: sort lists in providers/oracle/oracleProvider.go

* maint: sort lists in providers/ovh/ovhProvider.go

* maint: sort lists in providers/packetframe/packetframeProvider.go

* maint: sort lists in providers/powerdns/powerdnsProvider.go

* maint: sort lists in providers/route53/route53Provider.go

* maint: sort lists in providers/vultr/vultrProvider.go

* Update go:build pragmas for windows

* More sorting

* go generate
2022-03-02 11:19:15 -05:00
Tom Limoncelli 886dbf6d00
MAINT: Make staticcheck more strict and fix new warnings (#1408)
* Make staticcheck more strict and fix new warnings
2022-02-11 14:30:45 -05:00
Tom Limoncelli f9c4887d95 Revert "Make staticcheck more strict and fix new warnings"
This reverts commit 5c456e2513.
2022-02-11 12:14:24 -05:00
Tom Limoncelli a70354775e Make staticcheck more strict and fix new warnings 2022-02-11 12:14:22 -05:00
Costas Drogos d01a3cb8f6
ns1: add support for NAPTR (#1405)
* 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
2022-02-11 12:05:32 -05:00
Costas Drogos df7553aa62
ns1: fix multivalue CAA handling (#1404)
* 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>
2022-02-10 14:22:59 -05:00
Norman 263c6b7290
NS1: Enable get-zones (#1373)
Refactor code to get zones from NS1 API into GetZonesRecords function to
enable get-zones
2022-01-19 13:58:21 -05:00
Tom Limoncelli d4956c225c
NS1: Rename ns1provider.go to ns1Provider.go (#1350) 2021-12-26 13:11:59 -05:00
Costas Drogos ce9005c7a8
ns1: Implement EnsureDomainExists (#1157)
API support is there, let's use it.

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2021-05-14 14:39:09 -04:00
Costas Drogos 9497a988ea
Enable support for CAA in ns1 (#1150)
* 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>
2021-05-11 16:35:28 -04:00
Costas Drogos d8146a4a19
NS1: fix ALIAS handling (#1154)
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.
2021-05-11 15:52:27 -04:00
Tom Limoncelli 8d139d182f
gofmt all (#1144) 2021-05-04 14:15:31 -04:00
Tom Limoncelli e69e6f27e4
Linting (#1087)
* fix linting
* rename AuditRecordsor to RecordAuditor
* gandi_v5 to gandiv5
2021-03-08 20:14:30 -05:00
Tom Limoncelli 8dea9edc34
Re-engineer TXT records for simplicity and better compliance (#1063)
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>
2021-03-07 13:19:22 -05:00
Tom Limoncelli a2042c2eda
NS1: Support NS1_URLFWD (#1046) 2021-02-10 11:57:15 -05:00
Mike Cochrane 59747a96f0
Cleanup: Bubble errors up from diff instead of panic (#799) (#817) 2020-08-20 15:49:00 -04:00
Max Ratmeyer 644ba70e87
Fixed MX records on NS1 (#783) 2020-07-14 08:33:21 -04:00
Max Ratmeyer f12cd58d1f
NS1: Revert enabling TXTMulti (#782)
Co-authored-by: Max Ratmeyer <maxratmeyer@Maxs-MacBook-Pro.local>
2020-07-10 07:08:03 -04:00