febusravenga
a year 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
a year 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
a year 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
a year 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
a year 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
a year 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
a year 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
a year 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
a year ago
>If the key is 'revokable' that is a weakness in it self.
???
Why?
LegionMammal978
a year ago
I'd read it primarily as censorship risk. If a CA is under a government that wants your website taken down, they can just lean on the CA to stop renewing any certificates for it, as opposed to futzing around with ISPs or DNS providers that can only have a local impact. Or alternatively, the CAs in the future might directly use their monopoly to decide who's good and evil (especially on "integrity of the network" grounds against those judged to be spammers et al.).
At least perceived censorship risk is why the archive.is guy always uses HTTP links and not HTTPS links for his site, iirc.
ndsipa_pomu
a year ago
I'd classify that as very low risk. If a CA's business is compromised by a government, then it's pretty easy to just switch to using a different CA, preferably in a different jurisdiction to work around the censorship.
I don't really get the argument behind using HTTP links to avoid the censorship risk with HTTPS - just provide both and get the best of both worlds. Also, using HTTP is far more prone to being interfered with in transit - I recall BT (or their ISP business department) trialling that and injecting adverts into HTTP pages. I can't recall any instance of HTTPS being censored by restricting certificates.
hulitu
a year ago
> I'd classify that as very low risk.
The majority of CAs are in the US.
yugcesofni
a year ago
FWIW, a slight clarification here would be that the majority of TLS certificates are issued by CAs in the US, but the majority of CAs are not headquartered in the US.
ndsipa_pomu
a year ago
Whilst that could be a problem, there are some CAs that aren't based in the US. I consider it a low risk issue as I haven't heard of it happening. It'd be more likely for your IP to be cut off rather than attempting to deny an SSL cert.
bawolff
a year ago
As you say though, the risk of revocation is low, since anyone who wants to do that can just fail to renew (renewing and revoking are different operations).
I guess it decreases the lead time of censorship. That seems pretty minor though.
hulitu
a year ago
You cannot run this program. Invalid certificate.
bawolff
a year 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
a year ago
Wait, what is the threat model for revocation being a weakness?
growse
a year 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
a year 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
a year 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?
ndsipa_pomu
a year ago
Reduced certificate expirations also enhances the security of the internet as it reduces the window of opportunity for nefarious uses. It could possibly reduce their number of support calls from someone who's taken over from a previous admin and is now faced with an undocumented manual process to replace certs in a hurry as their website has an expired cert.
Personally, I don't see the problem with short expiry dates, though less than a month would be too short in my opinion.
tsimionescu
a year ago
A window of opportunity of 45 days is not significantly different from one of 90 or 365 days. If it's the only protection you have from a leaked private key, then a while lot of people are gonna get MITMed.
growse
a year ago
The CAB (who are setting the TLS cert issuance rules) are optimising for their users' security.
Their users are "people using browsers", not "people asking for cert signatures".
tsimionescu
a year ago
But the argument I was replying to was saying that the main advantage of short expiration times is that it encourages companies to automate the process, which reduces the chance that the certificate is accidentally allowed to expire. This is not a security issue for anyone, least of all people using browsers.
Plus, this concept that short expiration times increase security is suspect at best. If the private key leaked, 45 days is far too long, you'd need to reduce this to hours to actually help as a revocation strategy. And even then, chances are that the new key will leak as well right away, as it's most likely that the key was stolen by some undetected malware. And if the key didn't leak, a two year old cert is just as secure as a two minute old one.
growse
a year ago
> This is not a security issue for anyone, least of all people using browsers.
I disagree. The smooth running and ease of automation of TLS certs benefits the entire ecosystem, including the end-users. Remember when the only sites that had TLS certs were the ones that could afford it?
> If the private key leaked, 45 days is far too long, you'd need to reduce this to hours to actually help as a revocation strategy.
This is a good example of the Nirvana Fallacy.
> And even then, chances are that the new key will leak as well right away, as it's most likely that the key was stolen by some undetected malware.
No certificate expiry control can protect against continuous, undetectable data exfiltration. Meanwhile, a one-time access that grants me the ability to impersonate you for 2 years is a significantly worse situation than one that only grants me that ability for a few weeks.
fardo
a year 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
a year 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
a year 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
a year 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
a year 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
a year ago
[flagged]
dang
a year 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...
rightbyte
a year ago
I miss simplicity.
And I could argue that lower prices implies money is made somewhere else. Like how Cloudflare infested half the internet with their free MITM.
But, ye, I should chill a bit on topics like these. I have hard time not ending up in a 'Google etc. is coming for me' rant.
gruez
a year 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
a year ago
Also you can reuse the same key.
remram
a year ago
You can also set your password to "password" but hopefully you don't. Guidelines and technical measures can't keep everybody safe all the time, if they are determined to be unsafe, but that is never an argument against them.
gruez
a year ago
Don't you have to go out of your way to do that? You can probably choose a weak RSA key as well (ie. one that's 4096 bits but not a prime), but if you have to go out of your way to do that there's little anyone can do to stop you.
SahAssar
a year ago
IIRC the default in most/all ACME clients is to reuse the private key and just get a renewed certificate for it.
m_sahaf
a year ago
Caddy doesn't reuse the private key by default. The user has to explicitly configure it in that broken way.
SahAssar
a year ago
Does it terminate existing connections and re-handshake when renewing the cert then? Or does it potentially hold many keys in memory for existing sessions? IIRC a TLS session can potentially last for a long time and 0-RTT depends on it being the same key, right? Couldn't find any answers in the docs: https://caddyserver.com/docs/caddyfile/directives/tls#reuse_...
m_sahaf
a year ago
The renewal of the key does not affect existing connections/sessions because they (the sessions) don't use the key directly. The private key is only used in the beginning to agree on the symmetric key, then the symmetric key is used from there onwards.
g8oz
a year ago
No you don't have to go out of your way to reuse the same key
EasyMark
a year 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
a year 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
a year ago
Private keys for certs can and are being reused.
nolist_policy
a year ago
(Currently) there is no reliable way of revoking compromised certificates.