mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #216] Consider the CN (DNS Name, SPKI) of the TLS request #397
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#397
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 @bluejekyll on GitHub (Sep 28, 2017).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/216
See https://news.ycombinator.com/item?id=15354120
It's possible that it would be better to have the certs be signed with IP addresses in the alternative subject fields, rather than name, as the name is somewhat irrelevant. It's the IP that's being used to for connection establishment.
@Darkspirit commented on GitHub (Sep 28, 2017):
I am confused that you are talking about "CN".
Chrome deprecated CN and only pays attention to SAN (DNS/IP). That should be done everywhere.
If I'm not wrong, Letsencrypt does not issue certificates for ip addresses.
Using a CA for DNS over TLS is another killswitch/point of failure and is not an ideal solution in my opinion, but better than without any validation.
recursive-to-authoritative connections (not standardized)
The com zone may contain "example.com NS ns1.example.com" + "ns1.example.com A <ip4>". So trustdns-server should have a cert for ns1.example.com (SAN). For the case that one trustdns server is known under different nameserver domains (uncommon?), it could support SNI to select the correct certificate. Otherwise one has to make sure that all possible names are SAN entries in the one and only certificate.
stub-to-recursive connections (rfc7858)
A publicly accessible trustdns resolver could have a cert for (and a PTR record to) resolver.example.com (SAN) to make things clearer. I don't remember how the standard wants to have this if it's defined at all. Will read it again.
Edit:
Unbound does not care which certificate is provided, if I'm not wrong.
Cool would be to have multiple options on the client side:
, check if my dhcp dns server speaks on port 853, otherwise connect via port 53.
(All "require TLS" options would definitely fail on port 53-only captive portals if a non-dhcp resolver is configured. dnssec-trigger configures a local unbound and can notify the user if there is a captive portal to temporarily disable dnssec validation + switch to dhcp dns. Just wanted to notice this so that it is not forgotten.)
the future
DNSSEC/DANE chain stapling (similar to OCSP stapling) will be used for _443._tcp.example.com TLSA
and _853._tcp.example.com TLSA for example. (at least it seems so)
@bluejekyll commented on GitHub (Sep 28, 2017):
By CN I mean the CommonName of the cert, though really I mean any valid signed name in the Cert as the CommonName (CN) or any SubjectAlternativeName (SAN). I didn't realize that CA's out there won't issue certs against IP.
If I understand your comment, then this is the current configuration on the client. It is expected that you would validate the cert with
ns1.example.com. On the server side, I currently don't have SNI implemented. But it should be feasible to change the current server wide cert for certs per zone and use SNI to select the current cert.We can do that. My biggest concern is that we don't offer any options that someone could easily shoot themselves in the foot.
I'm not sure of the value of this (though I can be swayed), as this would potentially allow for both downgrade accidental connections in plain... It's definitely something that would be easily implemented, I have logic around the UDP -> TCP promotion, this would probably be similar.
Wouldn't most people want to know that they're connecting to something legit? Again, my concern is a false sense of security.
Supported today.
This would disable the common CA's, yes? TRust-DNS currently allows for pinning of additional Certs, but not exclusively only those. This may require digging into some of the underlying TLS implementations to expose these features.
@briansmith commented on GitHub (Oct 24, 2017):
AFAICT, Trust-DNS client will do the correct thing when using Rustls, automatically. This is because Rustls was designed to do the correct thing by default.
Rustls makes this pretty easy to do, as it has a callback interface for looking up the cert by SNI name already.