Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Talk about key rotation downtime and "rotationPolicy: Always" #521
Talk about key rotation downtime and "rotationPolicy: Always" #521
Changes from 3 commits
90c4757
4232d0c
550fc84
79e1bee
ea1f25b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not showing the diff for some reason.
s/or change the/or changing the/
.And maybe it would read better as:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also:
This statement in isolation is not true, and may cause confusion. The majority of fields will cause a re-issuance (e.g. changing dnsNames, commonName, usages etc). Changing the
rotationPolicy
(or any other fields that control how a renewal happens) won't cause a re-issuance immediately.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #521 (comment), Richard proposed to remove the line:
I think I misunderstood Richard's suggestion back in May. I should have understood Richard's comment as:
(as per
RequestMatchesSpec
)Apologies for my misunderstanding.
I re-added the line about reissuing on spec change in ea1f25b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we link to a reference backing up this claim good practice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot find any good reference to support this claim. By reading some discussions:
People seem to suggest that:
Looking around, I found that:
certbot renews the private key while renewing the cert by default, but there is nothing explaining why;
NIST's Guidelines for the Selection, Configuration, and Use of Transport Layer Security (TLS) Implementations does not indicate when to renew the private key; the only bit that talks about what to do with a server private key is this:
NIST's Recommendation for Key Management has a nice table but no claim on when the private key should be renewweed:
f5-bigip suggests to renew the private key (https://support.f5.com/csp/article/K14620):
@SgtCoDFish Do you know a place where that would be written? Or should I rather remove this claim and say that "the cert-manager team suggests users renewing the private key along with the certificate"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one big reason why you would want to, is that if you were to renew a certificate using the same private key, and then after the initial certificates expiry learn that the private key had actually been leaked, the new certificate would be valid to use with the old private key, thus the 'rotation' didn't really provide any more protection and really just extended the lifetime of the existing certificate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
James is spot on. I don't have like an authoritative source to hand for why you'd want to rotate as much as possible, but certainly I think it's best practice.
The longer a key is used, the more likely it is to be exposed. Keys should be renewed "as often as possible" for me; not only for security reasons but also operational reasons to show that it can be done, so that if it has to be done in an emergency the org has confidence that they can carry it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried my best to formulate a paragraph that "justifies" our point of view. Please correct me if any of this is wrong. 🔥
👉 We recommend that you configure
rotationPolicy: Always
on your Certificate resources.Rotating both the certificate and the private key simultaneously prevents the risk of issuing a certificate associated with an exposed private key.
Another benefit to renewing the private key regularly is to let you be confident that the private key rotation can be done in case of an emergency.
More generally, it is a good practice to be rotating the keys as often as possible, reducing the risk associated with compromised keys.