Commit graph

203 commits

Author SHA1 Message Date
Tom Limoncelli e3dc604247
AZURE_DNS: Convert to use diff2 natively (#2058) 2023-02-07 16:53:49 -05:00
Tom Limoncelli 325c8868ab
TESTING: Add test for TTL change (#2062) 2023-02-07 14:55:01 -05:00
Tom Limoncelli 9eacd42b63
BUG: Integration test flag -end 0 doesnt stop at 0 (#2059) 2023-02-07 08:07:37 -05:00
Tom Limoncelli e1ce6ff34f
CLOUDFLARE: Adopt diff2 (#2040) 2023-02-01 16:18:01 -05:00
Tom Limoncelli d8d25bf608
ROUTE53: Rewrite to use diff2 (#2012) 2023-01-31 10:12:26 -05:00
Costas Drogos 7ed849d10d
NS1: Improve NS1_URLFWD handling (#2015) 2023-01-29 22:01:41 -05:00
Jeffrey Cafferata f9be836e31
DOCS: Split out debugging / integration Tests (#2007) 2023-01-28 11:07:32 -05:00
Tom Limoncelli 572f2ce28c
NETCUP: Adopt diff2 in compatibility mode (#1895) 2023-01-18 12:34:45 -05:00
Tom Limoncelli 9bb38c4526
CHORE: Remove references to TXTMulti (#1953) 2023-01-18 11:45:36 -05:00
Jeffrey Cafferata 481137d964
OCTODNS: Remove OctoDNS provider (#1921)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-01-09 08:54:02 -05:00
Tom Limoncelli 397ce107e5
REFACTOR: Add a backwards compatible interface to diff2 (#1870) 2022-12-30 21:53:50 -05: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
Amogh Lele 1618aceb2a
NEW PROVIDER: Netlify (#1820)
Signed-off-by: Amogh Lele <amolele@gmail.com>
2022-11-28 11:01:35 -05:00
imlonghao d90ca157e4
PORKBUN: New provider (#1819)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-11-26 11:36:17 -05:00
Yuhui Xu 35818299c0
NEW PROVIDER: Gcore DNS (#1816) 2022-11-15 12:40:08 -05:00
Dragos Harabor 68516025a5
FEATURE: Add rTypes restrictions to IGNORE_NAME (#1808)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-11-07 11:27:04 -05:00
Jeffrey Cafferata 3f760cdd25
DOCS: Documentation improvements (#1786)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-10-31 18:09:43 -04:00
Jeffrey Cafferata c6011fe3f8
DOCS: Converted README.txt to .gitkeep (#1785)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-10-30 13:59:38 -04:00
Predrag Janosevic 128e075066
EXOSCALE: Migrate to v2 API (#1748)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-09-14 14:58:55 -04:00
Tom Limoncelli 61e500b7dc
DEV: Optimize integration tests (#1742) 2022-09-07 14:08:06 -04:00
Tom Limoncelli 9eda756a1b
CHORE: Update AZUREDNS deps, (#1706)
* Update AZURE_DNS deps
* CHORE: Reduce test runtime for AZURE_DNS,GANDI_V5,CLOUDFLAREAPI
2022-08-15 10:14:10 -04: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
Tom Limoncelli 83a4b6a2f4
Remove ACTIVEDIRECTORY_PS (#1680) 2022-08-11 13:15:19 -04:00
Simen Bai e9510da434
Domainnameshop provider (#1625)
* Added basic structure for domain name shop

* Finished proof of concept for domainnameshop

* Fixed handeling of IDNA for CNAME records

* Updated documentation notes

* Added docs

* Ran linter and vet

* Removed proxy config used for debugging

* Ran go generate

* Fixed issue with TTLs being restricted to a multiple of 60

* Ran tests, vet and linting and fixed flaws

* Fixed typo in docs

* Improved code based on feedback

* Fixed issues with TXT records not working properly

* Refactored according to new file layout proposed

* Updated documentation matrix

* Suggestions and corrections

* Corrected according to suggestions

Co-authored-by: Simen Bai <git@simenbai.no>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-08-01 12:01:37 -04:00
Amelia Aronsohn befb52be86
DNSIMPLE: Fix TXT Handling, Second Edition (#1624)
* Fix typo and add sandbox information

* Use SetTargetTXT in GetZoneRecords

This fixes the behavior documented in #1622

Also apply cleanup to GetZoneRecords

* Remove SetTargetTXT, does not work in all tests

* Set The most correct TXT handling

* Well, There's your problem

* Add an audit and test for unpaired quotes

* Add some commentary

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-07-22 09:36:28 -04:00
Tom Limoncelli 9416140dd0
CHORE: Update Exoscale (#1626)
* CHORE: Update Exoscale

* go mod tidy
2022-07-18 10:45:25 -04:00
Tom Limoncelli 44001dc999
DOCS: Add tips about TXT records (#1622)
* Add tips about TXT records

* More comments

* Remove test temporarily

* go generate

* A a link to the test
2022-07-14 14:43:07 -04:00
Tom Limoncelli 9b42764419
Move IGNORE* tests to the end (#1623) 2022-07-14 12:50:10 -04:00
Amelia Aronsohn b0d80ae498
DNSIMPLE: do not support unpaired double quotes in TXT (#1610)
* DNSIMPLE: do not support unpaired double quotes in TXT

DNSimple supports multiple double-quotes strings in a TXT record, but does not correctly support unpaired or escaped double-quotes currently.

IE the following are valid
```
asdf
"asdf"
"asdf" "asdf"
!@#$ %^&*()([][{}{<></'`:;-_=+\
```

however `as\"df` and `as"df` are not

This removes the extra string processing in getTargetRecordPriority as all tests pass without it and currently only double-quotes cause problems in our TXT validations.

I added another test to prove additional quoting is not needed. We can remove it if undesired.

Also applied small lint changes to make my editor happy.

* Use backticks to prevent escaping

* Set TXT target record content to GetTargetRFC1035Quoted()

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-07-11 14:52:18 -04:00
Amelia Aronsohn 14ae3732b6
DNSIMPLE: do not support spaces in CAA records. (#1606)
DNSimple does not support spaces in the records at this time. I have opened an internal ticket on the issue.

Fixes test breakage caused in #1377

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-07-09 01:14:04 -04:00
Jakob Ackermann 9ea125289b
HETZNER: do not support spaces in CAA records (#1577)
As of 2022-06-23, the Hetzner DNS API is still responding with a 422
 when a CAA record contains a quoted value with spaces.
```
format: number of fields does not match record type, expecting 3
```
Their support acknowledged my bug report a few weeks back and suggested
 the removal of spaces to get past the limitation.
Spaces in CAA records are not common. Let's just skip the test and put
 a notice in the docs.

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2022-06-23 19:36:29 -04:00
Tom Limoncelli 752e25471d
NEW PROVIDER: CSCGLOBAL as DNS Service Provider (#1516)
* Move the registrar features to a separate file

* Prepare the testing framework

* Roughed out functions

* Fix up structs

* WIP!

* First tests pass

* wip!

* Flesh out remaining rTypes, get nameservers, etc

* Fix TXT records

* Clean up code

* More cleanups. Fix CAA/SRV

* Linting

* Cleanups/linting

* Fix CAA [more] and more cleanups

* CSC does not like very long txt records

* Use timer only when interactive

* Disable CAA for now

* Update docs

* Remove debug printf

* add go-isatty

* cleanups
2022-06-12 16:01:08 -04:00
Tom Limoncelli 67baad392d
GANDI_V5: Fix DS test / Eliminate SHA1 use in DS_Child tests (#1502) 2022-05-08 13:21:47 -04:00
Tom Limoncelli 19550aeed9
Refactor: Rename providers/config to pkg/credsfile (#1494) 2022-05-02 20:12:30 -04:00
Tom Limoncelli 41d994bab6
Eliminate models.StringsToNameservers() (#1486)
* Eliminate StringsToNameservers()

* update comments
2022-04-24 09:08:40 -04:00
arnoschoon caedb9a7a6
NEW PROVIDER: AutoDNS (#1336)
* Implement AutoDNS provider to manage existing zones

* Moved AuditRecords() in to separate file to ease automatic updating

* S1011 - Use a single append to concatenate two slices

* Set list of available record types as returned by the system

* Fixed style, clarify code and add some extra comments

* Documented simple configuration and usage example of AutoDNS

* Convert MX and SRV record properly from string to actual structs and back

* Add support for integration tests of AutoDNS

* Return error message from update request instead of invoking panic()

* Skip AUTODNS in test for RFC 7505 (null MX)

* Update providers/autodns/autoDnsProvider.go

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-03-25 15:22:59 -04:00
Tom Limoncelli 52a8964564
LINODE: Skip CAA flag test (#1455)
* Skip CAA flag test for LINODE

* Require go 1.18

* Update CCI to use go 1.18

* go mod tidy

* HEXONET: Adapt to new OTE endpoint (#1463)

* HEXONET: Adapt to new OTE endpoint

* CCI uses goreleaser which needs go 1.8

* HEXONET: Fix error format string (#1462)

Fixes https://github.com/StackExchange/dnscontrol/issues/1461

* MAINT: "DUPLICATE E_RECORD" no longer a hard error (#1465)

* go generate
2022-03-25 15:16:36 -04:00
Tom Limoncelli cc6f5eb8d4
fixup! (#1441) 2022-03-04 09:42:36 -05:00
Tom Limoncelli e2eb288482
BIND: Fix test that fails on second run (#1434)
* 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

* fix failing test
2022-03-03 08:04:14 -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
Julius Rickert 20dad35167
Replace Jekyll highlight tags with fenced code blocks (#1412)
* Replace Jekyll highlight tags with fenced code blocks

Replace Jekyll highlight tags with fenced code blocks.
Canonicalize javascript to js.
Correct highlighting languages.
Add highlighting to code blocks.
Remove leading $ from bash blocks.
Remove empty lines at start and end of code blocks.
Stripped trailing whitespace.

* Fix language of code highlighting
2022-02-17 12:22:31 -05:00
Tom Limoncelli 1b83c219c5
Fix comment (#1379)
* Fix #1374

* Fix comment
2022-01-25 10:00:44 -05:00
Tom Limoncelli b73d37908c
BUGFIX: CAA records may include quoted spaces #1374 (#1377) 2022-01-25 09:57:20 -05:00
Hampton ea20c13e67
NEW PROVIDER: Packetframe (#1347)
* Implement Packetframe provider

* Packetframe: Move to authorization and fix multiple TXT records

* AKAMAIEDGEDNS: fix staticcheck warnings/errors (#1346)

* downcase TLSA

* Akamai provider

* Akamai provider

* EdgeDNS provider

* AkamaiEdgeDNS provider

* AkamaiEdgeDNS provider

* AkamaiEdgeDNS provider

* AKAMAIEDGEDNS: fix staticcheck warnings/errors

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>

* PacketframeProvider minor cleanup

* Packetframe v4 moved to production

* Packetframe Provider: Finish the rest of provider steps

* Packetframe: Make stylistic changes, update nameservers, apikey -> token

Co-authored-by: Steven Vernick <78868407+svernick@users.noreply.github.com>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-01-05 12:09:46 -05:00
Tom Limoncelli 9f720d1084
CLEANUP: Skip DualProvider tests if Cannot(DocDualHost) (#1345)
* Skip DualProvider tests if Cannot(DocDualHost)
* go generate
* Fix HEXONET domain
2021-12-21 12:23:11 -05:00
Jaye Doepke 900d4042e8
ROUTE53: Adopt aws-sdk-go-v2 (#1321)
* Switch to aws-sdk-go-v2

AWS has released v2 of their SDK for Go.

See: https://aws.github.io/aws-sdk-go-v2/

One big advantage of this is no longer needing to export the
`AWS_SDK_LOAD_CONFIG=1` env var when using named profiles.

* Update integration test README

* Reenable pager601 and pager1201 integration tests for AWS Route53

* Implement intelligent batching for Route53 record changes

The AWS Route53 API for batch record changes limits the request size to
the smaller of:

- 1000 records.
- 32000 characters total for record values.

Also UPSERTs count as double (a DELETE and then a CREATE).

This commit changes how the record ChangeBatches are created to
respect these limits.

* Remove old comments

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2021-12-07 16:29:29 -05:00
F.D.Castel 0d12eb7dc6
CLOUDFLAREAPI: Adds CF_WORKER_ROUTE (#1243)
* CLOUDFLAREAPI: Adds CF_WORKER_ROUTE.

- CLOUDFLAREAPI: Initial support for CF_WORKER_ROUTE.
- Put CF_WORKER_ROUTE behind a per-domain feature-flag.
- Adds Integration Test.
- Create Cloudflare workers for tests.
- Updates documentation.

* Workaround for updateWorkerRoute causing stack overflow.

* Sets AccountID.

* Updates to latest master (Thanks @tresni!).

* Removes $CLOUDFLAREAPI_ACCOUNTNAME.

* Add alltrue() filter and -cfworkers flag

* Final workers changes

* alltrue() should be implemented like other filters.
* Update documentation.

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2021-10-11 16:04:49 -04:00
Brian Hartvigsen d8941a04bc
CLOUDFLARE: Use cloudflare-go (#1267)
* First pass at moving to cloudflare-go vs hand made implementation of cloudflare's API

* Final changes to use cloudflare-go

* Fix for proxy configuration failing

Forgot to set the ID when we created a new records.  This didn't fail in the integrations tests so I missed it.

* Add integration test

To prevent something like what I did from happening in the future.

* Fix bad messaging
2021-09-30 07:09:42 -04:00