Open vulnbe opened 4 years ago
This is dangerous; you can not tell if the second key was requested by the authorized user as a means to keep availability once the revocation happens (replace and revoke). If you have an indication that key1 was revoked for key compromise reason AND you have a record that the subsequent certificates were issued using the revoked key after the revocation then you could prompt and ask but I would not do revocation automatically, there are plenty of outages related to related behavior in other software.
Hey @vulnbe thanks for opening the bug report! Hadn't completely thought through this use case / eventuality before.
@rmhrisk your'e totally right (didn't immediately see it w/out your comment, so thank you). There are many reasons to revoke a certificate when it hasn't been compromised. In fact, the standard operating procedure that we encourage is to revoke a certificate any time you are done using it. The standard lifecycle of a certificate should end in revocation. Before it's revoked, it generates it's successor.
I agree with @rmhrisk that the feature here would be offering to revoke all certificates in the compromised chain, iff the key is known to be compromised and the descendants can be clearly tracked.
We're not currently storing that data (provisioning cert, provisioning pub key identifier), but we should be. I'm going to retag this as an "enhancement" since I think the system works as intended, however, we could be doing more in regards to revocation.
As to the second question (about reviewing all valid certificates), there is this open issue: https://github.com/smallstep/certificates/issues/239. Would you mind leaving a comment in support (or just a +1), assuming you are interested in that functionality. Community support / engagement for an issue plays a big role in helping us prioritize the roadmap.
@dopey Thanks for reply! This issue not about standard revocation of a certificate but revocation of successors which renewed using compromised.
In current version it is required to stop CA and extract serials of certificates manually from database. I did not try to do this, so I do not know if there is enough information in the database.
Thanks for raising this @vulnbe. Also, thanks @rmhrisk for the insight around availability issues. I hadn’t completely considered this.
I have a couple thoughts here that I’d love feedback on from the community:
foo1.crt
you can “renew” it twice and get foo2.crt
and foo3.crt
. I’ve been considering whether we should change the default behavior (or at least add an option) to “auto-revoke on renew”, which would prevent multiple renewals. This seems like good hygiene, but @rmhrisk’s comment about availability issues makes me question whether this is wise.Feedback / thoughts very welcome on any of these points!
Following up --
Rather than auto-revoking the logical descendants of a particular certificate or key, we want to empower the user to make those decisions. Our plan is to build observability tooling that will allow admins to query across multiple attributes of a certificate. Some examples of queries we plan to support:
Tracking the successors of compromised certificates is an important feature. I can't give an estimate for when a robust implementation will be available. However, we do plan to release some quick and scrappy scripts for scraping the database in the short term.
Hi Guys,
Do we have an update about this? Even the scrappy scripts to explore logs/db could do the trick for a start :smiley_cat:
Hey @anthonyjlmorel appreciate the reminder. We've actually been hard at work on this. We're releasing a certificate observability feature within the next month. You'll be able to "link" your open source CA up to our hosted platform to see issued certificates, lineage, set up alerts, and webhooks. Linking a single open source CA will be free. We'd love to get your feedback on it once it's live.
Hey team.
Suppose a short-lived certificate is issued. The certificate and key are compromised and the attacker issued a new certificate using the old one:
step ca renew compromised.crt compromised.key --out=new.crt
We revoke the compromised certificate:
step ca revoke --cert compromised.crt --key compromised.key
Meanwhile, the new certificate is still valid. So the attacker will re-issue himself certificates as he needs.
It seems such dependent certificates should be revoked automatically.
Also, how can we review of all issued and valid certificates using step ca?