Commit graph

188 commits

Author SHA1 Message Date
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