Commit graph

250 commits

Author SHA1 Message Date
Dragos Harabor
68516025a5
FEATURE: Add rTypes restrictions to IGNORE_NAME ()
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-11-07 11:27:04 -05:00
Tom Limoncelli
61e500b7dc
DEV: Optimize integration tests () 2022-09-07 14:08:06 -04:00
Tom Limoncelli
8bb63be8f5
Add --verbose flag, default to less verbose output () 2022-08-20 20:59:02 -04:00
Tom Limoncelli
1010138fb6 gofmt -s -w 2022-08-14 20:49:57 -04:00
Tom Limoncelli
ccb582b278
CHORE: Linting ()
* Remove deprecated io/ioutil
* fixup!
* staticcheck and linting
* revert models/provider.go
* Fix imports to new style
* linting
2022-08-14 20:46:56 -04:00
Tom Limoncelli
cd61c2c766
CHORE: Remove deprecated io/ioutil ()
* Remove deprecated io/ioutil

* fixup!

* fixup!
2022-08-14 12:50:15 -04:00
Tom Limoncelli
31723ad146
PERFORMANCE: Refactor auditrecords.go to loop only once ()
* stash

* Use rejectif idea

* rename

* wip!

* Convert old systems to new

* fixup!

* fix typo
2022-08-11 17:24:47 -04:00
Tom Limoncelli
443b99aa59
CHORE: Remove duplicate ToDiff code () 2022-08-11 16:13:24 -04:00
Tom Limoncelli
0a6fa677f3
Fix broken test () 2022-08-08 10:30:21 -04:00
MisterErwin
7865e37c8f
Add RWTH provider ()
* Add RWTH provider

* fix Owners order

* Reorganize RWTH Provider

* Fix staticcheck and code style issues

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-08-04 14:40:27 -04:00
Jakob Ackermann
a00572af4a
Create zone before use ()
* preview/push: ensure zones exists before querying them

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* HETZNER: reset zone cache when creating a new zone

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* ROUTE53: reset zone cache when creating a new zone

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-08-01 14:44:17 -04:00
Amelia Aronsohn
befb52be86
DNSIMPLE: Fix TXT Handling, Second Edition ()
* Fix typo and add sandbox information

* Use SetTargetTXT in GetZoneRecords

This fixes the behavior documented in 

Also apply cleanup to GetZoneRecords

* Remove SetTargetTXT, does not work in all tests

* Set The most correct TXT handling

* Well, There's your problem

* Add an audit and test for unpaired quotes

* Add some commentary

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-07-22 09:36:28 -04:00
Tom Limoncelli
bcaa6b15cb
AuditRecords should report the provider name () 2022-07-18 12:59:22 -04:00
Tom Limoncelli
959f721c04
MAINT: Update TXT docs, suggest not using TxtNoLen255 ()
* suggest not using TxtNoLen255

* Rename functions

* wip!

* fixing!
2022-06-20 11:34:05 -04:00
Jan-Philipp Benecke
bcb968411a
MAINT: Unify provider outputs to pkg/printer ()
* Unify provider outputs to pkg/printer

Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>

* No need for custom Errorf

Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>

* Add missing import for activedir

Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>

* Add missing fmt import for activedir

Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>
2022-06-18 09:01:02 -04:00
Jan-Philipp Benecke
ba2c7f9c0e
MAINT: Enforcing formatted code ()
* Enforcing formatted code

Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>

* Show lines

Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>

* Run check after deps are installed

Signed-off-by: Jan-Philipp Benecke <jan-philipp@bnck.me>
2022-06-18 08:56:04 -04:00
Tom Limoncelli
752e25471d
NEW PROVIDER: CSCGLOBAL as DNS Service Provider ()
* Move the registrar features to a separate file

* Prepare the testing framework

* Roughed out functions

* Fix up structs

* WIP!

* First tests pass

* wip!

* Flesh out remaining rTypes, get nameservers, etc

* Fix TXT records

* Clean up code

* More cleanups. Fix CAA/SRV

* Linting

* Cleanups/linting

* Fix CAA [more] and more cleanups

* CSC does not like very long txt records

* Use timer only when interactive

* Disable CAA for now

* Update docs

* Remove debug printf

* add go-isatty

* cleanups
2022-06-12 16:01:08 -04:00
Jan-Philipp Benecke
cfa104858d
FEATURE: --creds can refer to a command line to execute in addition to a file or script ()
* Allow commands for creds file & refactoring

* Minor fix

* Add shell command ability to docs

Signed-off-by: Jan-Philipp Benecke <jan-philipp.benecke@jpbe.de>

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-06-06 14:37:45 -04:00
Tom Limoncelli
58b2704fde
BUG: With TYPE in creds.json, CAA compatibility check breaks () 2022-05-29 12:14:17 -04:00
Tom Limoncelli
997e1a0901
BUGFIX: Skip AuditRecords when running dnscontrol check ()
Fixes 1507
2022-05-23 13:27:53 -04:00
Tom Limoncelli
9e6d642e35
NEW FEATURE: Moving provider TYPE from dnsconfig.js to creds.json ()
Fixes https://github.com/StackExchange/dnscontrol/issues/1457

* New-style creds.json implememented backwards compatible

* Update tests

* Update docs

* Assume new-style TYPE
2022-05-08 14:23:45 -04:00
Costas Drogos
6e802f2257 Emit warning in case of label having multiple TTLs
An RRSet (=label) consisting of multiple records with different TTLs is
something not supported by most providers, and should be avoided.
Furthermore it is deprecated in rfc2181#section-5.2

Emit a warning for now during validation, eventually turning it into a full-blown error.

Fixes 
2022-05-04 11:20:27 -04:00
Costas Drogos
c8a5060dfb
Emit warning in case of label having multiple TTLs ()
* Emit warning in case of label having multiple TTLs

An RRSet (=label) consisting of multiple records with different TTLs is
something not supported by most providers, and should be avoided.
Furthermore it is deprecated in rfc2181#section-5.2

Emit a warning for now during validation, eventually turning it into a full-blown error.

Fixes 

* normalize: less verbose checkLabelHasMultipleTTLs

Code would previously emit a warning for each record it found matching a
previously found label but with a different ttl. This could potentially become
too verbose of an output for larger zones.

Split the loop into two loops, one storing labels and their records' TTLs, the
second checking for multiple TTLs, in order to minimize the messages logged to
one message per problematic label, regardless for the number of records involved.

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-05-04 08:41:16 -04:00
Costas Drogos
156ec01ea0
TESTING: pkg/js/parse_tests: fix a broken test ()
012_duration creates multiple records under the same label, with different TTLs
We plan to deprecate this going forward, in .

Modify the test in a way that creates one label per record, each having a
different TTL format as before, to be validated.
2022-05-03 19:46:48 -04:00
Tom Limoncelli
19550aeed9
Refactor: Rename providers/config to pkg/credsfile () 2022-05-02 20:12:30 -04:00
Tom Limoncelli
99210c9d1c
Make skip_fqdn_check error message easier to understand and fix () 2022-04-04 14:05:49 -04:00
Tom Limoncelli
91592ce4a7
MAINT: "DUPLICATE E_RECORD" no longer a hard error () 2022-03-25 12:09:24 -04:00
Tom Limoncelli
444b893e1b
MAINT: Sort various lists ()
* maint: sort lists in build/generate/featureMatrix.go

* maint: sort lists in docs/byo-secrets.md

* maint: sort lists in models/record.go

* maint: sort lists in pkg/normalize/validate.go

* maint: sort lists in providers/activedir/activedirProvider.go

* maint: sort lists in providers/akamaiedgedns/akamaiEdgeDnsProvider.go

* maint: sort lists in providers/axfrddns/axfrddnsProvider.go

* maint: sort lists in providers/azuredns/azureDnsProvider.go

* maint: sort lists in providers/cloudflare/cloudflareProvider.go

* maint: sort lists in providers/cloudns/cloudnsProvider.go

* maint: sort lists in providers/desec/desecProvider.go

* maint: sort lists in providers/digitalocean/digitaloceanProvider.go

* maint: sort lists in providers/dnsimple/dnsimpleProvider.go

* maint: sort lists in providers/dnsmadeeasy/dnsMadeEasyProvider.go

* maint: sort lists in providers/exoscale/exoscaleProvider.go

* maint: sort lists in providers/gandiv5/gandi_v5Provider.go

* maint: sort lists in providers/hedns/hednsProvider.go

* maint: sort lists in providers/hetzner/hetznerProvider.go

* maint: sort lists in providers/hexonet/hexonetProvider.go

* maint: sort lists in providers/inwx/inwxProvider.go

* maint: sort lists in providers/linode/linodeProvider.go

* maint: sort lists in providers/namecheap/namecheapProvider.go

* maint: sort lists in providers/namedotcom/namedotcomProvider.go

* maint: sort lists in providers/netcup/netcupProvider.go

* maint: sort lists in providers/ns1/ns1Provider.go

* maint: sort lists in providers/octodns/octodnsProvider.go

* maint: sort lists in providers/oracle/oracleProvider.go

* maint: sort lists in providers/ovh/ovhProvider.go

* maint: sort lists in providers/packetframe/packetframeProvider.go

* maint: sort lists in providers/powerdns/powerdnsProvider.go

* maint: sort lists in providers/route53/route53Provider.go

* maint: sort lists in providers/vultr/vultrProvider.go

* Update go:build pragmas for windows

* More sorting

* go generate
2022-03-02 11:19:15 -05:00
tpdn
fc75f89271
ClouDNS: Add CLOUDNS_WR (Web Redirects) ()
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-03-02 09:21:51 -05:00
Tom Limoncelli
886dbf6d00
MAINT: Make staticcheck more strict and fix new warnings ()
* Make staticcheck more strict and fix new warnings
2022-02-11 14:30:45 -05:00
Tom Limoncelli
f9c4887d95 Revert "Make staticcheck more strict and fix new warnings"
This reverts commit 5c456e2513.
2022-02-11 12:14:24 -05:00
Tom Limoncelli
a70354775e Make staticcheck more strict and fix new warnings 2022-02-11 12:14:22 -05:00
Tom Limoncelli
dcb0e58b99
MAINT: Linting ()
* MAINT: Linting

* Unsort for a smaller diff

* fix hexonet error checking
2022-01-27 15:58:56 -05:00
Tom Limoncelli
360a6266c5 Revert "CLEANUP: Fix many golint/staticcheck issues"
This reverts commit de64f90c51.
2022-01-25 10:35:21 -05:00
Tom Limoncelli
de64f90c51 CLEANUP: Fix many golint/staticcheck issues 2022-01-25 10:33:48 -05:00
Hampton
998a25aa08
BUG: Support RFC2317 by allowing slash in CNAME target ()
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-01-03 10:24:33 -05:00
Tom Limoncelli
7ae27aa0b9 Security: Fix many staticcheck warnings 2021-12-14 09:47:32 -05:00
norman-zon
58a5a4bcf0
Remove length checking from TxtNoMultipleStrings ()
All functions in should test for only one condition. There already is a
function that tests for long TXT records: TxtNoLongStrings.
Add calls to TxtNoLongStrings in all providers that use
TxtNoMultipleStrings, to keep functionality, except for NS1 and ClouDNS,
which allow for any TXT record length, but not for multiple strings per
TXT.
2021-11-23 14:35:01 -05:00
Julius Rickert
6d48725e52
Add test cases for IDN domains ()
Recreated IR json file
2021-11-03 10:45:01 -04:00
F.D.Castel
0d12eb7dc6
CLOUDFLAREAPI: Adds CF_WORKER_ROUTE ()
* CLOUDFLAREAPI: Adds CF_WORKER_ROUTE.

- CLOUDFLAREAPI: Initial support for CF_WORKER_ROUTE.
- Put CF_WORKER_ROUTE behind a per-domain feature-flag.
- Adds Integration Test.
- Create Cloudflare workers for tests.
- Updates documentation.

* Workaround for updateWorkerRoute causing stack overflow.

* Sets AccountID.

* Updates to latest master (Thanks @tresni!).

* Removes $CLOUDFLAREAPI_ACCOUNTNAME.

* Add alltrue() filter and -cfworkers flag

* Final workers changes

* alltrue() should be implemented like other filters.
* Update documentation.

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2021-10-11 16:04:49 -04:00
Vincent Hagen
8c5db2e11c
Add R53_ZONE as an domain identifier ()
Using R53_ZONE allows you to differentiate between split horizon
domains across zones.
2021-09-02 16:54:54 -04:00
Tom Limoncelli
3fa5712232
NEW MACROS: DOMAIN_ELSEWHERE and DOMAIN_ELSEWHERE_AUTO ()
* NEW MACROS: DOMAIN_ELSEWHERE and DOMAIN_ELSEWHERE_AUTO
* Finish docs
2021-09-02 15:41:22 -04:00
Patrik Kernstock
9316517291
DMARC_BUILDER: specify version, use values when specified ()
* Allow version, use values when specified

* Updated DMARC_BUILDER docs
2021-08-14 14:43:39 -04:00
Vincent Hagen
6fc3534aa3
Add INCLUDE statement to include records from other domains () 2021-07-25 12:03:58 -04:00
Vincent Hagen
243762d171
SPF Flatten for non apex domains () 2021-07-25 11:53:31 -04:00
nemunaire
80f22df705
MAINTENANCE: Return error instead of panic when converting RR to RC () 2021-07-06 11:03:29 -04:00
Tom Limoncelli
0630c185cf
Release v3.10.1 ()
* Release v3.10.1

* Update dependencies

* RELENG: Update doc to verify version string

* Fix codeql issue
2021-07-01 10:17:43 -04:00
Tom Limoncelli
4b68e14039
Fix codeql errors () 2021-07-01 09:30:02 -04:00
Tom Limoncelli
654736be29
Improve MSDNS naptr support ()
* 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
Tom Limoncelli
6d64fc8cac
Fix CodeQL issues () 2021-06-24 18:15:09 -04:00