From 460d917774c0def18e9ca9a576131f5d3214396b Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Wed, 17 Apr 2019 11:34:02 -0400 Subject: [PATCH 1/2] NAMEDOTCOM: Improve docs about errors related to typos (#465) * named.com.md: Improve headings --- docs/_providers/name.com.md | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/docs/_providers/name.com.md b/docs/_providers/name.com.md index b2e0e4910..1728349f9 100644 --- a/docs/_providers/name.com.md +++ b/docs/_providers/name.com.md @@ -58,21 +58,40 @@ D("example.tld", REG_NAMECOM, DnsProvider(R53), ## Activation In order to activate API functionality on your Name.com account, you must apply to the API program. The application form is [located here](https://www.name.com/reseller/apply). It usually takes a few days to get a response. After you are accepted, you should receive your API token via email. -## Tips: +## Tips and error messages -When running integration tests, this error: +### invalid character '<' ``` integration_test.go:140: api returned unexpected response: invalid character '<' looking for beginning of value ``` -Means you are setting `export NAMEDOTCOM_URL='api.name.com/api'` and need to remove the `/api`. +This error means an invalid URL is being used to reach the API +endpoint. It usually means a setting is `api.name.com/api` when +`api.name.com` is correct (i.e. remove the `/api`). + +In integration tests: + + * Wrong: `export NAMEDOTCOM_URL='api.name.com/api'` + * Right: `export NAMEDOTCOM_URL='api.name.com'` + +In production, the `apiurl` setting in creds.json is wrong. You can +simply leave this option out and use the default, which is correct. + +TODO(tlim): Improve the error message. (Volunteer needed!) -When running integration tests, this error: +### dial tcp: lookup https: no such host ``` integration_test.go:81: Failed getting nameservers Get https://https//api.name.com/api/v4/domains/stackosphere.com?: dial tcp: lookup https: no such host ``` -It means you included the `https://` in the `NAMEDOTCOM_URL` variable. You meant to do something like `export NAMEDOTCOM_URL='api.name.com' instead. +When running integration tests, this error +means you included the `https://` in the `NAMEDOTCOM_URL` variable. +You meant to do something like `export NAMEDOTCOM_URL='api.name.com' instead. + +In production, the `apiurl` setting in creds.json needs to be +adjusted. You can simply leave this option out and use the default, +which is correct. If you are using the EO&T system, leave the +protocol (`http://`) off the URL. From 0fbaf926836865d5867562705337902faa500581 Mon Sep 17 00:00:00 2001 From: karlism Date: Wed, 17 Apr 2019 17:57:17 +0200 Subject: [PATCH 2/2] Add NAPTR support. (#461) * Fix NAPTR record support. * Set NAPTR record to FQDN. * Remove swap file and comments. * Fix integration test. --- build/generate/featureMatrix.go | 2 + integrationTest/integration_test.go | 29 ++++- models/domain.go | 2 +- models/record.go | 15 ++- models/t_naptr.go | 49 ++++++++ models/t_parse.go | 2 + models/target.go | 2 + pkg/js/helpers.js | 22 ++++ pkg/js/parse_tests/023-naptr.js | 4 + pkg/js/parse_tests/023-naptr.json | 31 +++++ pkg/js/static.go | 171 ++++++++++++++-------------- pkg/normalize/validate.go | 7 +- providers/bind/bindProvider.go | 3 + providers/capabilities.go | 3 + 14 files changed, 253 insertions(+), 89 deletions(-) create mode 100644 models/t_naptr.go create mode 100644 pkg/js/parse_tests/023-naptr.js create mode 100644 pkg/js/parse_tests/023-naptr.json diff --git a/build/generate/featureMatrix.go b/build/generate/featureMatrix.go index a63bd6ec4..ff5ff3705 100644 --- a/build/generate/featureMatrix.go +++ b/build/generate/featureMatrix.go @@ -32,6 +32,7 @@ func generateFeatureMatrix() error { {"ALIAS", "Provider supports some kind of ALIAS, ANAME or flattened CNAME record type"}, {"CAA", "Provider can manage CAA records"}, {"PTR", "Provider supports adding PTR records for reverse lookup zones"}, + {"NAPTR", "Provider can manage NAPTR records"}, {"SRV", "Driver has explicitly implemented SRV record management"}, {"SSHFP", "Provider can manage SSHFP records"}, {"TLSA", "Provider can manage TLSA records"}, @@ -74,6 +75,7 @@ func generateFeatureMatrix() error { setCap("ALIAS", providers.CanUseAlias) setCap("CAA", providers.CanUseCAA) setCap("PTR", providers.CanUsePTR) + setCap("NAPTR", providers.CanUseNAPTR) setCap("SRV", providers.CanUseSRV) setCap("SSHFP", providers.CanUseSSHFP) setCap("TLSA", providers.CanUseTLSA) diff --git a/integrationTest/integration_test.go b/integrationTest/integration_test.go index 5cbce9eea..399ba2133 100644 --- a/integrationTest/integration_test.go +++ b/integrationTest/integration_test.go @@ -254,6 +254,16 @@ func ptr(name, target string) *rec { return makeRec(name, target, "PTR") } +func naptr(name string, order uint16, preference uint16, flags string, service string, regexp string, target string) *rec { + r := makeRec(name, target, "NAPTR") + r.NaptrOrder = order + r.NaptrPreference = preference + r.NaptrFlags = flags + r.NaptrService = service + r.NaptrRegexp = regexp + return r +} + func srv(name string, priority, weight, port uint16, target string) *rec { r := makeRec(name, target, "SRV") r.SrvPriority = priority @@ -417,6 +427,23 @@ func makeTests(t *testing.T) []*TestCase { ) } + // NAPTR + if !providers.ProviderHasCabability(*providerToRun, providers.CanUseNAPTR) { + t.Log("Skipping NAPTR Tests because provider does not support them") + } else { + tests = append(tests, tc("Empty"), + tc("NAPTR record", naptr("test", 100, 10, "U", "E2U+sip", "!^.*$!sip:customer-service@example.com!", "example.foo.com.")), + tc("NAPTR second record", naptr("test", 102, 10, "U", "E2U+email", "!^.*$!mailto:information@example.com!", "example.foo.com.")), + tc("NAPTR delete record", naptr("test", 100, 10, "U", "E2U+email", "!^.*$!mailto:information@example.com!", "example.foo.com.")), + tc("NAPTR change target", naptr("test", 100, 10, "U", "E2U+email", "!^.*$!mailto:information@example.com!", "example2.foo.com.")), + tc("NAPTR change order", naptr("test", 103, 10, "U", "E2U+email", "!^.*$!mailto:information@example.com!", "example2.foo.com.")), + tc("NAPTR change preference", naptr("test", 103, 20, "U", "E2U+email", "!^.*$!mailto:information@example.com!", "example2.foo.com.")), + tc("NAPTR change flags", naptr("test", 103, 20, "A", "E2U+email", "!^.*$!mailto:information@example.com!", "example2.foo.com.")), + tc("NAPTR change service", naptr("test", 103, 20, "A", "E2U+sip", "!^.*$!mailto:information@example.com!", "example2.foo.com.")), + tc("NAPTR change regexp", naptr("test", 103, 20, "A", "E2U+sip", "!^.*$!sip:customer-service@example.com!", "example2.foo.com.")), + ) + } + // SRV if !providers.ProviderHasCabability(*providerToRun, providers.CanUseSRV) { t.Log("Skipping SRV Tests because provider does not support them") @@ -433,7 +460,7 @@ func makeTests(t *testing.T) []*TestCase { ) } - // SSHFP + // SSHFP if !providers.ProviderHasCabability(*providerToRun, providers.CanUseSSHFP) { t.Log("Skipping SSHFP Tests because provider does not support them") } else { diff --git a/models/domain.go b/models/domain.go index 0af8a493c..ad20b23f0 100644 --- a/models/domain.go +++ b/models/domain.go @@ -87,7 +87,7 @@ func (dc *DomainConfig) Punycode() error { if err != nil { return err } - case "A", "AAAA", "CAA", "SSHFP", "TXT", "TLSA": + case "A", "AAAA", "CAA", "NAPTR", "SSHFP", "TXT", "TLSA": // Nothing to do. default: msg := fmt.Sprintf("Punycode rtype %v unimplemented", rec.Type) diff --git a/models/record.go b/models/record.go index be463ae04..cff9ab26a 100644 --- a/models/record.go +++ b/models/record.go @@ -21,6 +21,7 @@ import ( // MX // NS // PTR +// NAPTR // SRV // SSHFP // TLSA @@ -75,6 +76,11 @@ type RecordConfig struct { SrvPort uint16 `json:"srvport,omitempty"` CaaTag string `json:"caatag,omitempty"` CaaFlag uint8 `json:"caaflag,omitempty"` + NaptrOrder uint16 `json:"naptrorder,omitempty"` + NaptrPreference uint16 `json:"naptrpreference,omitempty"` + NaptrFlags string `json:"naptrflags,omitempty"` + NaptrService string `json:"naptrservice,omitempty"` + NaptrRegexp string `json:"naptrregexp,omitempty"` SshfpAlgorithm uint8 `json:"sshfpalgorithm,omitempty"` SshfpFingerprint uint8 `json:"sshfpfingerprint,omitempty"` TlsaUsage uint8 `json:"tlsausage,omitempty"` @@ -201,6 +207,13 @@ func (rc *RecordConfig) ToRR() dns.RR { rr.(*dns.CNAME).Target = rc.GetTargetField() case dns.TypePTR: rr.(*dns.PTR).Ptr = rc.GetTargetField() + case dns.TypeNAPTR: + rr.(*dns.NAPTR).Order = rc.NaptrOrder + rr.(*dns.NAPTR).Preference = rc.NaptrPreference + rr.(*dns.NAPTR).Flags = rc.NaptrFlags + rr.(*dns.NAPTR).Service = rc.NaptrService + rr.(*dns.NAPTR).Regexp = rc.NaptrRegexp + rr.(*dns.NAPTR).Replacement = rc.GetTargetField() case dns.TypeMX: rr.(*dns.MX).Preference = rc.MxPreference rr.(*dns.MX).Mx = rc.GetTargetField() @@ -300,7 +313,7 @@ func downcase(recs []*RecordConfig) { r.Name = strings.ToLower(r.Name) r.NameFQDN = strings.ToLower(r.NameFQDN) switch r.Type { // #rtype_variations - case "ANAME", "CNAME", "MX", "NS", "PTR", "SRV": + case "ANAME", "CNAME", "MX", "NS", "PTR", "NAPTR", "SRV": // These record types have a target that is case insensitive, so we downcase it. r.Target = strings.ToLower(r.Target) case "A", "AAAA", "ALIAS", "CAA", "IMPORT_TRANSFORM", "TLSA", "TXT", "SOA", "SSHFP", "CF_REDIRECT", "CF_TEMP_REDIRECT": diff --git a/models/t_naptr.go b/models/t_naptr.go new file mode 100644 index 000000000..f17f265ef --- /dev/null +++ b/models/t_naptr.go @@ -0,0 +1,49 @@ +package models + +import ( + "strconv" + "strings" + + "github.com/pkg/errors" +) + +// SetTargetNAPTR sets the NAPTR fields. +func (rc *RecordConfig) SetTargetNAPTR(order uint16, preference uint16, flags string, service string, regexp string, target string) error { + rc.NaptrOrder = order + rc.NaptrPreference = preference + rc.NaptrFlags = flags + rc.NaptrService = service + rc.NaptrRegexp = regexp + rc.SetTarget(target) + + if rc.Type == "" { + rc.Type = "NAPTR" + } + if rc.Type != "NAPTR" { + panic("assertion failed: SetTargetNAPTR called when .Type is not NAPTR") + } + + return nil +} + +// SetTargetNAPTRStrings is like SetTargetNAPTR but accepts strings. +func (rc *RecordConfig) SetTargetNAPTRStrings(order, preference, flags string, service string, regexp string, target string) error { + i64order, err := strconv.ParseUint(order, 10, 16) + if err != nil { + return errors.Wrap(err, "NAPTR order does not fit in 16 bits") + } + i64preference, err := strconv.ParseUint(preference, 10, 16) + if err != nil { + return errors.Wrap(err, "NAPTR preference does not fit in 16 bits") + } + return rc.SetTargetNAPTR(uint16(i64order), uint16(i64preference), flags, service, regexp, target) +} + +// SetTargetNAPTRString is like SetTargetNAPTR but accepts one big string. +func (rc *RecordConfig) SetTargetNAPTRString(s string) error { + part := strings.Fields(s) + if len(part) != 6 { + return errors.Errorf("NAPTR value does not contain 6 fields: (%#v)", s) + } + return rc.SetTargetNAPTRStrings(part[0], part[1], part[2], part[3], part[4], StripQuotes(part[5])) +} diff --git a/models/t_parse.go b/models/t_parse.go index 1d89265f6..0f3f5d9db 100644 --- a/models/t_parse.go +++ b/models/t_parse.go @@ -38,6 +38,8 @@ func (r *RecordConfig) PopulateFromString(rtype, contents, origin string) error return r.SetTarget(contents) case "CAA": return r.SetTargetCAAString(contents) + case "NAPTR": + return r.SetTargetNAPTRString(contents) case "MX": return r.SetTargetMXString(contents) case "SRV": diff --git a/models/target.go b/models/target.go index be2afd762..9e46a9552 100644 --- a/models/target.go +++ b/models/target.go @@ -77,6 +77,8 @@ func (rc *RecordConfig) GetTargetDebug() string { switch rc.Type { // #rtype_variations case "A", "AAAA", "CNAME", "NS", "PTR", "TXT": // Nothing special. + case "NAPTR": + content += fmt.Sprintf(" naptrorder=%d naptrpreference=%d naptrflags=%s naptrservice=%s naptrregexp=%s", rc.NaptrOrder, rc.NaptrPreference, rc.NaptrFlags, rc.NaptrService, rc.NaptrRegexp) case "MX": content += fmt.Sprintf(" pref=%d", rc.MxPreference) case "SOA": diff --git a/pkg/js/helpers.js b/pkg/js/helpers.js index 1cc2ef412..3961068f6 100644 --- a/pkg/js/helpers.js +++ b/pkg/js/helpers.js @@ -217,6 +217,28 @@ var CNAME = recordBuilder('CNAME'); // PTR(name,target, recordModifiers...) var PTR = recordBuilder('PTR'); +// NAPTR(name,order,preference,flags,service,regexp,target, recordModifiers...) +var NAPTR = recordBuilder('NAPTR', { + args: [ + ['name', _.isString], + ['order', _.isNumber], + ['preference', _.isNumber], + ['flags', _.isString], + ['service', _.isString], + ['regexp', _.isString], + ['target', _.isString], + ], + transform: function(record, args, modifiers) { + record.name = args.name; + record.naptrorder = args.order; + record.naptrpreference = args.preference; + record.naptrflags = args.flags; + record.naptrservice = args.service; + record.naptrregexp = args.regexp; + record.target = args.target; + }, +}); + // SRV(name,priority,weight,port,target, recordModifiers...) var SRV = recordBuilder('SRV', { args: [ diff --git a/pkg/js/parse_tests/023-naptr.js b/pkg/js/parse_tests/023-naptr.js new file mode 100644 index 000000000..fa2a8828d --- /dev/null +++ b/pkg/js/parse_tests/023-naptr.js @@ -0,0 +1,4 @@ +D("foo.com","none", + NAPTR("foo.com",100,10,"U","E2U+sip","!^.*$!sip:customer-service@example.com!","example"), + NAPTR("foo.com",102,10,"U","E2U+email","!^.*$!mailto:information@example.com!","example") +); diff --git a/pkg/js/parse_tests/023-naptr.json b/pkg/js/parse_tests/023-naptr.json new file mode 100644 index 000000000..6dd26e833 --- /dev/null +++ b/pkg/js/parse_tests/023-naptr.json @@ -0,0 +1,31 @@ +{ + "registrars": [], + "dns_providers": [], + "domains": [ + { + "name": "foo.com", + "registrar": "none", + "dnsProviders": {}, + "records": [ + { + "type": "NAPTR", + "order": 100, + "preference": 10, + "flags": "U", + "service": "E2U+sip", + "regexp": "!^.*$!sip:customer-service@example.com!", + "target": "example" + }, + { + "type": "NAPTR", + "order": 102, + "preference": 10, + "flags": "U", + "service": "E2U+email", + "regexp": "!^.*$!mailto:information@example.com!", + "target": "example" + } + ] + } + ] +} diff --git a/pkg/js/static.go b/pkg/js/static.go index 79c9dd4a4..c14c82be7 100644 --- a/pkg/js/static.go +++ b/pkg/js/static.go @@ -192,92 +192,95 @@ var _escData = map[string]*_escFile{ "/helpers.js": { local: "pkg/js/helpers.js", - size: 18516, + size: 19673, modtime: 0, compressed: ` -H4sIAAAAAAAC/+w8a3fbtpLf/SumOXtLMWboV53eI1fdqn50ferXkZXe3NVqdWARkhBTJBcApaip89v3 -4EUCfMhuTtv75eZDIgKDwcxgMDMYDOLlDAPjlEy5d7Kzs0IUpmkygx582gEAoHhOGKeIsi6MxoFsixI2 -yWi6IhF2mtMlIkmtYZKgJdatT3qKCM9QHvM+nTPowWh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TJLC+iZ4kxBw22R9t0HzN1K89JC5lU57P/5Bo8uYpEgLTPgwhJVxf9td3+E1/AyD9Q2X8HLG3GDtt +sLS8f/4ZnNcqdXnYvDweuJNZJvyQgBQjLuAQcIpVhqERi5gRjWDdhGvZ7Cp6oyNDm2Y3hjay05ShDc/n +ZVdtmXWCVlXeLHEpOUfy2nbrTXGuU70WWjpW59xG6gFWjk3t66QTHX8YV6dpcjhFgk35GFGa6oEgLBFX +WuSrjY00z+d2NgldyA2hFDLmAicRLDDFTP8sSDW6s1FFmxpSK0JNksErN1JeQ5UC3Pd+v6PsMKjBt5R+ +MB37jz+Me+XMREYmVXWFw6QN8CWLPMczaQGTyMQ5egVJJuo82G4+oQq8JNPC1Ef9cbv4/Ck3k1pnS+mp +ZSyCPKydKTAbtN4qkhCc/P380lbOlr/v8+fDt9/D/YPA3o+1/P38sodYeTt1tizop1vyL2n/D9++rX4m +YdRZ0RVBqqYLMeblClNM5cPuoEJaZf9HNjfIYp6SGe6RSMI6oP52biRZ/L8AAAD//70krOfZTAAA `, }, diff --git a/pkg/normalize/validate.go b/pkg/normalize/validate.go index a25986c21..21e5c0efd 100644 --- a/pkg/normalize/validate.go +++ b/pkg/normalize/validate.go @@ -62,6 +62,7 @@ func validateRecordTypes(rec *models.RecordConfig, domain string, pTypes []strin "TXT": true, "NS": true, "PTR": true, + "NAPTR": true, "ALIAS": false, } _, ok := validTypes[rec.Type] @@ -170,6 +171,8 @@ func checkTargets(rec *models.RecordConfig, domain string) (errs []error) { } case "PTR": check(checkTarget(target)) + case "NAPTR": + check(checkTarget(target)) case "ALIAS": check(checkTarget(target)) case "SRV": @@ -231,7 +234,7 @@ func importTransform(srcDomain, dstDomain *models.DomainConfig, transforms []tra r := newRec() r.SetTarget(transformCNAME(r.GetTargetField(), srcDomain.Name, dstDomain.Name)) dstDomain.Records = append(dstDomain.Records, r) - case "MX", "NS", "SRV", "TXT", "CAA", "TLSA": + case "MX", "NAPTR", "NS", "SRV", "TXT", "CAA", "TLSA": // Not imported. continue default: @@ -299,7 +302,7 @@ func NormalizeAndValidateConfig(config *models.DNSConfig) (errs []error) { } // Canonicalize Targets. - if rec.Type == "CNAME" || rec.Type == "MX" || rec.Type == "NS" || rec.Type == "SRV" { + if rec.Type == "CNAME" || rec.Type == "MX" || rec.Type == "NAPTR" || rec.Type == "NS" || rec.Type == "SRV" { // #rtype_variations // These record types have a target that is a hostname. // We normalize them to a FQDN so there is less variation to handle. If a diff --git a/providers/bind/bindProvider.go b/providers/bind/bindProvider.go index 703df9eab..ee6a130e5 100644 --- a/providers/bind/bindProvider.go +++ b/providers/bind/bindProvider.go @@ -33,6 +33,7 @@ import ( var features = providers.DocumentationNotes{ providers.CanUseCAA: providers.Can(), providers.CanUsePTR: providers.Can(), + providers.CanUseNAPTR: providers.Can(), providers.CanUseSRV: providers.Can(), providers.CanUseSSHFP: providers.Can(), providers.CanUseTLSA: providers.Can(), @@ -120,6 +121,8 @@ func rrToRecord(rr dns.RR, origin string, replaceSerial uint32) (models.RecordCo panicInvalid(rc.SetTarget(v.Ns)) case *dns.PTR: panicInvalid(rc.SetTarget(v.Ptr)) + case *dns.NAPTR: + panicInvalid(rc.SetTargetNAPTR(v.Order, v.Preference, v.Flags, v.Service, v.Regexp, v.Replacement)) case *dns.SOA: oldSerial = v.Serial if oldSerial == 0 { diff --git a/providers/capabilities.go b/providers/capabilities.go index 41d8563fb..09f2202a2 100644 --- a/providers/capabilities.go +++ b/providers/capabilities.go @@ -19,6 +19,9 @@ const ( // CanUsePTR indicates the provider can handle PTR records CanUsePTR + // CanUseNAPTR indicates the provider can handle PTR records + CanUseNAPTR + // CanUseSRV indicates the provider can handle SRV records CanUseSRV