Commit graph

275 commits

Author SHA1 Message Date
Tom Limoncelli 063d550816
js_test.go should generate & test zonefile output too (#986)
* js_test.go: Do a zonefile test if $TESTNAME/parse_tests/{zonefile} exists.
* Add parse_tests zone files for all the tests that make sense.
* js_test.go: Addd the test datafile when displaying failures.
* 007-importTransformTTL.js: Was referring to a non-existent domain.
* 012-duration.js: Had duplicate DNS records.
* 029-dextendsub.js: Move CF-related tests to separate test.
* validate.go: Report non-existent domains as an error.
* cloudflareProvider.go: newCloudflare should not talk to the API.
2020-12-03 09:33:39 -05:00
Sven Peter f81260ba71
INWX: enable multi txt support (#981)
* INWX: enable MultiTXT support

* run go generate to update docs
2020-11-29 13:54:34 -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
Tom Limoncelli 3a2b1b2f7b
Internal: deps updates and linting (#905)
* Update dependencies
* writing-providers.md: Update for Go Mod, etc.
* Linting pkg/version
* s/CloudflareAPI/api/g
* s/ApiKey/APIKey/g
* s/ApiToken/APIToken/g
* s/ApiUser/APIUser/g
2020-10-18 14:04:50 -04:00
Tom Limoncelli a7964652d8 go get -u github.com/aws/aws-sdk-go github.com/miekg/dns golang.org/x/net 2020-10-12 12:08:43 -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
Tom Limoncelli 824ed2b75e
Update AWS and goquery dependencies (#899) 2020-10-08 16:50:42 -04:00
Patrick Gaskin 26c7c356f4
VULTR: Update govultr to v1.0.0 (fixes #892) (#897) 2020-10-08 16:12:56 -04:00
Tom Limoncelli 2fb72ac006
go get -u github.com/robertkrimen/otto (#889) 2020-10-07 16:26:49 -04:00
Tom Limoncelli 43537fbfd8 Update dependencies 2020-10-07 16:23:42 -04:00
Tom Limoncelli 678540cfdd
GANDI_V5: Use github.com/go-gandi/go-gandi, not github.com/tiramiseb/go-gandi (#883) 2020-10-02 13:53:03 -04:00
Jan-Philipp Benecke 52c50c88b3
PowerDNS: Implemented AUTODNSSEC (#856)
* PowerDNS: Implemented AUTODNSSEC
2020-09-17 08:46:15 -04:00
Tom Limoncelli 9554332ef5 Update dependencies 2020-09-04 16:29:57 -04:00
Tom Limoncelli 4432d38252
go get -u github.com/miekg/dns v1.1.31 (#846) 2020-09-04 16:26:56 -04:00
Mike Cochrane d6f3f401a5
NEW PROVIDER: DOH: Read-only Registrar that validates NS records (#840) 2020-09-04 10:22:41 -04:00
Tom Limoncelli 2f02deb0b0
Update dependencies (#838)
* Update dependencies

go get -u github.com/Azure/azure-sdk-for-go
go get -u github.com/Azure/go-autorest/autorest/azure/auth
go get -u github.com/aws/aws-sdk-go
go get -u golang.org/x/net
go get -u google.golang.org/api

* go tidy
2020-08-30 20:52:56 -04:00
Tom Limoncelli de308c0952
Lint: Fix ST1005: error strings should not be capitalized (#834) 2020-08-30 19:52:37 -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
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
Tom Limoncelli 541bb805da
linting (#777) 2020-07-06 20:18:24 -04:00
Tom Limoncelli 4979f2938b go get -u github.com/Azure/go-autorest/autorest/to 2020-06-26 12:53:39 -04:00
Tom Limoncelli 02b847b333 go get -u github.com/Azure/go-autorest/autorest/azure/auth 2020-06-26 12:53:21 -04:00
Tom Limoncelli c178409f53 go get -u github.com/Azure/azure-sdk-for-go 2020-06-26 12:52:55 -04:00
Tom Limoncelli 785e6d7dc7 go get -u github.com/aws/aws-sdk-go 2020-06-26 12:52:05 -04:00
Tom Limoncelli 5012021890 go get -u google.golang.org/api 2020-06-26 12:51:32 -04:00
Tom Limoncelli 67b3d9f98d go get -u github.com/TomOnTime/utfutil 2020-06-26 12:51:13 -04:00
Tom Limoncelli c0f4f1247d go get -u golang.org/x/net 2020-06-26 12:50:56 -04:00
Tom Limoncelli 505062b628
update AWS/GDNS/Azure deps (#768) 2020-06-18 13:59:17 -04:00
Tom Limoncelli 12e9d2bdd5
Update dependencies (#763)
* gcloud natively supports records of type DS

* doc fix: CanUseDs -> CanUseDS capitalisation fix

* Update github.com/stretchr/testify golang.org/x/tools google.golang.org/api gopkg.in/yaml.v3

Co-authored-by: Matthew Huxtable <matthew.huxtable@sparx.co.uk>
2020-06-09 14:00:20 -04:00
Tom Limoncelli f884e7615f go mod tidy 2020-06-02 07:01:09 -04:00
Tom Limoncelli 1d263c4dd6 Vendor github.com/mittwald/go-powerdns 2020-06-02 06:53:41 -04:00
Tom Limoncelli 0f0384c07c go get -u github.com/aws/aws-sdk-go 2020-05-30 10:10:18 -04:00
Tom Limoncelli 380524e81a go get -u github.com/stretchr/testify 2020-05-30 10:08:38 -04:00
Tom Limoncelli 1fdf401f30 go get -u golang.org/x/net 2020-05-30 10:05:40 -04:00
Jan-Philipp Benecke ffd4e46dda
New DNS provider PowerDNS (#748)
* Added PowerDNS as dns provider

* Remove unnecessary comments

* Some tests

* Implemented feedback
2020-05-30 09:54:07 -04:00
Tom Limoncelli 4ef4b9282a GCLOUD: go get -u google.golang.org/api 2020-05-23 10:18:28 -04:00
Tom Limoncelli 8d37020e30 DIGITALOCEAN: go get -u github.com/digitalocean/godo 2020-05-23 10:15:05 -04:00
Tom Limoncelli 4c40130951 ROUTE53: go get -u github.com/aws/aws-sdk-go 2020-05-23 10:12:48 -04:00
Tom Limoncelli 3346b3cee4 AZURE_DNS: go get -u github.com/aws/aws-sdk-go 2020-05-23 10:09:56 -04:00
Amelia Aronsohn b2b0ed4154
Update DNSimple Provider to api client 0.62 (#739)
* Update DNSimple-go to 0.61

This adds support for contexts, exports all return values, Adds ZoneRecordAttributes to fix support for blank record names.

* Add UserAgent to client

* Update Integration test for DNSimple

We now support Empty TXT, however we do not support Null MX yet.

* Bump to dnsimple-go 0.62 & use dnsimple.String()
2020-05-13 16:37:49 -04:00
Tom Limoncelli 409ebf65c1
Update AWS and Azure dependencies (#731)
* go: github.com/aws/aws-sdk-go upgrade => v1.30.19

* go: github.com/Azure/azure-sdk-for-go upgrade => v42.0.0+incompatible
2020-05-02 11:33:06 -04:00
Tom Limoncelli 26abff8884 go: google.golang.org/api upgrade => v0.22.0 2020-04-22 10:34:24 -04:00
Tom Limoncelli 3b058eae65 cleanup! 2020-04-21 15:46:22 -04:00
Tom Limoncelli 366c190942
Update dependencies (#723)
* go get -u github.com/Azure/azure-sdk-for-go

* github.com/aws/aws-sdk-go upgrade => v1.30.11

* github.com/digitalocean/godo upgrade => v1.35.1

* go get -u github.com/golang/protobuf
2020-04-21 15:41:58 -04:00
Tom Limoncelli 2a44a89d1b go get -u github.com/digitalocean/godo 2020-03-27 12:24:45 -04:00
Tom Limoncelli 5b1ad46129 go get -u github.com/aws/aws-sdk-go 2020-03-27 12:24:45 -04:00
Tom Limoncelli 1479117888 go get -u github.com/Azure/azure-sdk-for-go 2020-03-27 12:24:45 -04:00
Tom Limoncelli d14f00ce06
go get -u github.com/tiramiseb/go-gandi (#711) 2020-03-27 12:09:56 -04:00
Vatsalya Goel 34c73d4025
AZURE_DNS: Update azure sdk for go (#709)
* go get -u github.com/Azure/azure-sdk-for-go

* go mod tidy && go mod vendor

* update azure autorest
2020-03-26 09:21:12 -04:00
Tom Limoncelli 50d52775f8 go get -u github.com/urfave/cli/v2 2020-03-22 15:53:38 -04:00
Tom Limoncelli cb70070cda go get -u github.com/miekg/dns 2020-03-22 15:49:28 -04:00
Tom Limoncelli cb604e07c3 go -u github.com/digitalocean/godo 2020-03-22 15:46:51 -04:00
Tom Limoncelli 1a4dc215e8 go get -u github.com/aws/aws-sdk-go 2020-03-22 15:43:50 -04:00
Tom Limoncelli 1b5935d1af
Release 3.0.0 Candidate (#699)
Final changes before V3.0.0 release

* Remove old Gandi.  Fixes #575
* Many cleanups
* go mod tidy && go mod vendor

* integration_test.go: Output subtest name

* Cleanups

* integration_test.go: Description should include sub-test name
* Add a whitespace test to js/parse_tests/017-txt.js

* Cloudflare strips whitespace from end of TXT

* Fixes https://github.com/StackExchange/dnscontrol/issues/700

* Whitespace at end of TXT records

Name.com strips the whitespace from the end of a TXT record. There's
nothing we can do other than file a bug.

* Fixes https://github.com/StackExchange/dnscontrol/issues/701
2020-03-22 13:38:37 -04:00
Tom Limoncelli bbbb0c8c95
Update modules (#691)
* go get -u github.com/aws/aws-sdk-go
* get -u github.com/tiramiseb/go-gandi
* go get -u google.golang.org/api

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2020-03-10 16:26:06 -04:00
Tom Limoncelli 4edf360854
get-zones output should work as input into preview (#688)
* Add tests for get-zones
* fix CAA, SSHFP, TLSA and other bugs
* New format for get-zones: "djs" which is js but uses "disco commas"
* Print diffs using github.com/andreyvit/diff

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2020-03-10 11:32:47 -04:00
Tom Limoncelli 67e78f7e15
refactor into groups (#684)
* Refactor tests into "groups", each with its own filter (not/only/requires) to select which providers are appropriate.
* Test driver code is now a lot more simple and clear.
* Add support for not(), only(), and requires() as a way to select/reject providers for a test.
* Add docs explaining how to add tests
* Logging messages are much cleaner now, especially when tests are skipped.
* -start and -end now refer to test groups, not individual tests.  Log messages list the group numbers clearly.
* Add stringer for Capabilities
* Change the order of the tests so that simple tests are first
* Removed knownFailures from providers.json
* fmtjson providers.json

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2020-03-10 10:13:20 -04:00
Joel Margolis a57bf35788
EXOSCALE: Update exoscale/egoscale client to v0.23.0 (#664)
* Update Exoscale provider

* Update vendor folder for exoscale/egoscale v0.23.0

* Fix typos and SRV parsing

* Add . at the end of SRV records for exoscale
2020-02-27 23:06:12 -05:00
Joel Margolis 1232c17293
HEXONET: Update hexonet-sdk to v2.2.3+incompatible (#662)
* Update hexonet-sdk to v2.2.3+incompatible

* Update vendor

* Go mod tidy
2020-02-27 13:04:17 -05:00
Tom Limoncelli 1616c50ba7
GANDI_V5: Upgrade to newest github.com/tiramiseb/go-gandi 2020-02-27 12:06:24 -05:00
Tom Limoncelli 9812ecd9ff
BIND: Improve SOA serial number handling (#651)
* github.com/miekg/dns
* Greatly simplify the logic for handling serial numbers. Related code was all over the place. Now it is abstracted into one testable method makeSoa. This simplifies code in many other places.
* Update docs/_providers/bind.md: Edit old text. Add SOA description.
* SOA records are now treated like any other record internally. You still can't specify them in dnsconfig.js, but that's by design.
* The URL for issue 491 was wrong in many places
* BIND: Clarify GENERATE_ZONEFILE message
2020-02-23 13:58:49 -05:00
Amelia Aronsohn b45c6b6b6c
DNSimple: Implement GetZones and ListZones (#637)
* Update to latest dnsimple-go

* Implement GetZoneRecords

* Better naming

* Return NS records in GetZoneRecords

* Be clearer with the comment.

As an employee I confirm this is exactly how this works. No guessing needed.

* Respect that Puncycode encoding can blow up

* Implement ListZones and the ZoneLister Interface

* Categorize DNSIMPLE

* Update docs with go generate

* vendor modules

* Don't store intermediary Zone data
2020-02-20 14:52:19 -05:00
Tom Limoncelli 87ad01d194
Add "get-zone" command (#613)
* Add GetZoneRecords to DNSProvider interface
* dnscontrol now uses ufave/cli/v2
* NEW: get-zones.md
* HasRecordTypeName should be a method on models.Records not models.DomainConfig
* Implement BIND's GetZoneRecords
* new WriteZoneFile implemented
* go mod vendor
* Update docs to use get-zone instead of convertzone
* Add CanGetZone capability and update all providers.
* Get all zones for a provider at once (#626)
* implement GetZoneRecords for cloudflare
* munge cloudflare ttls
* Implement GetZoneRecords for cloudflare (#625)

Co-authored-by: Craig Peterson <192540+captncraig@users.noreply.github.com>
2020-02-18 08:59:18 -05:00
Vatsalya Goel cd680cc738
Upgraded Azure SDK to 39.1.0 (#627)
* Upgrade Azure DNS API
* vendor modules
* Fixed AZURE_DNS Empty TXT Record
* Fix preview
2020-02-18 08:45:31 -05:00
Patrick Gaskin 2e76c0e9d1
Updated govultr to v0.2.0 (#619) (#624) 2020-02-17 10:47:34 -05:00
Tom Limoncelli 5a5eeb524c "go mod tidy" 2020-02-14 15:03:04 -05:00
Tom Limoncelli 6a0c6a517c
Update github.com/go-acme/lego (#623) 2020-02-14 13:59:28 -05:00
Juho Teperi 737c8b5616
Update digitalocean module (#622)
Related #619
2020-02-14 06:40:13 -05:00
Tom Limoncelli f708f19535
Update many modules (#620)
* Update many modules.

go get -u golang.org/x/net
go get -u github.com/aws/aws-sdk-go
go get -u golang.org/x/oauth2
go get -u google.golang.org/api
go get -u gopkg.in/yaml.v2
go mod tidy

* Update modules

go get -u github.com/tiramiseb/go-gandi
go get -u github.com/miekg/dns
go mod tidy
2020-02-12 21:16:35 -05:00
Tom Limoncelli 66a290067a git mod tidy 2020-02-12 20:13:18 -05:00
Tom Limoncelli cad8a279a8 fixup! 2020-02-12 20:09:06 -05:00
Tom Limoncelli 891c4162df
Upgrade urfave/cli to v2 (#614)
* Upgrade cli to v2
* Re-vendor
2020-02-03 12:44:11 -05:00
Tom Limoncelli 92b51dbc65
Update github.com/mjibson/esc (#515)
* Update github.com/mjibson/esc

* Update github.com/mjibson/esc
* Fix generate.go to new signature for esc.Run

* Internal: Upgrade to lastest "esc"
2020-01-29 13:43:25 -05:00
Tom Limoncelli f6ce421fdd
NEW PROVIDER: GANDI_V5 (deprecates GANDI) (#572)
* GANDI_v5: Add Registrar support
* Add GANDI deprecation warning
* vendor github.com/tiramiseb/go-gandi
2020-01-20 14:13:32 -05:00
Tom Limoncelli 16d0043cce
Switch from govendor to go modules. (#587)
Thanks to @BenoitKnecht for leading the way on this.
2020-01-18 14:40:28 -05:00