by dijit · 9y ago · 0 comments
I worked in a few places that had a *.company.com which covered, obviously, everything under that domain.
That meant if that wildcard cert leaked then our EV cert for, say, checkout.company.com would be essentially compromised too.
Not to mention. If you have a wildcard cert it's rather likely you're passing those certs around servers, lots of scope for leakage.
I really think that if you feel the need to do wildcard certificates, then you should at least try to figure out another way around it. I'm not saying you absolutely must never use them, but be incredibly mindful of what is at stake and limit the scope and availability of such certs as much as possible.
For instance. Don't put the same wildcard on mail servers and IM servers and git servers and etc; a compromise of one will compromise them all and the revokation system is not good enough.
https://blog.dijit.sh/please-stop-advocating-wildcard-certif...
Everyone keeps saying SaaS is the reason for the use of wildcard certs and I would absolutely argue the point that multi-tennancies weakest tenet is the fact that if you get compromised the scale can be broad. Why intentionally weaken that system? LE can handle thousands of domain creations a minute, they've been very forthcoming with lifting limits for people on domain creation.
The downside is your server sites which need a little overhead for vhost creation but that could be automated with less than a day of ops work.
I'll stand by the assertion that vhosts are probably still better off with a wildcard cert if it's the difference between a single server using a single cert vs a single server holding thousands of certs. In a node compromise it's the same either way. If different servers are serving different subdomains then sure, subdomain certs are the better way to go.
My situation is a bit different: hosting a bunch of subs on the same servers.
With one wildcard I have one server conf with one cert and use the hostname to rewrite each request to the correct directory.
If I did a cert for each sub the nginx conf would need 1000's of server config blocks each with its own cert. I haven't tested, so maybe nginx would handle this just fine, but it is easier to just go with a single wildcard and not worry about it.
As far as I can tell there is no security advantage to having multiple certs instead of one wildcard since I would have all the certs on the same server anyway but if anyone knows of any I would be happy to hear.
Is having separate certs really that big of a deal? Operational overhead with LE is next to none and if you're scared of hitting limits you can contact LE to have the limits increased.
There's certainly a place for wildcard certificates, but I definitely agree that they should be used sparingly.
I've often (always?) fallen into the trap of "Let's just use a wildcard. Setting these things up is a pain in the ass!"
The fact that validation for wildcard certificates is limited to the DNS challenge will hopefully ensure that most users will continue to use non-wildcards, as the other challenges are significantly easier to automate.
But now, with the full LE offer of services, cost is no longer an issue, and all you mention should be easily automated via scripts.