Some clients use SRV lookups, a few (to their embarrassment) do not (2009)
jdebp.eu
jdebp.eu
When SRV is discussed e.g. on the HTTP/2 list, the objections of resolution speed and number of round-trips are usually raised. But SRV records do not intrinsically require an additional lookup or round trip. Unoptimised zone configurations (especially those that slice at _tcp, which occurs at some Microsoft shops) may fare less well, but that is true of all DNS configuration. Services that care about resolution speed already optimise their DNS as necessary, and they would for SRV as well if it were mandated.
In practice, the reasons for non-adoption are, mundanely, simply a matter of inertia, combined with a lack of motivation: the browser vendors who in practice write the HTTP standard do not care to change and have no external force that will push them off overloading the address record.
I think you allude to this with your comments on optimization, but DNS resolvers will generally, just like CNAMEs (which nearly all DNS names begin with these days) will return additional records to reduce any round-trips for getting the record at the end of the SRV.
SRV records are great, and would reduce antiquated reliance on ports for specific services. This would be helpful for HTTP, especially with things like TLS, where certs cold be returned without SNI being used.
The other one that still astounds me is that DV certificates rely entirely on DNS control for validation prior to issuance, and browsers trust that system, but there still exists no way for me to cut out the middle man and put my own domain-specific CA Cert in DNS directly.
Alternatively they can use secondary challenge-response auth which depends on some credentials being deployed to your server. Mitm-ing it wouldn't give the attacker anything interesting in that case.
Do they actually do that in practice? Are they required to do so? (How many sources and how far distinct?)
They can use a secondary challenge, but this being optional completely defeats the purpose. A MITM attack will allow an attacker to pretend to be the target during creation of a new cert, tricking a random CA into giving them a valid cert. You do not need to use the CA that the site owners use, so their use of an extra challenge is irrelevant.
Credit cards literally rely on every single merchant not leaking their info, yet as flawed as that is, there's no great pressure to replace them.
Even if DNS by itself was secure enough to validate, this is a single factor and there are many ways to exploit a single factor. Why a secondary mechanism/factor isn't required for critical infrastructure makes no sense.
Yet both the user and DV certificate issuers rely on the same DNS that you consider unreliable. So you seem to dismiss DV certificates altogether but your comment seems to imply that you only want to dismiss certificates as DNS records. There's something very inconsistent about your comment.
While not perfect it’s generally quite true for the majority case.
I don't know if they document it somewhere, but it is essentially trivial for letsencrypt to use a DNSSEC validating resolver.
So that means that if you care about DV security, you enable DNSSEC.
The good thing about Google doing DNSSEC validation that on average zones can either be unsigned or need to have valid signatures.
By signing your own domains with DNSSEC and assuming CAs do DNSSEC validation you can protect your own domains from malicious DV certificates.
That's a nice feature. If you don't like DNSSEC, nobody is forcing you to sign your zones. I can still sign my zones even if you don't sign yours.
The next step would be for CAs to honour DANE records.
It's interesting, even though the $0 price isn't intended to be the main draw a large number of domains with broken DNS fixed it to get Let's Encrypt working rather than pay a CA that doesn't care...
So if you have DNSSEC you can deny all the CAs you don't trust. If a bad guy leaves the CAA record alone they can't get a cert. If they try to replace the CAA record or deny it exists they fail DNSSEC checks.
If your chosen CA agrees to only use a method that's actually secured you get an actual bona fide panacea, for the very affordable price of deploying DNSSEC and CAA, automating cert issuance and getting your DNS config right.
* First, most CAs don't do DNSSEC today, or, if they do, do DNSSEC fail-open.
* Second, CA's can already do multi-perspective DNS lookup, which means that a practical attack to defeat CAA over standard DNS requires an on-path attacker. But if the attacker is on-path, most of the mechanisms CAs use to validate a domain fail, even if you use DNSSEC.
* Finally, there's already a replacement for all this stuff in progress: RDAP, a secure JSON API that allows data to be pulled directly from registrars. Every mainstream browser and every CA/B forum CA voted to add it to the BRs; it's going to be implemented. If you really believe that something like CAA is the future for DV certs, then it seems pretty obvious that RDAP is going to be the way that happens.
DNSSEC is a dead letter.
Your first point argues from an alleged fact, not in evidence, that "most CAs" don't obey the Baseline Requirements in respect to their requirement to use DNSSEC to avoid an on-path attacker replacing or removing CAA records. Do you have such evidence? As I said, this requirement caused CAs to spit feathers, but that's also true of e.g. record keeping requirements and CAA checking itself. One of the unexpected side benefits of Let's Encrypt at scale is that arguments go like this:
Big CA: This requirement is crazy, we issue a vast number of Web PKI certs, and the requirement would cause us to do X for most of those certs, that's just not technically feasible, the requirement must be removed.
Let's Encrypt: We do X for every single cert we issue. Big CA the logs show you issuing only 4% as many certs as us, are there hundreds of times more than you don't log?
Big CA: Um, er, oh, we just realised our single-threaded PHP program might be a bottleneck, we're investigating upgrading to PHP4 to work around that.
But then your second point argues the reverse, that CAs "can" do multi-perspective, and so even though they mostly don't we should pretend they all do. Then it jumps from this backwards argument to claiming all of the Ten (well, nine now) Blessed Methods are vulnerable to an on-path attacker "even if you use DNSSEC", when in fact several are not.
Try it, write down the Ten Blessed Methods as they stand today (yes there are currently nine), then mark whether an on-path attacker succeeds against this method when DNSSEC is in place
3.2.2.4.3, 3.2.2.4.7 and 3.2.2.4.12 are unaffected by an on-path attacker. 3.2.2.4.3 is out-of-band, which I'm sure won't bother a nation state adversary like the NSA, but is otherwise pretty good, 3.2.2.4.7 is in DNS itself, and so protected by DNSSEC, and 3.2.2.4.12 is a simple database lookup, just one that's only possible if your CA is also your registry/ registrar.
I still think there's a better way, though. Surely it must be possible to do some consensus through WebRTC and end up with something that lets me run my own domain-specific CA, at least for DV certs.
Why? It goes over infrastructure that you nor they control.
It might be worth illustrating what happens here, as it's not immediately clear from common DNS settings or common commands. First, the client asks their local DNS server, the one you get via DHCP or configure (for example 8.8.8.8 which is by definition already outside your network, but for argument's sake let's assume that they're smarter than that and they pick one inside their own network). Let's say this one doesn't have it in cache, so then it has to go out and ask the TLD (let's assume it has the TLD cached).
The TLD, for example `.com`, will say "the name servers for your.example.com can be found at ns.your.example.com" and it gives the IP addresses for those. Now the local resolver at the CA has to go and ask there for your domain. In this final step, if nowhere else, it will have to leave any sort of trusted network and venture into whatever place the user's servers are at. This could be anywhere in the world, with all sorts of intermediate networks.
They're able to use many secret locations to perform the query.
There is a theory that it is very unlikely an attacker can detect and get leverage over every network between every one of those secret locations for an indeterminate amount of time, without being discovered.
Alas "No" isn't an option for that public WiFi access point you're using, or most mobile service, or your mom's Internet, the average corporate workplace, and so on. So even though this is hardly foolproof it makes a huge difference.
DNS has no version, so it has no obvious way to extend itself by allowing for graceful upgrades. So you can't just change behavior and have clients support a particular version. Everything has to be backwards compatible with something written in 1984.
The only serious attempt at extending DNS died because the specs and DNS admins allowed the extension mechanism to be optional. Now, most networks break the extension, and the DNS just limps along because nobody is willing to implement a sane upgrade path.
0000 7800 0000 0000 0000 0000
Public DNS installations already have to deal with getting unsolicited random crap, so the risk of fatal confusion is low.[1] https://www.iana.org/assignments/dns-parameters/dns-paramete... [2] Middlebox brokenness is probably the biggest issue with extending or upgrading DNS, though, I suppose
Remember that this allows any of your government or people controlling the zone to transparently put the cert there too. (For potential problems see [0]).
With the CA system (that I personally also don't like) at least the certs are logged in Certificate Transparency logs so you see any potential attacks.
[0]: https://www.theguardian.com/technology/2010/oct/08/bitly-lib...
AFAICT, anyone who controls .com can add or replace a cert for ycombinator.com, but only visibly. If they do it, they show the change to the entire world at once, because .com is signed with dnssec. Right?
So yes, bad guys operating a TLD can trick a CA into issuing for a domain under theirs, but the CT logs would preserve evidence of this cert existing, and the CA is required to keep records of why it was confident to issue. Monitors would know about the cert in 24 hours (usually much less)
Until about a year ago the situation was that each CA could do anything they (without even peer review) thought seemed good.
Then we got the Ten Blessed Methods, a specific list of ways to verify that your subscriber really controls the names they want a cert for.
Most of the Blessed Methods involve DNS, but not all of them, some are relying on paper documents, some use WHOIS and out of band communications (e.g. Fax!). And of those which use DNS, many involve even less secure elements, email, plaintext HTTP, that sort of thing.
So there's still work to do, but we're headed in the right direction.
Rather than solving the problem the pragmatically (and in a backwards compatible way), we're pushing a reinvention of the wheel (protocol).
IPv4 certainly has problems but I think they were solvable without bisecting the internet.
In practice there'd be some introductory issues in deviating from the well-known ports involving gateway traversal (particularly corporate firewalls), but we've cleared such hurdles before.
If you look at the TCP packet, bits 16-31 are constant for all HTTP traffic. Because they are a fixed value, they're wasted (non-unique). With the current system, we can only have 2,147,483,647 web servers.
Using SRV records, these bits become distinguishable, giving us 281,474,976,710,656 possible addresses for web servers.
[Yes this is an oversimplification for the pedantic]
On the downside you won't be able to easily tell if two services run on a same machine or not. SSH and HTTP endpoints would be related only through DNS.
I think doing it in compatible way that doesn't require replacing routers would require NATs on both sides, and client that looks up PTR records before connecting.
The network space is huge, but segmented. At each branch of the network, you reduce your addressable space significantly.
When you think of the future, and huge interconnected small devices, I don’t think 128 bits are going to seem excessive.
Remember, when they came up with 32bits for IPv4, they were not planning for a computer (or multiple!) in your pocket that was going to be network routable.
One can see from IEN28 in 1978 that early forms of 32-bit addressing, at the time comprising 1 octet network, 1 octet IMP, and 2 octets host, weren't even planned as extending beyond ARPANET.
I think the main idea is that you want to have plenty of space both for growing horizontally and vertically, at least enough to where you can't even imagine exhausting it in either direction. Giving massive private and public address space without need for NATs effectively provides this.
Also, hey, who knows. There isn't enough raw materials on Earth, perhaps, but maybe there are enough raw materials in the universe. Who knows for sure if the Internet always be confined to just Earth.
To simplify routing, only a small fraction of the address space will be used.
At least that's how I understand it. Think of it like this - GPS coordinates are longer than post codes and less efficient for storing the location of people. But as a bonus finding someone's location using coordinates doesn't require a huge database of post codes.
Similarly, coordinates have a huge address space - every location on the planet, but we don't expect people to actually live at every location - in the ocean etc.
Assuming you're responding to this? That statement is unwieldy but clear (would have preferred there aren't even enough IP addrs to uniquely identify every currently living person or some such).
Enjoy a related discussion of some poor FTP clients:
(Submitted title was "Why Dont HTTP Clients Use DNS SRV Records?")
Following some of the links in the article, I've seen people make arguments on how straightforward it would be to implement and how it clearly works well for some non-HTTP systems. I'm guessing there's some implicit shared understanding of the problem space that I, as an uninitiated, casual DNS user, can't really wrap my head around.
Can y'all point me in the right direction to read something about, like, what problems SRV records solve for HTTP, and specifically how that solution compares to how people have traditionally solved those problems with HTTP? There seems to be some tension between best practices as established by IETF RFCs and best practices coming from decades of deploying public-facing HTTP infrastructure/browsers, does that sound about right?
A second one: deploying TLS websites used to require one ip per hostname, and presently requires weird hacks like SNI (which leak the hostname to which one is connecting to observers). Being able to deploy any website on any port allows for a lot more flexibility in deployments, especially given the current trends such as “serverless”, k8s, et c.
* http://jdebp.eu./FGA/dns-round-robin-is-useless.html
Note that making priority and weighting available is given in the rationale section of the original RFC from 1996. What you're talking about actually isn't specific to HTTP.
The use of SRV could help in newer API driven implementations so that scripts and other tooling could enumerate which IP's are preferred. For now, developers will just have to make use of multiple records like the browsers do.
That said, it won't likely happen because the HTTP spec does not allow new DNS implementations. The RFC would have to be deprecated with a new one that permits SRV. HTTP/2 would have been a grand opportunity to do just that. There have been many discussions [1] and debates on the issue, but I do not foresee it happening.
[1] - https://www.ietf.org/mail-archive/web/httpbisa/current/msg25...
The hand-wringing evidenced by some about the difficulties of introducing a new behaviour seems pretty feeble when you consider that Google has successfully intruded both a new transport protocol (QUIC) and a new application layer protocol (HTTP/2 i.e. SPDY) in a few short years. Rolling browser updates are now the norm and enable these major changes.
Browsers are not the only thing that speak http. There are a myriad of libraries used by API's and all manor of automation that must also be updated to support a new protocol. A good example of this is SNI. All major browsers support SNI, but there are plenty of libraries that have yet to catch up to that very well aged protocol.
API endpoints tend not to be apex records, indeed are characterised by using a label of "api" or similar which doesn't automatically conflict with other services, certainly not in the common case. It'd remain a violation IMO to use a host name as a service selector but in practice they could continue using address records for many years of transition.
Because it's at the apex of the domain, that record also cannot be a CNAME alias, because the apex includes DNS metadata that is not allowed to be aliased. So instead we have numerous ugly hacks from DNS providers that vary that address record by tracking an alias target, with varying degrees of reliability.
In other words, your DNS is now entirely subordinate to the demands of the web protocols and using ugly hacks to work around limitations of address records. You can stick a "www" on the front as a cheap, poorly specified, and untyped service selector, but because of the convention of just entering a domain name you'll still have to do the apex record.
Basically, the current convention for HTTP is to overload the address record to be its personal service record and screw everyone else and the consequences.
SRV also provides mechanisms for service fallback and weighted loadbalancing that address records do not. It can also conserve IP space by directing clients to alternative ports without ugly port specifications in the URI. There's a lot to like about it, and a lot to dislike about the current practices.
Thanks for the clarifications!
I don’t see SRV in use for browsers, ever.
* https://news.ycombinator.com/item?id=14720919
Of course, if we were redesigning the DNS protocol (which for what you want would be necessary, given how questions are structured) I would suggest being far more radical and not structuring things in terms of separate A, AAAA, CNAME, and SRV resource record sets in the first place; but rather in terms of <domain,transport,service> tuples and <priority,weight,address,port> tuples, as getaddrinfo() roughly is. Query goes out with <example.org,tcp,https>, full answer response comes back with a prioritized and weighted set of IPv4 and IPv6 addresses and port numbers (possibly with intermediate domain names, if one wanted to keep that concept in a redesigned protocol, which one possibly would not) all together.
It's right there in the protocol, we just need to figure out how to signal NODATA/NXDOMAIN/SERVFAIL/... for each individual query.
A packet would look something like:
A IN 38:mydomainnameislongerthanyourdomainname 3:com
AAAA IN <2 bytes pointer>
CNAME IN <2 bytes pointer>
SRV IN <2 bytes pointer>
So 43 bytes for the name (41 bytes data, 2 length fields), plus 4 bytes for the type and class, and 6 bytes (type, class pointer) for each additional type. Even if you would already consider 200 bytes to be a lot of overhead, that would fit `floor(200/6)`=33 question records, more than I think we'd ever use. (Sure, the exist more, but currently we only query for A and AAAA. The overhead of that, when using the current DNS format but using multiple queries in one packet, is a grand total of 6 bytes.)Pointer format: http://www.tcpipguide.com/free/t_DNSNameNotationandMessageCo...
Yeah, it's a standard, and at least three people want to use it, but what else?
I prefer my http server fast, works over firewall and less depends on other services.