74 points · by k_sze · 6y ago · 63 comments
If there's just an arbitrary point in time where after which we start warning people and then another point where the cert expires... Why move "expiration" around.
No it's not, you still get a (slightly) nagging warning. Just one that's much milder (without the red alert, fear-mongering, etc.) and still lets people use the site for a while.
> Why not provide those milder warnings BEFORE the current expiration date?
I indeed almost suggested this, but the problem is the site owner hasn't done anything wrong in that case, so the warning would be an actual false alarm.
No, the world we have is one where these expiry mishaps happen all the time, and everyone would be better served if certs had a warning expiration date in addition to the red alert one. It's the old "don't delete a customer the second they are late on a single payment" thing that everyone long recognizes as good practice.
I think whole thing could be solved by having soft and hard expiry dates. It is an extensible format after all.
It's just a small grace window to let users still be able to use the site. Just like an expiration date on your milk. There's no need to toss it out immediately just because an extra nanosecond passed.
Hsts does not even give users a choice because nobody could come up with a scary enough warning.
So you can't simply shown outdated certs because this make time totally useless. But you also can't shown cert from the future.
Other sad news - new browsers set that certs can have lifetime only for year and month: https://www.michalspacek.com/maximum-https-certificate-lifet... to effective fight against certs that are too long lifetime.
So this make a window for installing new cert exactly 42 days. And many people will fail on this trap soon.
Browsers could start showing warnings that a cert is expiring soon when something like 5% of the cert lifetime is left (with a max of like 1 month for some of those crazy long lifetime certs).
The problem is this is an actual false alarm in that case; nothing has actually gone wrong. Nobody likes to get a warning about something that's still good before its expiration.
Or have two expires in a cert - soft and hard.
1) It's an assurance that the verification of identities/servers (or whatever) behind the certificate is at least somewhat recent
2) Certificates imply a loose agreement between the certificate holder and the world that the certificate holder keeps the private key safe. The expiry date automatically ends that agreement.
Time is relevant in both cases but it's not that relevant that the timing is exact in web browsing. Identity verification is still about as fresh one day after expiry. The second case is a bit more critical but chances are certificate holders don't leak their private keys immediately after expiry.
Giving a "grace period" with noticeable but non-blocking warnings (something like the "this site recently had an account breach" popup in Firefox perhaps) might cause website operators to find out about the problem without disrupting the service. It would be a good idea to standardize the length of the grace period.
Off the top of my head I can only think of one situation that might turn problematic and that is when an expired certificate gets compromised. I'm not familiar with how CAs do it but I hope renewal automatically revokes the renewed certificate already. It would also need to be possible to explicitly revoke an expired certificate if something like a grace period existed.
Let's Encrypt provides tools to do it while cert renewal with other certificate authorities is manual in most cases.
The TLS server code is the piece that is using the certificate every time a page is requested.
Why doesn't server code log an error warning that the certificate is going to expire?
Why doesn't the server just stop serving connections when the cert has expired?
Stopping connections ought to get the attention of the service owner rather than force clients to use out-of-band mechanisms to reach the service owner.
Alternatively perhaps imminent expiry should be a trigger for renewal or some other alerting mechanism.
Is there a callback like this in current TLS API stacks that could be used to make this work? (I'm not super familiar with TLS server side APIs, I know there are client callbacks for certificate validation).
It would probably be wise to do the check carefully so as to not consume too many resources. A well thought out mechanism could trigger an external process for notification or even automatic renewal - even when needing to cross a privilege boundary, perhaps touching a file or an IPC message.
I think this would be slightly better than some of the current setups for things like Let's Encrypt that end up running many times unnecessarily. Would be a much better fit for resource constrained embedded devices.
[edited: added back a sentence I inadvertently removed]
Why not LetsEncrypt with automated renewal?
I’d rather have 5 year certs and rely more on revocation than have this stupid exercise where people must renew every year or 13 months that just so happens to collect tons of rent seeking income from a few firms.
It’s kind of like how the shift to non-expiring passwords. We were trying to correct for the risk of a compromised password by making it harder to have secure passwords. I think we’re better off with having really strong passwords that only ever get changed when necessary and allowing this my monitoring login actions for weird stuff.
Sysadmins dont pick their private key. They dont write the private key on a post it. None of the reasons for not doing password expiry apply here.
Primary benefit of shorter certificates is it probably makes it easier to punish CAs that dont follow the rules.
Isn’t it primarily free CAs like LE that are pushing for shorter expiration times?
IIRC the primary argument is not about security or safety, but rather that shorter certificate lifetimes encourage companies to automate certificate renewal/make it a regular part of their business routine. If you only have to renew a certificate every five years, then it’s really easy to forget.
The argument that gets presented to me is that shorter times reduce the risk of someone compromising the cert and pretending to be the real server. But that risk requires a pretty motivated attacker to also compromise DNS or server farm and that probably doesn’t matter because they will plan around any renewal cycle.
When you tell management "we need to automate this process that will happen every month", you will get approval.
It's not about the effort to automate the process, it's the opportunity cost of investing that effort.
Is it though?
Asking people to ignore browser warnings seems like bad advice from a security expert.
If I were the Brian (but I'm not), I would have asked followers to not trust the site until the certificate issue is fixed, even though I "know" my site is still safe. I think the properly cautious attitude is to consider all bets being off when a certificate is invalid for whatever reason. There is no guarantee what your visitors are actually getting.