Skip to content

Make CA validity throughout leaves duration enforcement opt-in#513

Merged
giorio94 merged 1 commit into
cilium:mainfrom
giorio94:mio/ca-validity-flag
Mar 12, 2026
Merged

Make CA validity throughout leaves duration enforcement opt-in#513
giorio94 merged 1 commit into
cilium:mainfrom
giorio94:mio/ca-validity-flag

Conversation

@giorio94
Copy link
Copy Markdown
Member

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.

@giorio94 giorio94 force-pushed the mio/ca-validity-flag branch from 5b9e534 to 7442654 Compare March 12, 2026 08:09
@giorio94 giorio94 marked this pull request as ready for review March 12, 2026 08:09
@giorio94 giorio94 requested review from a team as code owners March 12, 2026 08:09
@giorio94 giorio94 requested review from Artyop and kaworu March 12, 2026 08:09
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>
@giorio94 giorio94 force-pushed the mio/ca-validity-flag branch from 7442654 to 75d010d Compare March 12, 2026 08:12
@giorio94 giorio94 merged commit 5ba4a49 into cilium:main Mar 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants