Commit graph

153 commits

Author SHA1 Message Date
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
Mike Cochrane b01b278d18
Fix IGNORE_TARGET integration test. Fixes (#818) (#819) 2020-08-18 17:45:34 -04:00
Mike Cochrane 960dc66bd2
New feature: IGNORE_TARGET. Rename INGORE to IGNORE_NAME (#806) 2020-08-18 11:14:34 -04:00
Sven Peter f88c60a8f3
New provider: INWX (#808)
* adds initial support for INWX

* adds all features to the INWX provider

* allows domain for tests in creds.json for INWX

* runs go generate to update docs for INWX

* fixes formatting with gofmt

* changes goinwx to github.com/nrdcg/goinwx v0.8.0

* simplifies inwx sandbox check

* changes inwx unknown key error to a warning

* adds models.PostProcessRecords for inwx records

* replaces strings.TrimRight with [:-1] to remove final dot for inwx

* adds a comment about the domain creds.json key for the inwx provider

* removes warning for invalid creds.json keys in the inwx provider

* adds TOTP calculation support for inwx

* adds comments to inwxProvider

* improves INWX error messages

* adds additional documentation about the TOTP support for INWX

* adds inwx documentation

* bumps goinwx to 0.8.1 to fix the inwx API
2020-08-17 08:45:44 -04:00
Sven Peter 690f49e041
fix: only run SRV null target test when supported (#807) 2020-08-10 18:36:33 -04:00
Tom Limoncelli 491a3f8720 Relax tests for Azure temporarily 2020-06-25 17:05:10 -04:00
Tom Limoncelli ea46bc3bbd
integration_test.go: Split out pagesize tests (#771) 2020-06-24 15:16:00 -04:00
Matthew Huxtable ff8ce26cee
Provider support for DS records as children only (#765)
This functionality is required by the GCLOUD provider, which supports
recordsets of type DS but only for child records of the zone, to enable
further delegation. It does not support them at the apex of the zone (@)
because Google Cloud DNS is not itself a registrar which needs to model
this information.

A related change (14ff68b151, #760) was
previously introduced to enable DS support in Google, which broke
integration tests with this provider.

To cleanly support this, we introduce a new provider capability
CanUseDSForChildren and appropriate integration tests. Further, it is no
longer possible to verify a provider has the proper capabilities for a
zone simply by existence of particular records; we adapt the capability
checks to enable inspection of the individual recordsets where this is
required.

Closes #762
2020-06-18 17:24:13 -04:00
Robert Koch 2e8589e4ce Added DS for cloudflare provider with tests 2020-05-30 11:06:13 -04:00