Commit Graph

15 Commits

Author SHA1 Message Date
Matthew Holt
98d2930e1d
Improve DNS related logging 2024-04-08 12:24:15 -06:00
Matt Holt
6095ab8069
Initial implementation of ZeroSSL API issuer (#279)
* Initial implementation of ZeroSSL API issuer

Still needs CA support for CommonName-less certs

* Accommodate ZeroSSL CSR requirements; fix DNS prop check

* Fix README example

* Fix comment
2024-04-08 10:59:55 -06:00
pgeh
c3c4a1263a
DNS propagation check succeeds if any configured resolver succeeds (#274)
* Changed solver DNS propagation check to only check authoritative nameservers directly if there are no explicitly given resolvers.

* Changed solver DNS propagation check to only succeed of any one of the checked nameservers has the required TXT entry
2024-03-14 15:21:07 -06:00
kizmc
462f5e2334
Use recursive query when checking for TXT records (#224) 2023-04-10 10:22:45 -06:00
Matthew Holt
9826a4c354
SERVFAIL should be forgivable
Let the poller retry after a SERVFAIL
2022-09-08 14:11:38 -06:00
Mohammed Al Sahaf
d08f6e10d8
Set EDNS0 to 1232 bytes per recommendation (#188) 2022-05-29 14:58:11 -06:00
Matthew Holt
049e60556b
Remove comment 2022-04-22 14:54:57 -06:00
Peter Magnusson
b668c8b9d4
Use the configured resolvers exclusively (#131) (fix #132)
* feature: add optional !important suffix

if !important is added to any of the resolvers, then all are considered
exclusive and no other fallbacks will be added.

* fix: !important can be on it's own

* simplify recursiveNameservers

- use custom OR default nameservers
- add testing

* removed print line

* tests: fixed defaults when resolv.conf is found
2021-06-08 13:14:45 -06:00
delthas
3cc8865d3c
dnsutil: Don't error when checking record with preexisting values (#96)
When checking whether a new DNS TXT record is deployed, as part of the
DNS challenge procedure, checkAuthoritativeNss is called in a loop until
the requested TXT value is found in one of the records, or until a
timeout.

Previously, if there were other DNS TXT records for the same FQDN, the
call to checkAuthoritativeNss failed and the whole DNS challenge was
canceled. This means for example that if there was any previous
_acme-challenge TXT for the domain, the DNS challenge would always fail.

This fixes this issue by not returning an error, but instead returning
not ready, when there are other values returned by that DNS TXT record
request.

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2020-09-15 12:05:33 -06:00
Matthew Holt
34fc6bf02a Properly ensure port is added to all nameservers 2020-09-09 13:29:00 -06:00
M. Ángel Jimeno
09acc6bf59
dnsutil: replace fmt.Sprintf() with err.Error() when formatting errors (#87) 2020-08-26 12:57:16 -06:00
Matthew Holt
4fd8ae48ef
Configure custom DNS resolvers to be preferred over default resolvers
This makes the DNS challenge usable with split-horizon DNS.

Related:
- https://github.com/go-acme/lego/issues/461
- https://github.com/caddyserver/caddy/issues/1580
- https://github.com/go-acme/lego/issues/379/
- https://github.com/go-acme/lego/pull/293/
2020-08-21 20:22:42 -06:00
Matthew Holt
c2f851df75
Synchronize same-name DNS challenges
Wildcard domain names collide with the same subdomain for the ACME TXT
record as the non-wildcard parent domain (for example, example.com and
*.example.com both use _acme-challenge.example.com), so we need to solve
those challenges mutually exclusively.

One potential problem with this current implementation is that we don't
wait for the DNS record to un-propagate after it is deleted; I've found
that re-running it works fine, after waiting just a few seconds. I am
not sure how to generalize this logic in all cases though. It is likely
provider-dependent. (I was testing with Cloudflare.)

Should fix https://github.com/caddyserver/caddy/issues/3474
2020-08-18 16:37:01 -06:00
Georg Friedrich
d70f961bcd
Retry DNS query with TCP if UDP fails (#81)
* Minor improvement to DNS request handling

Sometimes incoming udp traffic on port 53 is blocked to
prevent DDoS attacks. In those cases only TCP will work
for DNS request as the UDP request will time out. And as
a result the DNS challenge will fail, while the server is
trying to verify if the challenge was propageted through
the NS.

Now instead of returning immidently, if a timeout with UDP was
received, the request will be tried again using TCP.

* Formatting and comment

Co-authored-by: Georg Friedrich <g.friedrich@sonnenwagen.org>
Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
2020-08-08 08:36:00 -06:00
Matthew Holt
7d9dfc3fe6
Add DNS-01 solver implementation that uses acmez and libdns APIs
Before when we used lego as our ACME library, DNS solvers abounded in
the lego repository and they could be used directly. Our new acmez lib
is very lightweight, and "bring-your-own-solvers", let alone your own
DNS provider implementations.

DNS providers are implemented in libdns: https://github.com/libdns

This commit adds an implementation of acmez.Solver that solves the DNS
challenge using libdns providers.

Unlike the other solvers, this one is exported because it is not a
challenge type that is enabled by default, and there is more config
surface.

We borrowed some DNS utility functions and tests from the lego repo.

But this is a very lightweight implementation that has a much, much
simpler API and smaller footprint.
2020-07-30 14:07:04 -06:00