Commit graph

31 commits

Author SHA1 Message Date
Tom Limoncelli
367c83a3f5
LOC: Refine which providers support it (#2185) 2023-03-16 19:59:44 -04:00
Paul Dee
3b6591fd95
NEW FEATURE: Support DNS LOC record type (#2174) 2023-03-16 14:04:20 -04:00
Tom Limoncelli
0491aadd36
BUG: Fix all err scopes (#2160) 2023-03-13 14:19:19 -04:00
Yannik Sembritzki
5e06c249d6
Rename DomainCreator to the more accurate ZoneCreator (#2038)
Co-authored-by: Yannik Sembritzki <yannik@sembritzki.org>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-02-07 07:22:49 -05:00
Tom Limoncelli
3793b56ec8
DESEC: Adopt diff2 in compatibility mode (#1876) 2023-02-02 09:27:30 -05:00
Tom Limoncelli
54fc2e9ce3
NEW FEATURE: diff2: A better "diff" mechanism (#1852) 2022-12-11 17:28:58 -05:00
Tom Limoncelli
b0f2945510
REFACTOR: Add diff2 enable flag to all DNS providers (#1851)
This should enable the diff2 code to be inserted with good "git blame" results for new code.  I'm adding this early to catch any problems early.
2022-12-11 15:02:58 -05:00
Srdjan Markovic
639a4473d7
DESEC: Check authentication via domains API (#1723)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2022-08-27 09:02:51 -04:00
Tom Limoncelli
1010138fb6 gofmt -s -w 2022-08-14 20:49:57 -04:00
Tom Limoncelli
ccb582b278
CHORE: Linting (#1704)
* 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 (#1699)
* 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 #1570 (#1658)
* stash

* Use rejectif idea

* rename

* wip!

* Convert old systems to new

* fixup!

* fix typo
2022-08-11 17:24:47 -04:00
Jan-Philipp Benecke
bcb968411a
MAINT: Unify provider outputs to pkg/printer (#1546)
* 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
Tom Limoncelli
444b893e1b
MAINT: Sort various lists (#1433)
* 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
Vincent Bernat
c44ed88659
GANDI_V5 & DESEC: correctly handle multiple RR in a RRset (#1296)
When having multiple RR in a RRset, only a few of them may be applied.
In my case, when I have two A records, only one of them makes its way
to Gandi.

In `convert.go`, we had:

```go
var zrs []livedns.DomainRecord
// [...]
zrs = append(zrs, zr)
keys[key] = &zrs[len(zrs)-1]
```

If the slice needs to be extended when appending, the reference we got
in `keys[key]` may be outdated because the new slice contains a copy
of the old one. We either need to store references to domain records
in the slice or we need to stop keeping reference of items in the
slice.

I have fixed this with the second solution as I think the order of the
RRsets is not important.
2021-11-01 15:41:37 -04:00
Georg
2832746a47
deSEC implement pagination (#1208)
* deSEC: Implement pagination for domain list #1177

* deSEC: add debug logging for pagination

* deSEC: simplify get/post methods by allowing url / api endpoints as target

* deSEC: implement pagination for getRecords function

* deSEC: fix linter warnings

* deSEC: replace domainIndexInitalized variable with checking if the domainIndex == nil

* deSEC: add mutex for domainIndex

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2021-07-21 11:44:10 -04:00
Georg
228b57e445
DESEC: Implements support for long / multistring txt records (#1204)
* use /auth/account endpoint for token validation
this implements the token validation using the /auth/account api endpoint as suggested in #1177 instead of fetching the domain list

* deSEC: add support for long txt records #996

* deSEC: add support for a different api error response
relates to #996 where we had insufficient error output due to unknown api error format

* deSEC: remove unused fetchDomainList function

* deSEC: improve error handling

* deSEC: support for long / multistring txt records
the previous commit was broken this is now working (CRUD)

* deSEC: document what desecProvider.domainIndex is used for

* deSEC: handle the rate limiting correctly
we try to use the Retry-After header to determine how long we should sleep until retry

* deSEC: further improvement of rate limit handling
we cut off if the Retry-After header exceeds 3 minutes because this might be the daily limit.

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2021-07-08 10:06:54 -04:00
Peter Thomassen
d567d554cf
DESEC: clarify supported capabilities (#1160)
* DESEC: clarify AutoDNSSEC

* DESEC: improve error messages / hints

* DESEC: add NAPTR support

* DESEC: add to integration test configuration
2021-05-17 15:45:24 -04:00
Tom Limoncelli
8d139d182f
gofmt all (#1144) 2021-05-04 14:15:31 -04:00
Tom Limoncelli
e69e6f27e4
Linting (#1087)
* fix linting
* rename AuditRecordsor to RecordAuditor
* gandi_v5 to gandiv5
2021-03-08 20:14:30 -05:00
Tom Limoncelli
8dea9edc34
Re-engineer TXT records for simplicity and better compliance (#1063)
TXT records are now handled different.

1. The raw input from dnsconfig.js is passed all the way to the provider. The provider can determine if it can or can't handle such records (auditrecords.go) and processes them internally as such.
2. The CanUseTXTMulti capability is no longer needed.

* DSPs now register a table of functions
* Use audits for txt record variations
* unit tests pass. integration fails.
* fix deepcopy problem
* rename to AuditRecordSupport
* Reduce use of TXTMulti
* Remove CanUseTXTMulti
* fix Test Skip
* fix DO
* fix vultr
* fix NDC
* msdns fixes
* Fix powerdns and cloudflare
* HEDNS: Fix usage of target field to resolve TXT handling (#1067)
* Fix HEXONET

Co-authored-by: Robert Blenkinsopp <robert@blenkinsopp.net>
Co-authored-by: Jakob Ackermann <das7pad@outlook.com>
2021-03-07 13:19:22 -05:00
Tom Limoncelli
a0051c2b6f
Fix deSEC long TXT bug (#997)
* Fix deSEC long TXT bug
* Update convert.go
2021-03-01 21:05:21 -05:00
Tom Limoncelli
ca30c9c34f
Rename provider handles to *Provider (#914) 2020-10-26 09:25:30 -04:00
Tom Limoncelli
b6fd4dffd7
Cleanups: Fix many issues reported by staticcheck.io (#837)
* Lint: Fix ST1005: error strings should not be capitalized

* Cleanup: Fix a lot of staticcheck.io warnings
2020-08-30 20:38:08 -04:00
Tom Limoncelli
de308c0952
Lint: Fix ST1005: error strings should not be capitalized (#834) 2020-08-30 19:52:37 -04:00
Mike Cochrane
59747a96f0
Cleanup: Bubble errors up from diff instead of panic (#799) (#817) 2020-08-20 15:49:00 -04:00
herver
98418cf48b
desec: Supports PTR records out of the box (#801) 2020-08-04 09:44:20 -04:00
Tom Limoncelli
367a14ab44
Sort updates (cosmetic) (#772)
* Sort updates (cosmetic)

* comments

* More comments
2020-07-01 05:55:20 -04:00
Tom Limoncelli
676d98fc4a
Linting (#767)
What could possibly go wrong?
2020-06-18 09:37:57 -04:00
Tom Limoncelli
87a5c4b339
New RTYPE: DS records now supported! (#753)
Thanks to @haraldkoch for starting this, @McNetic for picking it up.

* Added DS record type

* Added DS for cloudflare provider with tests

* Removed DS validation, fixed parse test

* Added generated files

* Added dnsimple ds record

* Regenerated documentation matrix

* rebased and regenerated

* Updated integration tests

* Rebase and regenerate

* Enable DS record type for provider desec

* Added DS record type

* Added DS for cloudflare provider with tests

* Removed DS validation, fixed parse test

* Added generated files

* Added dnsimple ds record

* Regenerated documentation matrix

* rebased and regenerated

* Updated integration tests

* Rebase and regenerate

* Enable DS record type for provider desec

* Rebase and fixes

Co-authored-by: Robert Koch <robert@kochie.io>
Co-authored-by: Nicolai Ehemann <nicolai.ehemann@enerko-informatik.de>
2020-05-30 10:40:21 -04:00
D3luxee
207f050911
NEW PROVIDER: deSEC (#725)
* Add initial deSEC support

* Handle the api rate limiting

* Fix deleteRR and do some code cleanup

* improve rate limiting and record deletion

* Add documentation for deSEC provider

* README.md update list of supported DNS providers

* deSEC supports SSHFP records

* dynamic minimum_ttl and hint for DNSSec on domain creation

* merge all changes into one single bulk api request

* Fix: actually set the TTL to min_ttl if necessary

* use a constant for apiBase URL

* Fix code comments

* Use PUT instead of PATCH for upsertRR method

* use ' instead of " for java script examples
2020-04-28 14:40:58 -04:00