← Back to context

Comment by barco

13 hours ago

The way the web works, any CA (Certificate Authority) can create TLS certificates for almost any website.

This means that the people with these keys could MITM almost any https connection people make, not only the ones that this CA issued.

It doesn't have to, you can set X509 name constraints which say "the CA may only issue/may not issue certificates for these Subjects," or you can set CAA in DNS, for example.

(Of course, the former isn't really intended to constrain trusted Root CAs, moreso internal PKIs. But it is an option people should know about!)

Yes and NO. These are intermediate CA's and for them to be recognized by your browser or system, they need to be signed by another CA or root certificate that your system already trusts.

SO, not all CA's are signed by root certificates already on your machine

"any CA (Certificate Authority) can create TLS certificates for almost any website."

This has always been incredibly stupid.

  • You can pin, but almost nobody does (and half the world that does pin is probably pinned to Let's Encrypt).

    Those who manage the root domains should have been able to pin who they trust, and then if you WANTED to you could add someone beyond what .com or .egg or .muffin lists.

    • > and half the world that does pin is probably pinned to Let's Encrypt

      To be fair, unless I'm misunderstanding, wouldn't this be a good move?

      LE has a good security record and takes itself seriously, versus these smaller CAs that seem to mess up regularly.

      2 replies →

  • Why? How do you pin a website to a specific cert provider? And what happens when you want to switch?

    • You can pin in software you distribute. If you're big enough (top 100 websites mostly), you can ask browsers to pin certs and they may included it in their preloads.

      > And what happens when you want to switch?

      You have to update your pins and then wait long enough that you don't mind losing users who never update their software. When it's just in software you distribute, you can change hostnames in new versions and use the new CA for new versions and the old CA for old versions...

      For web browsers, there's not a reasonable way to make a nicer transition. You have to serve old certs for old pins, and TLS handshakes from browsers don't include enough information to know if the client has an old pin or a new pin; or at least, mostly they don't --- if you get your pins changed and the browser TLS stack changes so the handshake changes after that, maybe you can use that... when sha1 certs were phased out, it was somewhat popular on high volume sites to look at the TLS Client Hello to decide to serve a sha256 cert or a sha1 cert.

      DNS CAA only pins issuance, not acceptance; clients can not check if the CA that issued a cert was listed in DNS CAA at the time of issuance, and they do not check if it's listed at time of presentation. I'm pretty sure issuing a cert contrary to a CAA record is a mississuance and would result in sanctions from the CA/Browser forum, but clients would still accept the cert until it's revoked.

      There was briefly browser support for site initiated pin on first user (HTTP Public Key Pinning), but it got dropped as mostly no one was using it and it was easy to get wrong and break your site.

    • Because it makes you only as secure as the the LEAST secure CA. Such as the really bad ones that don't use Hardware Security Modules.