mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-24 18:55:55 +03:00
[GH-ISSUE #1443] Document DNSSEC usage #671
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#671
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @daxpedda on GitHub (Apr 7, 2021).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1443
Is your feature request related to a problem? Please describe.
I found no clear documentation on how DNSSEC is used except activating the crate feature.
Describe the solution you'd like
A better documentation. Either inside the rust documentation or in the README. As far as I understand, this has to be true:
https://docs.rs/trust-dns-resolver/0.20.1/trust_dns_resolver/config/struct.ResolverOpts.html#structfield.validate
It would also help to document what exactly this does, it is my understanding that this enforces DNSSEC.
@wiktor-k commented on GitHub (May 24, 2021):
For people that arrive here looking for a working example:
Additionally one needs to enable one of the dnssec features in Cargo.toml:
Without this feature
ResolverOpts::validateseems to be a no-op.Enabling
dnssecfeature but not a specific one (e.g.dnssec-ring) will yield anResolveError { kind: Proto(ProtoError { kind: Message("self-signed dnskey is invalid") }) }error.@kevincox commented on GitHub (May 13, 2022):
I would like to see some docs here too. Because you would think that
validateis what you want. But this doesn't seem to work for "correctly" unsigned records. For example when setting validate and trying to lookup the MX records forgmail.com(which is not signed) I get:This does work correctly for signed domains, but not for unsigned. I think the vast majority of people who want DNSSEC validation want it for validated domains but to fall back for unvalidated domains. How do do this isn't clear to me.
@bluejekyll commented on GitHub (May 13, 2022):
This is something I dislike about DNSSEC, there is no elegant way to discern if a domain must be DNSSEC protected or not. The presence of DNSSEC records is clear, but the lack of DNSSEC records is not, which is exactly the scenario that you'd want to catch.
I have been thinking it would be better to start exposing records in a different way when DNSSEC validation is done so that they could be more easily used if DNSSEC is not present or other scenarios like DNSSEC validation is incomplete or fails. It would be good to find ways to expose this in the API, if folks have ideas the feedback would be really welcome.
@kevincox commented on GitHub (May 13, 2022):
Can't you get a confirmation of records not existing? For example looking at https://dnsviz.net/d/gmail.com/dnssec/ to continue using gmail.com as an example I see that it suggests that there was an
NSEC3record signed bycom.validating that there is noDSrecord forgmail.com.I'm not a DNSSEC expert though so I may be missing something.
@kevincox commented on GitHub (May 13, 2022):
See also https://security.stackexchange.com/a/128159/10114.
@bluejekyll commented on GitHub (May 13, 2022):
Yes, you can do that, but It makes a bunch of assumptions about the nature of an attack on the system performing the resolution, that is, UDP responses could easily strip the
DSandNSECresponse from the parent zone. So it assumes that the MITM is only occurring on thegmail.com.zone in the example you've given and not also on thecom.zone.I think you need to essentially have some out-of-bounds exchange that requires pre-knowledge about which zones are signed and which are not, for example, we all know that
com.is signed, therefore the lack of anNSEC(3)record for theDSwould imply and MITM on thegmail.com.zone. Anyway, my complaint is just that it takes a lot of additional round-trips to evaluate all of this and requires predefined knowledge about the root andcom.zones being signed.@kevincox commented on GitHub (May 13, 2022):
I don't see how that attack could work. If the
DSandNSECresponses are stripped the response will be lacking a signed record that states that the domain doesn't contain a DS record so you would treat it is invalid. This does mean that someone on the network path could DoS you but they could do that by just blocking all traffic.The root zone is signed and will tell you which TLD are signed. Then it just recurses up the chain.
That may be true, but for many people that is worth it.
@kevincox commented on GitHub (May 13, 2022):
Anyways, I have broken off this feature request into https://github.com/bluejekyll/trust-dns/issues/1708. However as part of this issue I think this shuold definitely be documented as it is very surprising (to me at least) behaviour. I am not aware of any other resolver that behaves this way.