Commit graph

233 commits

Author SHA1 Message Date
Patrick Gaskin cafd4d387a vultr: Added support for SSHFP records (#531) 2019-07-15 12:28:37 -04:00
Patrick Gaskin 44a7ba5711 Switch to official Vultr API library (#529)
* vultr: Switched to official API library (closes #528)

* vultr: Renamed vultr.VultrApi to vultr.Provider

* vendor: Updated govultr
2019-07-15 10:31:55 -04:00
Craig Peterson 08deda6746
Integration tests running in azure pipelines (#516) 2019-07-02 12:32:54 -04:00
Craig Peterson 5b5ae861ae fix format again 2019-06-27 01:29:13 -04:00
Craig Peterson 7e3c5b528e fix unit tests 2019-06-27 01:26:48 -04:00
Craig Peterson 364aac5073 fix format 2019-06-27 01:21:23 -04:00
Craig Peterson 394b9ccf41
respect max batch size for r53 (#509) 2019-06-26 23:45:34 -04:00
Craig Peterson 4a7a5515a0
add a comment explaining cloudflare tll oddness 2019-06-17 15:12:23 -04:00
Craig Peterson f61efd45f2
restore prior cloudflare auto-ttl behavior when ttl is 300 2019-06-17 15:09:27 -04:00
Patrik Kernstock 539820f87a CF: Add ability to manage UniversalSSL (#496)
* Added Cloudflare UniveralSSL control
* Added CF_UNIVERSALSSL_ON/OFF macros
* Updated docs
* Small docs update
* go generate
2019-06-13 07:32:54 -04:00
Tom Limoncelli a5dcad06a3
Fix integration tests (NAMEDOTCOM, CLOUDFLARE) (#498)
NAMEDOTCOM: TXTMulti is broken. Disable.
CLOUDFLARE: Fix SSHFP tests.
2019-05-27 15:10:00 -04:00
Koen Vlaswinkel 5538de6682 IGNORE() now supports glob pattern/wildcards (#463) 2019-05-27 10:14:29 -04:00
Nikolay Kolev b3e35b56a2 DOC: Apply brand-preferred case (#429)
* Apply brand-preferred case

* Apply case to own branding as well
2019-05-23 09:29:21 -04:00
Patrik Kernstock 7ed3adb2f1 OVH: Fixed registrar ns correction (#486) 2019-05-23 09:25:26 -04:00
Patrik Kernstock d84a91c848 CLOUDFLARE: Added TLSA and SSHFP support (#484) 2019-05-20 22:32:39 -04:00
Patrik Kernstock 9052e7a1a7 OVH: Fixed DKIM when having longer keys (#487) (#488)
* OVH: Fixed DKIM when having longer keys (#487)

* Shorter error message, typo fix
2019-05-20 22:31:59 -04:00
Tom Limoncelli df163c0042
OVH: Update to use newer client library (#445)
* xlucas/go-ovh is deprecated, use ovh/go-ovh instead.

* vendor github.com/ovh/go-ovh

* Fix 022-sshfp.json test
2019-05-20 15:39:19 -04:00
Patrik Kernstock 95a995189d CLOUDFLARE: Fix CF trying to update non-changeable TTL (#489) 2019-05-20 15:27:37 -04:00
Tom Limoncelli 5f77888296
DOCUMENTATION: Document bugid 491 (#492) 2019-05-20 14:37:23 -04:00
Patrik Kernstock f795af3be0 OVH: Certify SSHFP support (#482) 2019-05-19 12:19:54 -04:00
Juho Teperi c9a5c6a0f9 DIGITALOCEAN: Fix #479: Filter SOA records from Digitalocean (#485) 2019-05-19 12:12:10 -04:00
Patrik Kernstock 50d698fe37 OVH: Certify that CAA support (#477) 2019-05-18 11:11:04 -04:00
Patrik Kernstock d782bb002b CLOUDFLARE: SPF records should be converted to TXT Fixes #446 (#480) 2019-05-18 11:08:18 -04:00
Craig Peterson 6d6f685f70
trim trailing dots from discovered nameservers in central place 2019-05-15 12:57:17 -04:00
Tom Limoncelli 61a00a7d7e
Check for duplicate records much earlier (#467)
* Check for duplicate records much earlier.

* Change GetTargetDiffable to ToDiffable

* fixup!
2019-04-22 15:41:39 -04:00
Peter Dunaskin e2726dda64 Fix NAPTR record support. 2019-03-29 12:01:52 +01:00
Peter Dunaskin 7566c0428e Attempt to add NAPTR support. 2019-03-28 15:40:13 +01:00
Pierre-Emmanuel Jacquier 511c0bf7de NEW PROVIDER: Exoscale (#390)
* Add exoscale provider

Signed-off-by: Pierre-Emmanuel Jacquier <pierre-emmanuel.jacquier@epitech.eu>

* Fix validation

Signed-off-by: Pierre-Emmanuel Jacquier <pierre-emmanuel.jacquier@epitech.eu>

* Fix DualProvider

Signed-off-by: Pierre-Emmanuel Jacquier <pierre-emmanuel.jacquier@epitech.eu>
2019-02-22 09:10:23 -05:00
Craig Peterson 9a6af836dc
Activedirectory: Full support for managing NS records. (#450)
* condense AD 'unsupported record type' warnings

* active directory provider can create/modify/delete NS records!

* ad passes more of the tests now

* skip root NS records for safety

* clarifying comment
2019-02-20 12:30:35 -05:00
Riley Berton 82d4660816 ROUTE53/GCLOUD: Add Delegation/nameserver Sets (#448)
- Support DelegationSet for Route53 (create-domains only)
- Retry Route53 operations which fail for rate limits under large numbers of domains
- Support for name_server_set for GCloud (create-domains only)
- Docs for both
2019-02-19 12:30:39 -05:00
karlism f9fc6243d4 Add SSHFP DNS record support. (#439)
* Add SSHFP DNS record support.
* Fix integration test.
2019-01-28 17:26:20 -05:00
Bart S 5594904f3d CLOUDFLARE: Added options to set the target account for new domains (#430) 2018-12-19 09:48:27 -05:00
Tom Limoncelli bb8d0cacb6
Warn (but don't fail) if creds.json file does not exist (#425) 2018-12-11 11:56:06 -05:00
Tom Limoncelli 38074df158
BIND: Warn if output directory does not exist. (#424) 2018-12-10 14:05:01 -05:00
Brice Figureau 292ea28208 Populate ovh zones cache as early as possible (#412) (#417)
* Maint: run generate for missing documentation

Apparently current master is missing some generated documentation.

* Populate ovh zones cache as early as possible (#412)

We are caching the OVH zones in GetNameservers.
It turns out it isn’t a good idea, because GetNameServers will not be called
if the user selects no name servers for a given domain by using for example:

```
D(‘my domain’, DnsProvider(ovh, 0)) {
}
```

The subsequent GetDomainCorrections would automatically fail
with an unknown domain error, because the zones cache hasn’t been
filled in.

To solve the issue, the ovh provider now populates the zones cache during
initialisation.
2018-10-16 15:42:54 -04:00
Tom Limoncelli 93a36cbba9
GCLOUD: Support TXTMulti (#415)
* GCLOUD: Support TXTMulti
* Testing: Test max TXT record length
2018-10-14 10:53:11 -04:00
Amy Aronsohn a2c54c85af Update DNSimple-go to v0.20.0 and fix provider (#414)
Signed-off-by: Amy Aronsohn <WagThatTail@Me.com>
2018-10-14 00:30:58 -04:00
Amy Aronsohn 4e417eaa06 Fix DNSimple SRV and MX records (#413)
* Fix SRV and MX records, update knownFailures

This gets us back to tests passing

Signed-off-by: Amy Aronsohn <WagThatTail@Me.com>

* Better comment

Signed-off-by: Amy Aronsohn <WagThatTail@Me.com>
2018-10-14 00:30:13 -04:00
Ed Bardsley 06ee4d6fb1 Verbose debug logging via the ConsolePrinter and printer package. (#404)
This:
 * adds a global -v flag for verbosity
 * refactors the "printer" package to have a DefaultPrinter and package
   functions that call it, similar to net/http's DefaultServeMux
 * adds printer tests
 * moves current users of Debugf to Printf
 * moves most users of the "log" package to use "printer"
 * demotes noticably noisy log messages to "Debugf", like "IGNORE"-
   and "NO_PURGE"-related messages
2018-10-08 16:10:44 -04:00
Craig Peterson d006f62f8f make sure key/value grouping always uses fqdn 2018-09-07 13:46:44 -04:00
ashleyhull-versent e616cd7979 Update route53Provider.go (#401) 2018-09-04 12:58:02 -04:00
Ed Bardsley 61281d7046 Add NAMESERVER_TTL and associated documentation. (#398) 2018-09-04 10:57:11 -04:00
Ed Bardsley 61c92c9215 Correctly group R53_ALIAS records during IncrementalDiff. (#399)
Previously, unnecessary corrections were possible if both an R53_ALIAS
pointing to an A record and to an AAAA record existed for the same label,
and map iteration over existing and desired found them in different orders.
(This is a common configuration for IPv6-enabled records.)

This commit:
 * mirrors key logic in the R53 provider
 * centralizes logic around keys in the models package
 * adds tests
2018-09-04 10:55:27 -04:00
Kai Schwarz 3e5d223675 new provider module HEXONET (#373) 2018-08-30 08:54:42 -04:00
Craig Peterson e680fb9a46 ROUTE53: Bug: fix corner case when deleting alias (#394) 2018-08-23 17:46:50 -04:00
Yoan Blanc 18f47d3291 dnsimple: gofmt (#388)
Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
2018-08-13 10:41:54 -04:00
Tom Limoncelli b0f86bc007
Documentation: Clarify the when to implement certain interfaces (#376) 2018-07-25 12:59:04 -04:00
Kieran Jacobsen 6ace5e2b4b Cloudflare: Add support for MX priorities of "" (0) (#374)
* Cloudflare: Add support for MX priorities of "" (0)
2018-07-24 08:51:10 -04:00
Koen Rouwhorst 921fa98490 Include record set type in record key. (#336) 2018-06-25 14:15:21 -04:00
Amy Aronsohn a6536264b5 sort returned nameservers (#369)
The API isn't sorting the name servers so even when they match they
would report being different. This will prevent it trying to update them
every time

Signed-off-by: Amy Aronsohn <WagThatTail@Me.com>
2018-06-24 23:37:16 -04:00
Patrick G 9d0f9a1531 Cloudflare: Fix parsing of priority field in record (fixes #367) (#368) 2018-06-22 14:11:05 -04:00
Craig Peterson 17e64ca28d
fix names for internal transformed records (#358)
* fix names for internal transformed records

* activedirectory use standard messaged

* add test for fqdn consistency in final validation pass
2018-04-26 14:45:10 -04:00
Craig Peterson 554e8a40e1
Update AD integration failures (#353) 2018-03-29 14:03:34 -04:00
Tom Limoncelli acaa77dc22
BIND: Fix panic on CNAME (#347)
* BIND: Fix panic on CNAME
* Improve tests
2018-03-22 09:25:40 -04:00
Brice Figureau f9d748011e OVH: panic on SPF and DKIM record types (#340)
OVH uses special SPF and DKIM invalid types for records added with
the web ui (or default zone records).
The ovh provider didn't correctly handle those invalid record types
and was panic'ing.
This change prevents the panic by converting such records to TXT
(which is what they are in fact), but also auto-corrects any SPF
or DKIM records to TXT ones.
2018-03-21 14:49:54 -04:00
Tom Limoncelli a7eba97ada
Refactor in preparation to unexport RecordConfig.{Name,NameFQDN,Target} (#337)
* Preparing for the unexport of Name/NameFQDN/Target
* Cleanups
2018-03-19 17:18:58 -04:00
Tom Limoncelli 2579336cdb GCLOUD: create-zones breaks if domain starts with digit 2018-03-09 07:01:13 -05:00
Koen Vlaswinkel afa80c24bd LINODE: Fix Linode provider (#333) 2018-03-08 13:48:11 -05:00
domelu 8db97d1132 BUG: ROUTE53 crashes if traffic flow policy records exist (#330)
* skip traffic policy records
2018-03-08 11:59:40 -05:00
Brice Figureau 2d7a48950c Fix 312 - rewrite IGNORE to use GetLabel (#331)
As discussed after the refactor to generalize the use of `GetLabel`,
this change makes IGNORE also use `GetLabel`.
2018-03-08 09:43:54 -05:00
Philipp Hug dfd015e5cd NEW REGISTRAR: OpenSRS (#275)
* Initial commit for OpenSRS registrar support #272
* sort existing name servers before comparing.
* vendor philhug/opensrs-go
* Update docs for OpenSRS #272
* Cache OpenSRS client to prevent http connection leak
* run go fmt
2018-03-04 23:07:22 -05:00
Tom Limoncelli 20f0c984e4
GCLOUD: Differentiate two modules name dns (#328)
* fix import
2018-03-01 10:20:34 -05:00
Craig Peterson 19ca760072 fix for deleting wildcard from r53. includes failing integration test 2018-03-01 10:09:02 -05:00
Tom Limoncelli 54de1ff698
NEW PROVIDER: OctoDNS (#309)
* govendor gopkg.in/yaml.v2
* Ignore YAML and BIND test data litter.  Create README.txt files to force git to create subdirectories.
* Update convertzone to also read OctoDNS files
2018-02-27 17:36:47 -05:00
Tom Limoncelli 32a481b85f
BUG: dnssimple URL broke during refactor (#325) 2018-02-27 16:50:34 -05:00
Tom Limoncelli e266e953d9
Fix DNSimple crashes on Alias: (#322)
* Fix https://github.com/StackExchange/dnscontrol/issues/321
2018-02-27 09:38:39 -05:00
Tom Limoncelli 1097c96fcc
New Provider: GANDI-LIVEDNS (API v5) (#320)
* Add gandi LiveDNS api provider
* vendor testify and gandi live DNS
* govendor update github.com/prasmussen/gandi-api/{client,live_dns}
* Fix Gandi-livedns TXT unit test
* TravisCI should use go 1.10
2018-02-24 13:40:18 -05:00
Tom Limoncelli 86914b0696 Fix broken test 2018-02-24 13:03:31 -05:00
Tom Limoncelli de4455942b
Refactor RecordConfig: Add getters/setters (#314)
* Replace RecordConfig.Name and .NameFQDN with getters and setters.
* Replace RecordConfig.Target with getters and setters.
* Eliminate the CombinedTarget concept.
* Add RecordConfig.PopulateFromString to reduce code in all providers.
* encode and decode name.com txt records (#315)
* Replace fmt.Errorf with errors.Errorf
2018-02-15 12:02:50 -05:00
Tom Limoncelli 4b1dc82c9b
Switch from fmt.Error* to errors.Error* (#317) 2018-02-05 16:17:20 -05:00
Craig Peterson 7a4dca5ad5 Refactor: Prelink providers to domains (#305) 2018-02-01 11:45:53 -05:00
Brice Figureau b7c6efaa53 Make IGNORE work with all providers (#313)
the `differ.matchIgnored` function was comparing only with the `Name`
field of `RecordConfig`.

Most providers don't set `RecordConfig.Name`, only `RecordConfig.NameFQDN`
and for those `IGNORE` doesn't work at all.

This patch converts `IGNORE` to use `NameFQDN` instead since it seems
all providers provides it.
2018-02-01 10:32:38 -05:00
Brice Figureau 4c80526860 Fix R53_ALIAS not being registered as custom type (#310) (#311)
Apparently I've forgot to register the R53_ALIAS custom record
type, thus preventing to use R53_ALIAS in a js file.
The integration still worked fine because they probably don't run
the validation.
2018-02-01 07:39:11 -05:00
Pat Moroney d5adb3faf6 trim trailing '.' from FQDN (#307) 2018-01-24 18:41:10 -05:00
Brice Figureau 7b8d608019 ROUTE53: Support Route53's ALIAS record type (#239) (#301)
* Stable comparison of metadata (#239)

Iterating over a map in Go never produces twice the same ordering.
Thus when comparing two metadata map with more than one key, the
`differ` is always finding differences.

To properly compare records metadata, we need to iterate the maps
in a deterministic way.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>

* Support for Route53 ALIAS record type (#239)

Route53 ALIAS doesn't behave like a regular ALIAS, and is much more
limited as its target can only be some specific AWS resources or
another record in the same zone.

According to #239, this change adds a new directive R53_ALIAS which
implements this specific alias. This record type can only be used
with the Route53 provider.

This directive usage looks like this:
```js
D("example.com", REGISTRAR, DnsProvider("ROUTE53"),
R53_ALIAS("foo1", "A", "bar") // record in same zone
R53_ALIAS("foo2", "A",
  "blahblah.elasticloadbalancing.us-west-1.amazonaws.com",
   R53_ZONE('Z368ELLRRE2KJ0')) // ELB in us-west-1

```

Unfortunately, Route53 requires indicating the hosted zone id
where the target is defined (those are listed in AWS documentation,
see the R53_ALIAS documentation for links).
2018-01-16 05:53:12 -05:00
Brice Figureau 2fc55dfdc4 Add IGNORE(label) which ignores label at the provider (#183) (#300)
* Add support for the IGNORE(name) directive (#183)

IGNORE is like NO_PURGE but for a spefic record instead of the whole
zone. This is very useful for instance if you have a zone where
only some records are managed externally from dnscontrol (for instance
using kubernetes external dns system).

Adding IGNORE("foo") in the zone will make dnscontrol not trying
to manage the "foo" record (and especially not deleting it).
dnscontrol will error out if the "foo" record is both ignored and
managed in dnscontrol.

This can be seen as a generic Cloudflare's ignored label.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>

* Deprecate CloudFlare ignoredLabels in favor of IGNORE (#183)

Since IGNORE implements a generic `ignoredLabels` system, let
the user know CF `ignoredLabels` are deprecated.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>
2018-01-15 15:39:29 -05:00
Pat Moroney 91e2cf67ef NAMEDOTCOM: add TXTMulti capability (#299)
* add TXTMulti capability to the namedotcom provider
* run go generate
* escape multi txt records before sending to the API
2018-01-11 07:23:59 -05:00
Tom Limoncelli c4ec6c8246 Add TXTMulti to the feature matrix.
* Add TXTMulti to the feature matrix.
* Sort the features alphabetically.
2018-01-10 17:06:15 -05:00
Pat Moroney 716cc0843a Namecom v4 api (#298)
* new Name.com api version and go client library
* vendor github.com/namedotcom/go/namecom
2018-01-10 16:49:20 -05:00
Tom Limoncelli b7c251190f
Vet and Lint the entire system (#296)
* govet and golint corrections
2018-01-09 12:53:16 -05:00
Tom Limoncelli de88bfe8b7
Add support for TXT records with multiple strings (BIND, ROUTE53) (#293)
* BIND: Support TXT records with multiple strings (#289)
* ROUTE53: Add support for TXT records with multiple strings (#292)
2018-01-04 19:19:35 -05:00
Tom Limoncelli a0f14e5981
GANDI: Add support for CAA rtype (#288)
* GANDI: Add support for CAA rtype
2017-12-22 07:10:29 -05:00
Tom Limoncelli 48de548826 docs: Improve comments related to capabilities. (#287) 2017-12-21 09:43:21 -05:00
Tom Limoncelli 611a597ae0
CLOUDFLARE: Support CAA rtype (#285)
* Add CAA support to cloudflare
2017-12-20 10:25:23 -05:00
Tom Limoncelli ed2b34d473 Fix https://github.com/StackExchange/dnscontrol/issues/284 2017-12-17 11:59:02 -05:00
Tom Limoncelli a77f89ca72 Clean "go vet" issue in providers/cloudflare/preprocess_test.go 2017-12-09 07:14:09 -05:00
Daniel Schmitz f5bfcd0d6e NS1: Add SRV record support (#277)
* NS1 SRV record support
* Updated feature matrix
2017-11-29 07:57:35 -05:00
Philipp Hug 53b72f39a8 GANDI: Registrar support (#274)
* GANDI: add registrar support for changing nameservers. #87

* Update docs with Gandi registrar support #87

* Updated dependencies for Gandi Registrar Support #87
2017-11-27 13:04:24 -05:00
Craig Peterson ccf28349ce
Update aws libs and remove waiter (#276)
* update r53 library. Remove waiter code

* live update provider request section

* remove debug
2017-11-27 10:22:08 -05:00
Tom Limoncelli 2d51cd57ed
NS1: TXT records are broken if they contain spaces (#270)
* Integration tests: Add simple TXT tests.
* NS1: Fix bug in TXT record handling.
2017-11-20 08:53:44 -05:00
Koen Vlaswinkel 9a44e785ac New provider: Linode (#268) 2017-11-14 23:08:06 -05:00
Tom Limoncelli abcdc21701
Update github.com/miekg/dns and fix tests that broke as a result. (#265) 2017-11-10 11:48:29 -08:00
Brice Figureau e44dde52e2 New Provider: OVH DNS Provider (#143) (#175)
* OVH DNS Provider (#143)

This adds the OVH Provider along with its documentation.

Unfortunately we can't set this DNS provider to support `CanUsePTR`,
because OVH only supports setting PTR target on the Arpa zone.

* OVH Registrar provider (#143)

This implements OVH as a registrar provider.
Note that NS modifications are done in a "best effort" mode, as the
provider doesn't wait for the modifications to be fully applied
(the operation that can take a long time).

* Allow support for dual providers scenarios

Since OVH released their APIv6, it is now possible to update
zone apex NS records, opening the door to complete dual providers
scenarii.

This change implements apex NS management in an OVH zone.
2017-11-10 11:02:34 -08:00
Craig Peterson acec77d832 a little bit of debugging 2017-11-08 10:25:10 -05:00
Tom Limoncelli e7472f76f3 Downcase DNS names (#253)
* Downcase DNS names
* Document opinions
2017-11-07 14:12:17 -08:00
Tom Limoncelli f4396b2548
Rename source files that don't match the name/nameProvider.go standard. (#261) 2017-11-07 12:54:28 -08:00
Tom Limoncelli b409637332 Revert! 2017-10-25 12:11:51 -04:00
Tom Limoncelli 2a98e29eb0 wip! 2017-10-25 11:52:54 -04:00
Craig Peterson 60ed1a2e0b Namecheap: switch throttling to only as needed. (#244)
* refactor namecheap to throttle only as needed

* note about srv records

* no it can't

* fmt
2017-10-24 09:41:59 -04:00
rbelnap eafc18a77e add initial URL support to namecheap provider (#237)
* add initial URL support to namecheap provider

* add URL / FRAME records to namecheap provider
2017-10-23 12:54:31 -04:00