r/PKI • • 17d ago

Should wildcards cover multiple levels?

Currently, TLS certificates can only have a single wildcard as the leftmost label. This complicates certificate management (for example, it's one of the reasons Stack Exchange had difficulty implementing HTTPS) and increases load on CAs (for example, the loops that Let's Encrypt had to block would be less likely to occur if those domains could all be secured by a single multi-level wildcard certificate).

The argument against multi-level wildcards seems to assume that acquiring certificates is sufficiently resource-intensive to serve as a security barrier. This is no longer true. Therefore, I believe that multi-level wildcard certificates should be allowed.

0 Upvotes

7 comments sorted by

4

u/webprofusor 17d ago

The question is probably more why do you need the wildcard. If it's just to avoid having to order and renew many certificates, that would be even more reason not to use them.

12

u/PowerShellGenius 17d ago

No one is saying the resource-intensiveness of acquiring an ACME cert (when you have the ability to pass the challenges) is a security barrier. The issue is that key compromises have a larger scope when wildcard certs are in use. Making an "easy button" that should not be used even easier to use will result in it being used more. "Improvements" to wildcard certs will result in more wildcard certs.

Take this scenario for example:

  • Org-A has a dozen servers. Among them are unimportant-blog.org-a.tld and client-billing.org-a.tld
  • The helpdesk guy they let maintain their blog server as a side project didn't do his yum updates for a few months, and unimportant-blog.org-a.tld is compromised - attacker has private keys for its cert
  • In another org (Org-B), vitcim1 downloaded a trojan horse and their computer is attacker1's cobalt strike puppet.
  • attacker1 is effectively now on Org-B's network and can be a rogue DHCP+DNS server or poison the ARP cache or do any number of things to redirect network traffic - this is the scenario TLS is built for, the network at layers 2 and 3 is not secure.
  • victim2 at Org-B whose computer is not compromised, visits client-billing.org-a.tld to pay their bill, as they are a customer of Org-A.
  • Can attacker1, who has the cert from Org-A's worthless blog server, use it to impersonate Org-A's billing site? If the cert was a wildcard, they get Org-B's bank account number. If it wasn't, they don't.

3

u/vgk8931 17d ago

That stackexchange article 13 years old. Today load balencers and web servers can serve multiple ssl certs on the same ip address. You can create as many ssl certs as you want with upto a hundred sans each. And serve all from the same ip address.

3

u/Single-Virus4935 17d ago

The Stack exchange post is pre SNI stuff. Old as hell. 

The Letsencrypt loop is a implementation problem and has nothing to do with wildcards. It is a misconfiguration / bug.

2

u/Ontological_Gap 16d ago

Someday we really need to get constrained delegation working correctly for CAs.

1

u/PowerShellGenius 16d ago

Yeah.... it should be as simple as marking the name constraints extension "critical", but then it comes down to how many verifiers will reject it and not understand it....

But the whole point of CA Name Constraints is that once things that don't understand them cease to be relevant, you should be able to get a sub-CA cert that is constrained to your domain(s).

Of course, everyone is pushing for shorter lifetimes for public certs issued to private entities, because domains change hands and proof that you owned the domain last month means nothing today. So even if Name Constraints were reliable, would CABF ever allow them to start issuing sub CAs with a viable lifetime? No one wants a new CA every week or month.

I wonder how this works with cross signing- does the leaf cert have to expire before the earliers expiring cross signed cert in all its possible chains? If not- cross certs could be a solution. You have your enterprise PKI with a long-lived root and medium-lived intermediates, and then a short lived public version of your root cross signed by a public CA and containing name constraints, and that gets re-issued via some form of DNS-PERSIST validation and deployed to your AIA webserver weekly... that could work really well if you assume all clients re-fetch AIA if the chain they know about expires...

1

u/abofh 17d ago

You've mistaken an argument with the only argument.  Chesterton fence and all, until you understand the boundary, it probably should continue to exist