Commit graph

261 commits

Author SHA1 Message Date
Tom Limoncelli eb4af05d31
DIGITALOCEAN: Improve TXT record handling (#2128) 2023-03-08 07:59:35 -08:00
Tom Limoncelli b54c5eab10
ROUTE53: Report R53_ALIAS loops as an error (#2111) 2023-03-01 10:00:58 -05:00
Tom Limoncelli 2586e2b611
CORE: Clean up diff2 code in prep for production (#2104) 2023-02-28 01:25:09 -05:00
Tom Limoncelli 05dc26bf2e
BUG: diff2: ttl changes don't always work (#2093) 2023-02-25 22:40:54 -05:00
Tom Limoncelli fc3a217dc1
Bugfixed: NO_PURGE now works on all diff2 providers (#2084) 2023-02-19 12:33:08 -05:00
Tom Limoncelli 43c5b17ed8
CHORE: Add unit test for TTL changes on SRV records (#2067) 2023-02-19 10:57:41 -05:00
Jeffrey Cafferata a068aaa1ab
TRANSIP: Performed the integration tests by an TransIP private key. (#2087)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-02-19 10:57:00 -05:00
Will Power a979c57ae8
test namecheap provider against their sandbox (#2082)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-02-19 10:51:55 -05:00
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
Tom Limoncelli 0203154021
VULTR: Fix TXT quoting issue (#1239)
* VULTR: Fix TXT quoting issue
* VULTR: Add tests that trigger Vultr's SPF mode
* VULTR: Enforce the fact that VULTR only supports a single string in TXT records

Co-authored-by: Lee Martin <lmartin@stackoverflow.com>
2021-08-17 15:58:10 -04:00
Vincent Hagen 506b6cc32f
Transip provider (#1196)
* Add initial transip provider

* Add GetNameservers to transip

* Add first try to correction function.

* Implemented corrections

* Add docs for transip

* Fix TransIP TTL updates

* Fix transip nameserver records

* Update docs/_providers/transip.md

Co-authored-by: Sven Luijten <11269635+svenluijten@users.noreply.github.com>

Co-authored-by: Sven Luijten <11269635+svenluijten@users.noreply.github.com>
2021-07-07 11:43:10 -04:00
Tom Limoncelli 654736be29
Improve MSDNS naptr support (#1165)
* MSDNS: Improve reliability of zone dump

* Update tests

* MSDNS: Add initial NAPTR support

* Update

* fix tests

* fix tests

* Fixing integration tests for NAPTR

* Handle bad JSON. Handle NAPTR TTLs
2021-06-24 18:26:21 -04:00
Steven Vernick be1f03fb75
NEW PROVIDER: AkamaiEdgeDNS (#1174)
* downcase TLSA

* Akamai provider

* Akamai provider

* EdgeDNS provider

* AkamaiEdgeDNS provider

* AkamaiEdgeDNS provider

* AkamaiEdgeDNS provider

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2021-06-22 10:24:49 -04:00
Peter Thomassen d567d554cf
DESEC: clarify supported capabilities (#1160)
* DESEC: clarify AutoDNSSEC

* DESEC: improve error messages / hints

* DESEC: add NAPTR support

* DESEC: add to integration test configuration
2021-05-17 15:45:24 -04:00
Tom Limoncelli 24083d3f76
Add integration test for SOA (#1147)
* Add integration test for SOA

* Add docs for SOA record

* MAINT: Rename SoaInfo to SoaDefaults.

gorename -v -from '"github.com/StackExchange/dnscontrol/v3/providers/bind".SoaInfo' -to SoaDefaults
2021-05-07 14:39:26 -04:00
Tom Limoncelli 68dee3a8c5
Speed up integration tests (#1138) 2021-05-02 11:25:57 -04:00
Tom Limoncelli 7156047426
TESTING: Improve DS comments (#1134) 2021-04-22 15:35:22 -04:00
Tom Limoncelli d5bfee9f1e
Maint: DS record tests should use more realistic data (#1127)
* DS tests should use real hashes
* Increase integration test timeout to 20m
2021-04-17 10:49:06 -04:00
Tom Limoncelli 4ab4d4c9ed
IGNORE_NAME: Should work at domain apex (#1118)
* IGNORE_NAME: Add test at apex
* Fix IGNORE_NAME at apex
* Add comments and documentation
* Add a flag to disable IGNORE_NAME safety checks
2021-04-13 08:59:47 -04:00
Anton Yurchenko 8249f33913
ClouDNS. Looks like SRV was marked as "not test" by mistake - it's working fine. On the other hand, PTR working in general, but can not be tested on the same domain. (#1101) 2021-03-21 15:35:45 -04:00
Vojta Drbohlav 517b0458d6
NEW PROVIDER: DNS Made Easy (#1093)
* implement DNS Made Easy provider

* fix sandbox instructions in DNS Made Easy provider docs

* remove unnecessary blank lines and fix golint warnings

* remove unused deleteRecord method from DNSME api

* remove trailing comma in providers.json

* implement check for TXT records with double quotes for DNSME provider

* implement changing apex NS records

* rename DNSME to DNSMADEEASY

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2021-03-17 23:36:42 -04:00
Julius Rickert c883c1ac68
New provider and new registrar: hosting.de (#1041)
* Add http.net provider

* Rename httpnetProvider

* Add SSHFP capability

* Add paging for records

* Sort documentation notes alphabetically

* Add custom base URL

* Extend documentation for custom base URL

* - renamed to hosting.de
- Fix EnsureDomainExists
- GetNameservers read from NS Records

* Replaced http.net with hosting.de
Contributor Support from hosting.de

* baseURL for hosting.de in documentation
replaced %v with %w for errors
special handling for txt records using .TxtStrings

* removed last references to rc.Target
fixed Trim of last dot

* Re-engineer TXT records for simplicity and better compliance (#1063)

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
Co-authored-by: Oliver Dick <o.dick@hosting.de>
Co-authored-by: Oliver Dick <31733320+membero@users.noreply.github.com>
2021-03-08 19:25:55 -05:00
Tom Limoncelli c5905e2006 Disable failing tests for R53 2021-03-07 14:42:55 -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 21e85e6528
"Target" RecordConfig should not be exported (#1061)
* Unexport RecordConfig.Target
* Fix tests
* HEDNS: Fix usage of target field to resolve TXT handling (#1067)

Co-authored-by: Robert Blenkinsopp <robert@blenkinsopp.net>
2021-03-04 18:58:23 -05:00
Jan-Philipp Benecke 06a1cc3d38
POWERDNS: Some minor fixes for ALIAS and TXTMulti and integration testing (#1065)
* POWERDNS: Some minor fixes for ALIAS and integration testing
* POWERDNS: Readd missing error handling
2021-03-01 07:09:49 -05:00
Tom Limoncelli c547beacc0
NEW FEATURE: Support Split Horizon DNS (#1034)
* Implement main feature
* BIND: Permit printf-like file name formats
* BIND: Make filenameformat work forwards and backwards.
* Fix extrator test cases
2021-02-05 12:12:45 -05:00
taybinakh 2d5a09f217
CLOUDNS: Implement AUTOSPLIT (#1035)
* implement AUTOSPLIT for ClouDNS

Co-authored-by: IT-Sumpfling <it-sumpfling@maxit-con.de>
Co-authored-by: bentaybi jamal <jamal@pfalzcloud.de>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2021-01-31 07:40:03 -05:00
Tom Limoncelli 23f65163e8
CLOUDFLAREAPI: Support Punycode for CF_REDIRECT/CF_TEMP_REDIRECT (with tests) (#1026)
* CLOUDFLAREAPI: CF_REDIRECT should support Punycode
* Add tests to CF_*REDIR
* CLOUDFLARE: DS records only permitted on children
2021-01-24 16:36:23 -05:00
Nick Gregory 945ffb7e80
NEW PROVIDER: Oracle Cloud (#1021)
* feat: add Oracle provider

* fix ALIAS and NS tests

* return... else if -> return... if

* fix assignment

* remove extraneous blank lines

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2021-01-24 15:35:12 -05:00
taybinakh d7f40ed680
Implement DS record support for ClouDNS (#1018)
* Add PTR support for ClouDNS

* Implement PTR Support for CLouDNS

* implemnent DS Record for ClouDNS

* implement DS record for clouDNS

* pull request review

* note that SshFpAlgorithm and DsAlgorithm both use json field algorithm

* primitive rate limit and fix order of NS/DS-entries

* codefixes

Co-authored-by: IT-Sumpfling <it-sumpfling@maxit-con.de>
Co-authored-by: bentaybi jamal <jamal@pfalzcloud.de>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2021-01-22 12:54:39 -05:00
Tom Limoncelli 0893f74895
CLOUDFLAREAPI: Now works with PunyCode/IDNA (#1019) 2021-01-14 09:53:06 -05:00
Tom Limoncelli 50db086278
NEW PROVIDER: MSDNS (#1005)
* New provider
* Add support for SRV records
* Modify ACTIVEDIRECTORY_PS provider to warn that it is deprecated.
2020-12-28 16:07:33 -05:00
Brice Figureau 38e3e706cd
(#1003) Make OVH TXTMulti capable (#1008)
* maint: OVH doesn't support Null MX

so, better exclude this provider from the Null MX integration test.

* (#1003) OVH natively supports TXT multistrings

OVH directly supports multistrings TXT, so this change just enables
this feature.
2020-12-28 14:53:22 -05:00
taybinakh e9f4257ad2
CLOUDNS: Implement PTR Record Support (#999)
* Add PTR support for ClouDNS

* Implement PTR Support for CLouDNS

Co-authored-by: IT-Sumpfling <it-sumpfling@maxit-con.de>
Co-authored-by: bentaybi jamal <jamal@pfalzcloud.de>
2020-12-22 13:32:00 -05:00
Tom Limoncelli c89f14e926
TESTING: Fail cleaner if no domain set (#998) 2020-12-18 12:14:43 -05:00
Tom Limoncelli 096458d91c
CLOUDFLAREAPI: Support TXTMulti and empty TXT targets (#978)
* CLOUDFLAREAPI: Add TXTMulti support

* CLOUDFLAREAPI: Support TXTMulti and empty TXT strings
2020-11-29 14:39:15 -05:00
Tom Limoncelli 12a3354c0c
Enable Bring-Your-Own-Secrets (#982)
* Move env from steps to job
* Rename env to be predictable.
* fix conditional
* document B.O.Y.S.
* Update docs/byo-secrets.md

Co-authored-by: Max Horstmann <MaxHorstmann@users.noreply.github.com>

* respond to reviews
* fixup!

Co-authored-by: Max Horstmann <MaxHorstmann@users.noreply.github.com>
2020-11-29 14:15:40 -05:00
Tom Limoncelli 07917006bb
Gracefully skip tests if the secrets are not available (#977)
* Sort provider lists and add comments to explain sorting
* Skip tests we can not run
* Add INWX
2020-11-29 06:04:22 -05:00
Sven Peter e29f7440f5
INWX: Guard against single-quote TXT targets (#971)
* INWX: split out and disable TXT with single-quote test
* INWX: add check for single-quotes in TXT records
2020-11-28 15:38:58 -05:00
Tom Limoncelli db6ad08f5e
GCLOUD: Retry on ratelimit (#946)
* Add exponential delay retry on 429, 503; and single retry on 404s.
2020-11-18 09:06:45 -05:00
Tom Limoncelli 1f471a15b9
DIGITALOCEAN: Support TXTMulti with caveats (#949)
* DIGITALOCEAN: Support TXTMulti with caveats
* go get github.com/digitalocean/godo
* DIGITALOCEAN: Enable CI tests
2020-11-18 08:22:31 -05:00
Jakob Ackermann 550fa436ed
HETZNER: better rate limit handling (#936)
* HETZNER: better rate limit handling

- Hetzner is using a Proxy service 'kong' which broadcasts it limits
- honor 'Retry-After' of 429 responses
- delay requests per-se: see the amended docs for details

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* HETZNER: apply review feedback: store quotaName as lower case

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2020-11-16 12:26:52 -05:00
Tom Limoncelli 184131b1e3
AZURE_DNS: Remove artificial delays (#943)
* AZURE_DNS: Remove artificial delays
* CloudflareAPI is too slow for all tests
2020-11-13 12:21:13 -05:00
Tom Limoncelli ba08e718b7
DIGITALOCEAN: Abide by rate limits (#934)
* Implement exponential back-off
2020-11-12 10:53:44 -05:00
Tom Limoncelli 724d5ff6c7
ROUTE53: Fix R53_ALIAS creation failure (#938)
Fixes https://github.com/StackExchange/dnscontrol/issues/937

* Add integration test to repro https://github.com/StackExchange/dnscontrol/issues/937
* Reformat integration tests to be more readable.
* ROUTE53: Create CNAME/R53_ALIAS in best order
* Each R53_ALIAS_* should be its own change, not combined.
* Refactor and simplify (omg it has gotten ugly)
2020-11-12 00:30:40 -05:00
Jakob Ackermann 2b50af0cbc
NEW PROVIDER: HETZNER DNS Console (#904)
* HETZNER: implement the provider for Hetzner DNS Console

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* HETZNER: apply review feedback

- add domain into error messages
- insert sub-strings using `%q`
- insert sub-errors using `%w`
- change api.getZone() signature to return a (potentially `nil`) Zone
   pointer instead of a (potentially empty) Zone value
- sort imports and confirm with `$ goimports -w providers/hetzner/`
- use exact 'api_key' term in error message of settings validation
- add blank line for logic separation
- drop internal record id from correction messages

Co-Authored-By: Tom Limoncelli <tlimoncelli@stackoverflow.com>
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* HETZNER: add request rate-limiting handling

There are a limited number of data-points on how their rate-limiting
 works at this time. I deduce from my account to others and use a fixed/
 constant backoff of 1s as the initial delay. Thereafter exponential
 increase with factor 2 (not needed at this time).
Hetzner has not made any official statements on rate-limiting, so this
 is guesswork only.

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* HETZNER: address golint complaints

- baseUrl -> baseURL
- mark Record as private -> record
- mark Zone as private -> zone
- mark RequestRateLimiter as private -> requestRateLimiter
- capitalize Id fields as ID
- keep delay logic on same level, move return out of branch

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* HETZNER: rate_limited: init the response timestamp on requestRateLimiter

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* HETZNER: requestRateLimiter: align local variable with struct name

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2020-10-22 09:44:21 -04:00
Tom Limoncelli da1cbad4ec
HEXONET: Implement get-zones, fix module problem (#898)
* VULTR: Update govultr to v1.0.0 (fixes #892) (#897)

* go get -u github.com/hexonet/go-sdk

* Fix HEXONET providers.json entry

* providers.json: json commma

* providers.json: fmtjson

* HEXONET: Implement get-zones. Fix tests and docs.

* fixup!

* Update azure test failures

* Move version info into its own package

* Use new version system
2020-10-12 11:45:44 -04:00
Patrick Gaskin b6d2ddd04c
VULTR: Null MX records are not supported (#702) (#894) 2020-10-08 16:12:22 -04:00
Tom Limoncelli b6fd4dffd7
Cleanups: Fix many issues reported by staticcheck.io (#837)
* Lint: Fix ST1005: error strings should not be capitalized

* Cleanup: Fix a lot of staticcheck.io warnings
2020-08-30 20:38:08 -04:00
Robert Blenkinsopp 74dd34443a
NEW PROVIDER: HEDNS: Hurricane Electric DNS (dns.he.net) (#822)
* Add initial dns.he.net provider support

* Update to new IncrementalDiff interface

* Fix ListZones output for `all` query on `get-zones`

* Refactor authentication code for 2FA with better error checking

* Fix integration test and refactor zone record retrieval

* Add option to use `.hedns-session` file to store sessions between runs

* Add comment on `session-file-path`

* Add integration test for TXT records longer than 255 characters

* Add additional checks for expected responses, and better 2FA error checking

* Minor documentation changes

* Revert "Add integration test for TXT records longer than 255 characters"

This reverts commit 657272db

* Add note on provider fragility due to parsing the web-interface

* Resolve go lint issues

* Clarify security warnings in documentation
2020-08-26 13:38:28 -04:00