febusravenga
9 months ago
What is the problem with long lived certs? Is the cryptography behind PKI considered weak nowadays, that you can collect enough material on cert that you can derive privkey? Is there other fundamental cryptographic weakness?
I understand problem of still-valid certs after domain expiration, but mere rotation strikes me as similar to password rotation ... which is currently discouraged.
bawolff
9 months ago
The main issue is lack of a working revocation mechanism.
Servers get compromised sometimes, people do stupid things with keys, etc.
We dont have a really good way of revoking keys after something bad happens. We have some bad ways, but they kind of suck.
An additional reason might be making it easier to punish a misbehabing CA (CAs are often too big to fail, you cant ban them without breaking half the internet)
jmclnx
9 months ago
No kidding. Where I use to work, certs are a nightmare.
For example, some sites were closed and we asked the site owner to revoke their cert. We got "What does that mean ?", they had lost their private key.
Also other departments had certs that expired, they had no idea what to do. I left over a year ago, and someone who knows more about certs that I do left not long afterwards. I know many certs are due expire soon, good luck to them.
The point of this is I can see 45 day certs being a huge issue for that company. When I left they were looking into non-expiring certs. I have no idea what they ended up doing.
FWIW, this is a fortune 500 company.
ozim
9 months ago
Well with ACME theory is that certs should renew automatically so no one should cate.
But to set it all up in F500 size company, that is totally different discussion and not only TLS certs but all kind of other cert auth that happens there.
rightbyte
9 months ago
> We dont have a really good way of revoking keys after something bad happens.
Why would there be. If the key is 'revokable' that is a weakness in it self.
Arnt
9 months ago
Others have answered on one level. I want to answer on another.
A few older crypto mechanisms were designed around trusting one thing totally. For example, everything's secure until the end of time provided that the user keeps a private key totally private at all times, with no interruption, ever, and if the user lapses then the overall mechanism breaks really badly.
They were complicated mechanisms held together by a screw made of a metal which was assumed to be infinitely strong.
The current fashion is to trust thing in a more limited way, and to design systems such that they won't blow up spectactularly if something breaks. Being able to revoke keys is part of that, it is a weakness that helps to avoid a really bad weakness.
dspillett
9 months ago
> If the key is 'revokable' that is a weakness in it self.
Ish. The threat of that is part of a different risk model, and probably less serious.
A long-lived certificate that ends up being able to be used by a malicious party (perhaps due to a leak of the private key) could be serious for many users if the certificate can't be reliably revoked, which they currently can't be.
A mistaken or malicious revocation if someone were to manage that could be an issue to the service operator (users can't get in) but this is a safer failure than users connecting to a malicious shadow service due, for example, to an accidentally exposed private key and a DNS poisoning attack.
As others have mentioned: if revocation worked better currently, this would be less of an issue.
Dylan16807
9 months ago
A mistaken revocation is orders of magnitude less harmful then a failure to revoke. If revocation worked pretty reliably, that would be an improvement over the status quo.
gruez
9 months ago
>If the key is 'revokable' that is a weakness in it self.
???
Why?
bawolff
9 months ago
> Why would there be. If the key is 'revokable' that is a weakness in it self.
What??
This does not make sense. Keys are revocable in most crypto systems.
olliej
9 months ago
Wait, what is the threat model for revocation being a weakness?
growse
9 months ago
As far as I understand it, two problems:
* Certs come with secrets. Long-lived secrets are riskier than short-lived ones because of window of opportunity if they're compromised in an undetected way.
* Less frequent cert rotations mean that the rotation process is inherently riskier. The old adage of "request a 2-year cert, and you're scheduling an outage 2 years from now" has a lot of truth to it. More frequent rotations increases the incentive to automate, which reduces the service risk.
ndsipa_pomu
9 months ago
Your second point is crucial in my opinion. In most organisations, there'll be a rush to get some new web service configured and an overworked admin is likely to set up the initial certificate. Without a short expiry date, you can almost guarantee that the admin hasn't got around to monitoring, automating or documenting the process and might not even still be working there in 2 years time.
tsimionescu
9 months ago
That's a problem for the company, not the security of the Internet. Why do the PKI people take it upon themselves to increase the problems for these companies in order to force them to automate processes?
fardo
9 months ago
> What is the problem with long lived certs?
Privilege escalation and Dev Ops rot. Long-lived certs often get compromised when privilege escalations happen and someone gets access to an account or computer that has private keys on it.
One example scenario for privilege escalation: let's say a hacker gets access to one of your employee's or vendor's machines and associated accounts using a zero-day, or phishing, or some other method that goes undetected for some time. The attacker, as part of this attack, successfully gets access to your cert's private keys through some way or another without drawing attention to themselves.
Some time later, your firm makes several security updates. When doing this, you unknowingly patched the attacker out of your network. The attacker is now in a race against time if they want to do something with the cert before it expires, and in this kind of situation, the sooner that cert expires, the better, because the attacker gets less time to do something with it. In a perfect world, the cert expired exactly when they got patched out, but because we're not guaranteed to know if there's an attacker in the first place, "keeping the expiration time as short as is reasonably possible without impacting service reliability" is what things seem to be moving towards, to limit the blast radius during access leaks.
As for Dev Ops rot, speed has a tendency to change requirements in favor of automation. Generally, certificate rotations tend to be a pain point - they break management panes, they take down websites, they throw browser errors, they don't get updated in pipelines, and other woes happen when they expire that demand people keep track of a ton of localized knowledge and deadlines that's easy to lose or forget. However, paradoxically, the longer the time between rotations, the more painful they tend to be, because once rotations are sufficiently fast, it becomes unmanageable to do them manually: demanding speed forces people to build anti-fragile rotation systems. Making the requirement be shorter is in some sense an attempt to encode into managerial culture "you need to automate this", as a bulwark against swapping your certs out being anything besides automated or one click rotations.
tikkabhuna
9 months ago
I'm by no means an expert, but the difference between passwords and certs is that certs can be used without any interaction with the authority.
A leaked password will reveal itself to the authority when used. You have to connect to something to use it and when doing so, can be flagged.
A long lived certificate and key can be used with no interaction with the authority, so how do you know that it is being used maliciously? The renewal is the interaction with the authority which could pick up malicious activity, so making it more regular is beneficial.
rightbyte
9 months ago
I think the problem that 100 year certs don't require a complicated SaaS and consultant riddled circus as much.
It is like credit cards. The more problem the more money is to be made by middlemen.
remram
9 months ago
100 year certs require a consultant when the 100 years are up on any certificate and no one has any idea how the system was set up. They require a consultant when there's a security breach and you have to figure out which of the many certs you have ever used is compromised, or let the attackers in.
The hope is that 45 day certs don't require consultants because if you don't set it right you'll find it right away... and of course the risk of leak is much lesser.
ndsipa_pomu
9 months ago
It's very easy to use free certificates (e.g. LetsEncrypt) that can use a free script to automate the renewal of them. There's also plenty of free guides on how to use them for various web servers etc. That comes to a grand total of nothing.
If you'd rather pay someone else to do it for you, then that's your own issue and not really anything to do with the length of certificate validity.
appendix-rock
9 months ago
[flagged]
dang
9 months ago
We've banned this account for repeatedly breaking the site guidelines. Please don't create accounts to break HN's rules with. If you don't want to be banned, you're welcome to email hn@ycombinator.com and give us reason to believe that you'll follow the rules in the future. They're here: https://news.ycombinator.com/newsguidelines.html.
It's particularly bad to do this when you're knowledgeable and (let's assume) correct on a topic, because then the bad parts of your comment (such as personal attacks) end up discrediting the truth. That doesn't help anyone. https://hn.algolia.com/?dateRange=all&page=0&prefix=true&sor...
gruez
9 months ago
>but mere rotation strikes me as similar to password rotation ... which is currently discouraged.
Cargo culting strikes again. Forcing password rotation is bad because it causes people to choose passwords with a given pattern (eg. password1, password2, etc.), which defeats any security benefit. Rotating certificates have no such issue, because the key is (presumably) randomly generated.
gsich
9 months ago
Also you can reuse the same key.
EasyMark
9 months ago
I think it’s the same mentality as “change all your passwords every 6 months”, just a useful principle “change your password if you think you need to” because a ridiculous rule of thumb and hammer slap everything is a nail. A reasonable rule like “update your cert at least once a year” becomes “by extension wouldn’t updating your cert once a month better?”
chippiewill
9 months ago
It's because of the risk of leaked private keys being used for a long period of time.
Additionally, short renewal periods encourages automation which is more secure than a manual process.
Password rotation is discouraged because usually it means that users will create weaker passwords.
gsich
9 months ago
Private keys for certs can and are being reused.
nolist_policy
9 months ago
(Currently) there is no reliable way of revoking compromised certificates.