Make CA validity throughout leaves duration enforcement opt-in#513
Merged
Conversation
5b9e534 to
7442654
Compare
e3db917 ("fix: detect and reject expired CA certificates") extended certgen to validate that (a) no certificate in the CA chain has already expired, and (b) they will remain valid for the entire duration of the requested leaf certificates. However, the latter check ended up being problematic in Cilium, because by default certain certificates are requested to have the same duration of the CA (which is definitely questionable), hence causing certgen to either fail immediately, or upon the first renewal. As a workaround, let's make that validation opt-in, and disable it by default. This allows us to keep bumping the certgen version in Cilium stable branches without causing breaking changes (and without having at the same time to maintain multiple versions of certgen), and gives us the control to selectively enable this extra validation once the necessary adaptations have been performed there, and with proper upgrade notes. Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
7442654 to
75d010d
Compare
glrf
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
e3db917 ("fix: detect and reject expired CA certificates") extended certgen to validate that (a) no certificate in the CA chain has already expired, and (b) they will remain valid for the entire duration of the requested leaf certificates.
However, the latter check ended up being problematic in Cilium, because by default certain certificates are requested to have the same duration of the CA (which is definitely questionable), hence causing certgen to either fail immediately, or upon the first renewal.
As a workaround, let's make that validation opt-in, and disable it by default. This allows us to keep bumping the certgen version in Cilium stable branches without causing breaking changes (and without having at the same time to maintain multiple versions of certgen), and gives us the control to selectively enable this extra validation once the necessary adaptations have been performed there, and with proper upgrade notes.