Commit graph

64 commits

Author SHA1 Message Date
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
2e8c4a758f
Let's Encrypt Certificate Generation (#327)
* Manual rebase of get-certs branch

* fix endpoints, add verbose flag

* more stable pre-check behaviour

* start of docs

* docs for get-certs

* don't require cert for dnscontrol

* fix up directory paths

* small doc tweaks
2018-04-26 13:11:13 -04:00
Craig Peterson
558aea906a make bonfire notifications multiple posts for markdown compatibility 2018-03-28 10:00:05 -04:00
Craig Peterson
2a7b382767 Better validate NAMESERVER format. (#350)
* remove misleading ip field we don't touch
2018-03-22 11:52:52 -04:00
Brice Figureau
899100b7b3 Add again setting LabelFQDN in NormalizeAndValidateConfig (#342)
This is to prevent all labels to get erased by the empty LabelFQDN
during calls to `PunyCode`, until a better fix is found.
2018-03-22 09:29:55 -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
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
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
324b1ea930 UPdate static.go 2018-02-09 14:04:07 -05:00
Ismael Peral
06404fdcf9 Fix CAA Support: helpers.js CAA_CRITICAL flag=128 (#318) (#319)
* Update helpers.js CAA_CRITICAL flag=128 (#318)

CAA flag "Issuer Critical Flag" sets first bit (bit 0) to 1 where bit 0 is the 8th bit in the flag, so it's doing the change by left shift 7 positions the value 1.

* Change caa tests

Apply changes for Travis-CI, now caaflag must be 128 instead of 1.

* generated static.go and matrix.html
2018-02-09 14:03:40 -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
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
Craig Peterson
0b329bf0ee add emphasis 2018-01-11 12:44:52 -05:00
Craig Peterson
9dbd4a3066
Simple notification framework (#297)
* bonfire notifications working

* make interface to make more extensible

* some docs

* typo

* rename typo
2018-01-11 11:15:19 -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
1a91a7f536 go generate 2018-01-06 15:13:57 -05:00
Tom Limoncelli
2dd9049582 helpders.js: Run prettier. 2018-01-06 15:13:22 -05:00
Tom Limoncelli
a03c8f19e8
Add syntax for very long DKIM strings (#295)
* Add DKIM() function to split long strings.
* Add parse_test for DKIM()
2018-01-04 21:17:08 -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
21e4cb4fc3 go generate && add more RelEng docs. 2017-12-06 17:03:07 -05:00
Tom Limoncelli
d8e22b4e2c
pkg/js/helpers.js: Prettier. (#280) 2017-12-06 15:56:57 -05:00
Tom Limoncelli
c6e244d8da
Productionize the SPF optimizer (#279)
* Productionize the SPF optimizer
* SPF_BUILDER(): New helper function
* docs/spf-optimizer.md: Document SPF_BUILDER()
2017-12-06 15:50:21 -05:00
Pat Moroney
106790b0d5 throw an error if a domain name is declared more than once (#247)
* throw an error if a domain name is declared more than once in the js file
2017-11-14 23:14:45 -05:00
Craig Peterson
2ef1fc42f8 New validation check: Labels should not be FQDNs (#264) 2017-11-14 23:13:50 -05:00
Koen Vlaswinkel
25df50634d Add _acme-challenge as an allowed record name (#267) 2017-11-14 06:56:15 -08:00
Tom Limoncelli
e7472f76f3 Downcase DNS names (#253)
* Downcase DNS names
* Document opinions
2017-11-07 14:12:17 -08: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
Craig Peterson
373b4e4b83 better error message, actually clear unused cached lookups. 2017-10-02 12:31:30 -04:00
Craig Peterson
823e8bb1a3 Add SPF flattening feature. (#126) 2017-09-29 15:30:36 -04:00
Craig Peterson
e4ad084494 update some dependencies (#208)
* update some dependencies

* some more

* add these

* remove things?

* regen
2017-09-18 15:35:10 -04:00
Manatsawin Hanmongkolchai
4bffc37d15 Format helpers.js (#205)
* Format helpers.js with prettier

* Adding docs on how to run prettier
2017-09-15 13:12:09 -04:00
Craig Peterson
a520a24628 add some backslash parse tests 2017-09-15 10:29:28 -04:00
eliheady
4aac517d62 Add TLSA record support (#165) (#203) 2017-09-15 09:03:29 -04:00
Craig Peterson
1d9d2b1a19 Refactor to use better cli command framework (#177)
* starting to refactor commands

* work

* not sure

* all commands working!

* actually add file

* work in delay flag again

* start to refactor out console printing

* i hate line endings

* simple travis test to find direct output

* remove all direct printing from push/preview

* checkin vendor

* don't need this yet

* forgot to commit these

* make version explicit command

* some code review

* Add "check" subcommand.

* move stuff to commands package

* fix

* comment out check for printlns. for now

* alphabet hax

* activedir flags gone. use creds instead

* active dir doc update

* remove bind specific flags. creds instead

* default to zones dir

* fix linux build

* fix test

* cleanup random global* vars

* Clean up PowerShell docs

* rename dump-ir to print-ir. combine with print-js
2017-09-13 10:00:41 -04:00
Tom Limoncelli
fba8b3ee0c go generate 2017-09-11 20:16:53 -04:00
Tom Limoncelli
e15b28c3b6 ROUTE53: Fix broken integration test. 2017-09-08 17:13:59 -04:00
Tom Limoncelli
5cf482e8e8 Clarify "must end with a (.)" error message. 2017-08-18 15:50:55 -04:00
Tom Limoncelli
2534c8eaf2 Ban NO_PURGE when using BIND and others. (#180) 2017-08-11 15:43:06 -04:00
Manatsawin Hanmongkolchai
73962470bc Refactor addRecord to recordBuilder (#157) (#163)
* helpers.js: Refactor addRecord to recordBuilder

* Fixed failing dns test

* helpers.js: Fixed a typo in SRV handling

* helpers.js: Move type to top level argument

* Removed support for numeric modifiers

* helpers.js: Added IMPORT_TRANSFORM ttl argument back
2017-08-11 14:48:43 -04:00
Tom Limoncelli
2cbabd859b Make it easier to add new Rtypes. (#169)
* NEW: docs/adding-new-rtypes.md
* Mark all "if" and "switch" statements with `#rtype_variations`
* Make consistent use of `default: panic()`
2017-08-04 12:26:29 -07:00
Tom Limoncelli
2f0f5330fc Add CAA support (#161)
* Added CAA support

* Fixed bind parsing of CAA records

* Added CAA parsing test

* Renamed CAA json fields

* Added CAA tag validation

* Updated CAA docs to clarify on the value field

* parse_tests: Fixed typo in caaflags

* Added integration test

* Small cleanups
2017-07-25 14:59:40 -04:00
Craig Peterson
710d14b1a9 tests that would have caught tag renaming bug. js tests now don't marahsl expected through the go object. Instead minify both sides to compare 2017-07-20 17:41:15 -04:00
Craig Peterson
d106c88488 fix js field name 2017-07-20 17:20:47 -04:00
Tom Limoncelli
e6ce3b8895 Cleanup SRV testing
* Integration tests: PTR tests should only happen if CanUsePTR
* Integration tests: SRE tests should only happen if CanUseSRV
* CanUseSRV should be validated early (in pkg/normalize/validate.go)
* CLOUDFLARE does not support SRV. Check for this during validation
* GCLOUD CanUsesRV (mostly by accident, but whatever works)
2017-07-20 15:55:26 -04:00
Tom Limoncelli
d55b20ecdb Add SRV Record Type (#136)
* Add support for SRV records for NAMEDOTCOM and ROUTE53.
* Improve docs
* Rename RR() to ToRR().
* Rename RecordConfig Priority to MxPreference (affects json IR data)
2017-07-19 15:53:40 -04:00
Tom Limoncelli
e563c53658 PTR should handle "Classless in-addr.arpa delegation" RFC2317 (#149)
* Handle IPv4 "Classless in-addr.arpa delegation" RFC2317 (partial).
* Validate PTR name when in RFC2317 "Classless in-addr.arpa delegation" domains.
* Update docs
* Set CanUsePTR for Route53 and Google CloudDNS.
* BIND: Replace "/" with "_" in filenames.
2017-07-10 19:24:55 -04:00
Tom Limoncelli
582e5c2bb1 Make PTR more magical (#148)
* Initial code and tests
2017-07-07 13:59:29 -04:00
Craig Peterson
152892f62a generalize capability validation 2017-07-06 10:24:21 -04:00